gnuit-4.9.5/0000777000175000017500000000000011146672041007666 500000000000000gnuit-4.9.5/ChangeLog0000644000175000017500000003020311146671375011363 000000000000002009-02-10 Ian Beckwith * Bumped version of Free Documentation License to 1.3 or later, still with no Invariant Sections, no Front-Cover Texts, no Back-Cover Texts. * Updated gnulib to commit 69aecd33. * prepare: stop importing memmove module: obsolete. * Makefile.am: add m4/sockpfaf.m4 to EXTRA_DIST. * .gitignore: add lib/fcntl.h and lib/signal.h. * Update NEWS. 2009-02-08 Ian Beckwith * Added filetype info for many more file extensions. Thanks to Tudor Hulubei (and Wikipedia). 2009-01-12 Ian Beckwith * src/git.transition: remove bashisms (Thanks to Gerald Pfeifer). 2008-10-24 Ian Beckwith * panel_fit_number(): If number with commas is too big, go straight to autoscale without trying to drop commas first. * panel_update_size(): show available space (fsu.fsu_bavail) instead of free space (fsu.fsu_bfree), even as root. 2008-09-12 Ian Beckwith * Bump version to 4.9.5. * Fix incorrect INSTALL_PROGRAM calls. Thanks to James Rowe. * gitaction: add xdg-open, kfmclient, exo-open. 2008-06-16 Ian Beckwith * gitaction: + support .7z files + MacOS: don't run open(1) on archives, it expands them. 2008-06-10 Ian Beckwith * Update to gnulib 20080610 commit 765ede78 (fixes strcasestr configure test hang). * gitaction: + unzip: use -l instead of -v. + try rar as well as unrar for *.rar|*.cbr. 2008-05-27 Ian Beckwith * Update to gnulib 20080527 commit 9c504099. * gitaction: Don't prompt for keypress after running MacOS open(1). 2008-05-18 Ian Beckwith * Add apropos command (^X^A) for key-binding search. * Change GIT_ env vars to GNUIT_ (eg GNUIT_PAGER). Fall back to old names for backwards compatibility. * Use mkstemp() for temporary files. * Update to gnulib 20080512 commit 6ea7ea7. * Fix make distcheck: remove absolute-header.m4 from EXTRA_DIST. 2008-05-07 Ian Beckwith * rewrote gitaction, adding more file types and viewers. 2008-04-13 Ian Beckwith * bumped version to 4.9.4 * Thanks to Tudor Hulubei for reporting the following: + Use base 1024 when autoscaling file sizes. + Fix sorting by filesize. + Fix current file size display at bottom when no files are selected. + Fix input in incremental-search (^S) mode. + Manually append "B" suffix to sizes in panel info/size display. + Clear screen before restoring, in case restore fails. + gitaction: MacOS: try and run open(1) first on non-textfiles. 2008-03-29 Ian Beckwith * configure.ac: add AC_SYS_LARGEFILE to fix 64bit IO on 32 bit systems. * Remove obsolete files during install (eg $(datadir)/.gitrc.common). * Handle config file lines consisting solely of a comment. * README: added note about dependencies. * Thanks to Michael Cook for the above suggestions/reports. * gitaction: added more viewers. * Changed address for bug reports to gnuit-dev@gnu.org. * gnuitrc.*: fix comment 2008-02-26 Ian Beckwith * Updated gnulib to 20080214 commit 501a61c5. * Added license notices to many files. * gitfm: + Scale file sizes to fit available space. + New panel minor mode AbbrevSize (accessed with escape-e-S) Always scale file sizes (to eg 123M). + panel_update_size: always scale (human_autoscale|human_SI|human_B). * New config variables: GroupDigits, MaxUnscaledDigits. * gnuit.texinfo + fixed typos (Thanks to Ralf Wildenhues). + Documented gitfm changes. * README: fixed more references to git (Thanks to MJ Ray). * gitaction: fall back to open (on mac), see, metamail and finally $GIT_PAGER. * gnuitrc.common.IN: add "-k" to du invocation. * Made scripts in src/ executable. * git.transition: tweak text. * Thanks to Tudor Hulubei for many useful suggestions. 2008-01-23 Ian Beckwith * Updated gnulib to 20080123 commit 16c6ed60fb (including MacOS putenv fix). * gitfm/gitps/gitview/gitwhich: add program_name global for lib/error.c. * Include m4/utimes.m4 in EXTRA_DIST. * Added license notices to files in term/. 2008-01-22 Ian Beckwith * Release gnuit 4.9.2. 2008-01-21 Ian Beckwith * Rewrite panel_beautify_number to use human_readable() from gnulib. * Call panel_beautify_number in more places. 2008-01-03 Ian Beckwith * gitps.c: add horizontal scroll (ESC-g & ESC-J). 2007-11-28 Ian Beckwith * git.c: Fallback to PAGER if GIT_PAGER is not set. * improve mail checking: + title.c: read and parse $MAIL, then reset access time. + import utime from gnulib. * src/Makefile.am: if --enable-debian is set. set *_LDFLAGS to "-Wl,-z,defs -Wl,--as-needed". I gather this is not yet portable enough for general use. While I could test for it in configure, it is hard to test it works *and* is bug free. * gitaction: run info on *.info.{gz,bz2}. 2007-11-15 Ian Beckwith * gitps.c: handle cygwin ps output, add more error checking. * README: Document the need to set CYGWIN=tty under cygwin. 2007-10-22 Ian Beckwith * Relicensed code to GPL version 3, git.texinfo to GFDL 1.2 with no invariant sections, no front cover texts and no back cover texts. * Updated to latest gnulib, also import nanosleep. 2007-10-20 Ian Beckwith * Bumped version to 4.9.2 * gitps.c,term/gnuitrc.*.in: added RefreshAfterKill variable (Default: ON), to autorefresh after signalling a process. * gitps.c: remove bogus code from kill_process(). * */ChangeLog: added note to look here instead. * Renamed texinfo, info, html and spec files to gnuit. * Removed unused file 'version' 2007-10-19 Ian Beckwith * Renamed package to gnuit. * Renamed term/gitrc.* to gnuitrc.* 2007-10-03 Ian Beckwith * Manually expand variables in gitrc.common.IN (sed in Makefile.am), otherwise they get expanded to (eg) $(prefix)/share/doc/gnu-interactive-tools. * gitps: + Added SIGSTKFLT to supported signals. + Added numbers as key bindings to select signals. 2007-10-01 Ian Beckwith * Remove leading dot from system copy of config files. * Portability fixes (freebsd, amd64). * tilde.[ch] and history.[ch] were not getting included when needed. Autotools weirdness, I suspect gnulib. Moved them back to src/ and now use them unconditionally. 2007-09-30 Ian Beckwith * add --enable-debian flag to set defaults for debian (sensible-browser, etc). * merged debian manpages (gitps, gitview, gitwipe, etc) upstream. * merged Bruce Sass's patches for manipulating .deb files * Updated RPM spec file. Warning: untested. * Remove CVS $Id$ tags as we are now using git. 2007-09-29 Ian Beckwith * renamed package to gnu-interactive-tools. * added missing tty_end_cursorapp() calls. * dont wrap tty mode in tty_{start,end}cursorapp(), it leaves the cursor bold when we exit in xterm. * src/panel.c(panel_compare_files): handle special files. 2007-09-28 Ian Beckwith * updated config.{guess,sub}. * added .gitignore (that's git the vcs). 2006-10-21 Ian Beckwith * src/tty.c(tty_put/get_screen): fix to work with > 8 vcs. * use ti/te codes which save/restore screen under xterm. 2006-10-19 Ian Beckwith * added setlocale calls to gitps and gitview. * set version to 4.9.1. * converted all .gitrc to .gitrc.*.in to pick up version in comment. * replaced xid.c with gnulib idcache. 2006-10-18 Ian Beckwith * check if copy/mv/rm/command aborted by signal. * removed -traditional from warning flags. * fixed remaining warnings in src/. 2006-10-17 Ian Beckwith * src/title.c: added mail checking to title. 2006-10-16 Ian Beckwith * src/git.c: Initial setlocale support. * add rxvt-unicode to color xterms. 2006-10-07 Ian Beckwith * src/panel.c: fix copying symlinks. 2006-10-06 Ian Beckwith * freebsd fixes + AM_MAINTAINER_MODE. * only define _LARGEFILE64_SOURCE if not already defined. * use texi2html for html docs but fall back on makeinfo. 2006-10-04 Ian Beckwith * configure.ac: add --enable-transition option. * */Makefile.am: DESTDIR fixes. 2006-10-03 Ian Beckwith * INSTALL: updated. * mkinstalldirs, update-gnulib: removed (use prepare instead). * added cygwin as ansi term. * src/gitview.c: fix warning. 2006-10-02 Ian Beckwith * work round autotools stubbornness: put tilde and history in lib/, patch lib/Makefile.am to include them in EXTRA_DIST with lib-Makefile.am.patch. * configure.ac: deprecate termcap and look for ncursesw * src/xmalloc.c: call abort() in xalloc_die to silence gcc warning 2006-10-01 Ian Beckwith * configure.ac: bumped AC_PREREQ to 2.59 for gnulib. * converted as much as possible to use gnulib. * src/inputline.c: fix inputline to use GITFM-Setup. 2006-09-30 Ian Beckwith * removed config.h.{top,bot} - now in configure.ac. 2001-06-02 Tudor Hulubei * panel.c: Added support for displaying file sizes >2Gb. 2000-05-07 Tudor Hulubei * configure.in: Added support for detecting the 64bit I/O support in Linux/glibc. 1999-10-07 Tudor Hulubei * doc/texinfo.tex: Updated to version 1999-10-01.07. 1999-10-01 Tudor Hulubei * configure.in: Added `-ansi' when --enable-gcc-warnings is given. 1999-05-11 Tudor Hulubei * configure.in (--enable-smp): New option (Linux only). If given, make will attempt to spawn a number of compilations equal to the number of processors + 1. 1999-04-25 Tudor Hulubei * git.spec.in: Updated to reflect the new directory structure. * The entire configuration system has been changed to use automake. 1998-03-05 Tudor Hulubei * Makefile.in (ps): New rule. 1997-09-27 Tudor Hulubei * config.h.in: Added NDEBUG. 1997-09-16 Tudor Hulubei * configure.in (efence): Added --enable-efence. Sat Jan 4 17:45:35 1997 Tudor Hulubei * configure.in (HOST): Bug fix: $host_os is `linux-gnu' now. Mon Dec 2 19:32:31 1996 Tudor Hulubei * configure.in: Added code after AC_OUTPUT() to create hard links to the prefix file. * configure.in: Regenerated with autoconf 2.12. Fri Nov 22 17:10:49 1996 Tudor Hulubei * Makefile.in (prefix-change): Rule to take care of prefix changes. Sat Nov 9 21:42:29 1996 Tudor Hulubei * configure.in: Now checks for off_t as well. Sun Oct 13 14:26:09 1996 Tudor Hulubei * git.spec: New file. RPM package specification. * Makefile.in (distdone): Corrected permissions. * configure.in (HOST): HAVE_HPUX test removed. The `cut' utility should not be used in configure as it appears to be missing on some systems (m68k-next-nextstep3). Tue Sep 24 02:05:34 1996 Tudor Hulubei * config.guess: Added support for AT&T 3B2 systems, thanks to Gaylen Miller. * configure.in: -Wall is no longer automatically appended to CFLAGS when gcc is detected. Use --enable-gcc-warnings to get the complete set of warnings. * configure.in: Added a check for the presence of the sys/wait.h header file. Gaylen Miller reported that this header is missing on the AT&T 3B2 systems (we32k-att-sysv3). Wed Aug 21 11:20:40 1996 Tudor Hulubei * version.h.in: TERMDIR removed and appended to DEFS. This way make prefix=... will no longer fail. Thu Jun 6 10:21:38 1996 Tudor Hulubei * Makefile.in: install_strip renamed to install-strip. install now depends on all and on install-only. gnuit-4.9.5/prepare0000755000175000017500000000152211146671376011200 00000000000000#! /bin/sh # Prepare a freshly checked out copy of # the CVS tree for compilation. AMFLAGS= if [ "$1" = "-a" ] then ../../gnulib/gnulib/gnulib-tool --import fnmatch fnmatch-gnu fsusage getopt human idcache mbsstr mkstemp nanosleep putenv readlink rename strcase strcasestr utime xalloc; echo -n . # gnulib-tool --update; echo -n . # patch -p0 < lib-Makefile.am.patch ; echo -n . AMFLAGS="--add-missing --force-missing --copy" fi cp .gitignore .gitignore.gnulib-backup rm -rf autom4te.cache config.cache; echo -n "." #libtoolize --automake --copy --force && echo -n "." autoheader && echo -n "." aclocal -I m4 && echo -n "." && automake --foreign $AMFLAGS && echo -n "." && autoconf && echo -n "." && rm -rf autom4te.cache config.cache `find lib m4 -name .gitignore` ; echo -n "." mv .gitignore.gnulib-backup .gitignore echo " done" gnuit-4.9.5/Makefile.in0000644000175000017500000010625711146671375011673 00000000000000# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 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@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = . 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 = : build_triplet = @build@ host_triplet = @host@ DIST_COMMON = README $(am__configure_deps) $(srcdir)/LSM.in \ $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(srcdir)/config.h.in $(srcdir)/gnuit.spec.in \ $(srcdir)/version.h.in $(top_srcdir)/configure AUTHORS COPYING \ ChangeLog INSTALL NEWS compile config.guess config.sub depcomp \ install-sh missing subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \ $(top_srcdir)/m4/alloca.m4 $(top_srcdir)/m4/argmatch.m4 \ $(top_srcdir)/m4/clock_time.m4 $(top_srcdir)/m4/codeset.m4 \ $(top_srcdir)/m4/dirname.m4 $(top_srcdir)/m4/dos.m4 \ $(top_srcdir)/m4/double-slash-root.m4 \ $(top_srcdir)/m4/eealloc.m4 $(top_srcdir)/m4/errno_h.m4 \ $(top_srcdir)/m4/error.m4 $(top_srcdir)/m4/exitfail.m4 \ $(top_srcdir)/m4/extensions.m4 $(top_srcdir)/m4/fcntl_h.m4 \ $(top_srcdir)/m4/flexmember.m4 $(top_srcdir)/m4/fnmatch.m4 \ $(top_srcdir)/m4/fsusage.m4 $(top_srcdir)/m4/getopt.m4 \ $(top_srcdir)/m4/gettime.m4 $(top_srcdir)/m4/gettimeofday.m4 \ $(top_srcdir)/m4/glibc21.m4 $(top_srcdir)/m4/gnulib-common.m4 \ $(top_srcdir)/m4/gnulib-comp.m4 $(top_srcdir)/m4/human.m4 \ $(top_srcdir)/m4/idcache.m4 $(top_srcdir)/m4/include_next.m4 \ $(top_srcdir)/m4/inline.m4 $(top_srcdir)/m4/inttypes-pri.m4 \ $(top_srcdir)/m4/inttypes.m4 $(top_srcdir)/m4/localcharset.m4 \ $(top_srcdir)/m4/locale-fr.m4 $(top_srcdir)/m4/locale-ja.m4 \ $(top_srcdir)/m4/locale-zh.m4 $(top_srcdir)/m4/longlong.m4 \ $(top_srcdir)/m4/lstat.m4 $(top_srcdir)/m4/malloc.m4 \ $(top_srcdir)/m4/malloca.m4 $(top_srcdir)/m4/mbchar.m4 \ $(top_srcdir)/m4/mbiter.m4 $(top_srcdir)/m4/mbrtowc.m4 \ $(top_srcdir)/m4/mbsinit.m4 $(top_srcdir)/m4/mbslen.m4 \ $(top_srcdir)/m4/mbsstr.m4 $(top_srcdir)/m4/mbstate_t.m4 \ $(top_srcdir)/m4/memmove.m4 $(top_srcdir)/m4/mkstemp.m4 \ $(top_srcdir)/m4/multiarch.m4 $(top_srcdir)/m4/nanosleep.m4 \ $(top_srcdir)/m4/onceonly.m4 $(top_srcdir)/m4/open.m4 \ $(top_srcdir)/m4/putenv.m4 $(top_srcdir)/m4/quote.m4 \ $(top_srcdir)/m4/quotearg.m4 $(top_srcdir)/m4/readlink.m4 \ $(top_srcdir)/m4/rename.m4 $(top_srcdir)/m4/safe-read.m4 \ $(top_srcdir)/m4/safe-write.m4 $(top_srcdir)/m4/sigaction.m4 \ $(top_srcdir)/m4/signal_h.m4 \ $(top_srcdir)/m4/signalblocking.m4 $(top_srcdir)/m4/ssize_t.m4 \ $(top_srcdir)/m4/stdbool.m4 $(top_srcdir)/m4/stdint.m4 \ $(top_srcdir)/m4/stdlib_h.m4 $(top_srcdir)/m4/strcase.m4 \ $(top_srcdir)/m4/strcasestr.m4 $(top_srcdir)/m4/strerror.m4 \ $(top_srcdir)/m4/string_h.m4 $(top_srcdir)/m4/strings_h.m4 \ $(top_srcdir)/m4/strndup.m4 $(top_srcdir)/m4/strnlen.m4 \ $(top_srcdir)/m4/strtoimax.m4 $(top_srcdir)/m4/strtol.m4 \ $(top_srcdir)/m4/strtoll.m4 $(top_srcdir)/m4/strtoul.m4 \ $(top_srcdir)/m4/strtoull.m4 $(top_srcdir)/m4/strtoumax.m4 \ $(top_srcdir)/m4/sys_select_h.m4 \ $(top_srcdir)/m4/sys_socket_h.m4 \ $(top_srcdir)/m4/sys_stat_h.m4 $(top_srcdir)/m4/sys_time_h.m4 \ $(top_srcdir)/m4/tempname.m4 $(top_srcdir)/m4/time_h.m4 \ $(top_srcdir)/m4/timespec.m4 $(top_srcdir)/m4/unistd_h.m4 \ $(top_srcdir)/m4/utimbuf.m4 $(top_srcdir)/m4/utime.m4 \ $(top_srcdir)/m4/utimes-null.m4 $(top_srcdir)/m4/wchar.m4 \ $(top_srcdir)/m4/wchar_t.m4 $(top_srcdir)/m4/wctype.m4 \ $(top_srcdir)/m4/wcwidth.m4 $(top_srcdir)/m4/wint_t.m4 \ $(top_srcdir)/m4/write.m4 $(top_srcdir)/m4/xalloc.m4 \ $(top_srcdir)/m4/xstrndup.m4 $(top_srcdir)/m4/xstrtol.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno configure.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_HEADER = config.h SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-exec-recursive install-info-recursive \ install-recursive installcheck-recursive installdirs-recursive \ pdf-recursive ps-recursive uninstall-info-recursive \ uninstall-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 INSTALL = @INSTALL@ ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ ALLOCA_H = @ALLOCA_H@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BITSIZEOF_PTRDIFF_T = @BITSIZEOF_PTRDIFF_T@ BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@ BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@ BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@ BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CLEANFILES = @CLEANFILES@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEBIAN_FALSE = @DEBIAN_FALSE@ DEBIAN_TRUE = @DEBIAN_TRUE@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EMULTIHOP_HIDDEN = @EMULTIHOP_HIDDEN@ EMULTIHOP_VALUE = @EMULTIHOP_VALUE@ ENOLINK_HIDDEN = @ENOLINK_HIDDEN@ ENOLINK_VALUE = @ENOLINK_VALUE@ EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@ EOVERFLOW_VALUE = @EOVERFLOW_VALUE@ ERRNO_H = @ERRNO_H@ EXEEXT = @EXEEXT@ FCNTL_H = @FCNTL_H@ FNMATCH_H = @FNMATCH_H@ GETOPT_H = @GETOPT_H@ GLIBC21 = @GLIBC21@ GL_COND_LIBTOOL_FALSE = @GL_COND_LIBTOOL_FALSE@ GL_COND_LIBTOOL_TRUE = @GL_COND_LIBTOOL_TRUE@ GNULIB_ACCEPT = @GNULIB_ACCEPT@ GNULIB_ATOLL = @GNULIB_ATOLL@ GNULIB_BIND = @GNULIB_BIND@ GNULIB_BTOWC = @GNULIB_BTOWC@ GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@ GNULIB_CHOWN = @GNULIB_CHOWN@ GNULIB_CLOSE = @GNULIB_CLOSE@ GNULIB_CONNECT = @GNULIB_CONNECT@ GNULIB_DUP2 = @GNULIB_DUP2@ GNULIB_ENVIRON = @GNULIB_ENVIRON@ GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@ GNULIB_FCHDIR = @GNULIB_FCHDIR@ GNULIB_FSYNC = @GNULIB_FSYNC@ GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@ GNULIB_GETCWD = @GNULIB_GETCWD@ GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@ GNULIB_GETDTABLESIZE = @GNULIB_GETDTABLESIZE@ GNULIB_GETHOSTNAME = @GNULIB_GETHOSTNAME@ GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@ GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@ GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@ GNULIB_GETPEERNAME = @GNULIB_GETPEERNAME@ GNULIB_GETSOCKNAME = @GNULIB_GETSOCKNAME@ GNULIB_GETSOCKOPT = @GNULIB_GETSOCKOPT@ GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@ GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@ GNULIB_IMAXABS = @GNULIB_IMAXABS@ GNULIB_IMAXDIV = @GNULIB_IMAXDIV@ GNULIB_LCHMOD = @GNULIB_LCHMOD@ GNULIB_LCHOWN = @GNULIB_LCHOWN@ GNULIB_LINK = @GNULIB_LINK@ GNULIB_LISTEN = @GNULIB_LISTEN@ GNULIB_LSEEK = @GNULIB_LSEEK@ GNULIB_LSTAT = @GNULIB_LSTAT@ GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@ GNULIB_MBRLEN = @GNULIB_MBRLEN@ GNULIB_MBRTOWC = @GNULIB_MBRTOWC@ GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@ GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@ GNULIB_MBSCHR = @GNULIB_MBSCHR@ GNULIB_MBSCSPN = @GNULIB_MBSCSPN@ GNULIB_MBSINIT = @GNULIB_MBSINIT@ GNULIB_MBSLEN = @GNULIB_MBSLEN@ GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@ GNULIB_MBSNLEN = @GNULIB_MBSNLEN@ GNULIB_MBSNRTOWCS = @GNULIB_MBSNRTOWCS@ GNULIB_MBSPBRK = @GNULIB_MBSPBRK@ GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@ GNULIB_MBSRCHR = @GNULIB_MBSRCHR@ GNULIB_MBSRTOWCS = @GNULIB_MBSRTOWCS@ GNULIB_MBSSEP = @GNULIB_MBSSEP@ GNULIB_MBSSPN = @GNULIB_MBSSPN@ GNULIB_MBSSTR = @GNULIB_MBSSTR@ GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@ GNULIB_MEMMEM = @GNULIB_MEMMEM@ GNULIB_MEMPCPY = @GNULIB_MEMPCPY@ GNULIB_MEMRCHR = @GNULIB_MEMRCHR@ GNULIB_MKDTEMP = @GNULIB_MKDTEMP@ GNULIB_MKSTEMP = @GNULIB_MKSTEMP@ GNULIB_OPEN = @GNULIB_OPEN@ GNULIB_PUTENV = @GNULIB_PUTENV@ GNULIB_RANDOM_R = @GNULIB_RANDOM_R@ GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@ GNULIB_READLINK = @GNULIB_READLINK@ GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@ GNULIB_RECV = @GNULIB_RECV@ GNULIB_RECVFROM = @GNULIB_RECVFROM@ GNULIB_RPMATCH = @GNULIB_RPMATCH@ GNULIB_SELECT = @GNULIB_SELECT@ GNULIB_SEND = @GNULIB_SEND@ GNULIB_SENDTO = @GNULIB_SENDTO@ GNULIB_SETENV = @GNULIB_SETENV@ GNULIB_SETSOCKOPT = @GNULIB_SETSOCKOPT@ GNULIB_SHUTDOWN = @GNULIB_SHUTDOWN@ GNULIB_SIGACTION = @GNULIB_SIGACTION@ GNULIB_SIGNAL_H_SIGPIPE = @GNULIB_SIGNAL_H_SIGPIPE@ GNULIB_SIGPROCMASK = @GNULIB_SIGPROCMASK@ GNULIB_SLEEP = @GNULIB_SLEEP@ GNULIB_SOCKET = @GNULIB_SOCKET@ GNULIB_STPCPY = @GNULIB_STPCPY@ GNULIB_STPNCPY = @GNULIB_STPNCPY@ GNULIB_STRCASESTR = @GNULIB_STRCASESTR@ GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@ GNULIB_STRDUP = @GNULIB_STRDUP@ GNULIB_STRERROR = @GNULIB_STRERROR@ GNULIB_STRNDUP = @GNULIB_STRNDUP@ GNULIB_STRNLEN = @GNULIB_STRNLEN@ GNULIB_STRPBRK = @GNULIB_STRPBRK@ GNULIB_STRSEP = @GNULIB_STRSEP@ GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@ GNULIB_STRSTR = @GNULIB_STRSTR@ GNULIB_STRTOD = @GNULIB_STRTOD@ GNULIB_STRTOIMAX = @GNULIB_STRTOIMAX@ GNULIB_STRTOK_R = @GNULIB_STRTOK_R@ GNULIB_STRTOLL = @GNULIB_STRTOLL@ GNULIB_STRTOULL = @GNULIB_STRTOULL@ GNULIB_STRTOUMAX = @GNULIB_STRTOUMAX@ GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@ GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@ GNULIB_UNSETENV = @GNULIB_UNSETENV@ GNULIB_WCRTOMB = @GNULIB_WCRTOMB@ GNULIB_WCSNRTOMBS = @GNULIB_WCSNRTOMBS@ GNULIB_WCSRTOMBS = @GNULIB_WCSRTOMBS@ GNULIB_WCTOB = @GNULIB_WCTOB@ GNULIB_WCWIDTH = @GNULIB_WCWIDTH@ GNULIB_WRITE = @GNULIB_WRITE@ GREP = @GREP@ HAVE_ATOLL = @HAVE_ATOLL@ HAVE_BTOWC = @HAVE_BTOWC@ HAVE_CALLOC_POSIX = @HAVE_CALLOC_POSIX@ HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@ HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@ HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@ HAVE_DECL_IMAXABS = @HAVE_DECL_IMAXABS@ HAVE_DECL_IMAXDIV = @HAVE_DECL_IMAXDIV@ HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@ HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@ HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@ HAVE_DECL_STRERROR = @HAVE_DECL_STRERROR@ HAVE_DECL_STRNCASECMP = @HAVE_DECL_STRNCASECMP@ HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@ HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@ HAVE_DECL_STRSIGNAL = @HAVE_DECL_STRSIGNAL@ HAVE_DECL_STRTOIMAX = @HAVE_DECL_STRTOIMAX@ HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@ HAVE_DECL_STRTOUMAX = @HAVE_DECL_STRTOUMAX@ HAVE_DECL_WCTOB = @HAVE_DECL_WCTOB@ HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@ HAVE_DUP2 = @HAVE_DUP2@ HAVE_EUIDACCESS = @HAVE_EUIDACCESS@ HAVE_FSYNC = @HAVE_FSYNC@ HAVE_FTRUNCATE = @HAVE_FTRUNCATE@ HAVE_GETDOMAINNAME = @HAVE_GETDOMAINNAME@ HAVE_GETDTABLESIZE = @HAVE_GETDTABLESIZE@ HAVE_GETHOSTNAME = @HAVE_GETHOSTNAME@ HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@ HAVE_GETSUBOPT = @HAVE_GETSUBOPT@ HAVE_GETUSERSHELL = @HAVE_GETUSERSHELL@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_ISWCNTRL = @HAVE_ISWCNTRL@ HAVE_LCHMOD = @HAVE_LCHMOD@ HAVE_LINK = @HAVE_LINK@ HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@ HAVE_LSTAT = @HAVE_LSTAT@ HAVE_MALLOC_POSIX = @HAVE_MALLOC_POSIX@ HAVE_MBRLEN = @HAVE_MBRLEN@ HAVE_MBRTOWC = @HAVE_MBRTOWC@ HAVE_MBSINIT = @HAVE_MBSINIT@ HAVE_MBSNRTOWCS = @HAVE_MBSNRTOWCS@ HAVE_MBSRTOWCS = @HAVE_MBSRTOWCS@ HAVE_MEMPCPY = @HAVE_MEMPCPY@ HAVE_MKDTEMP = @HAVE_MKDTEMP@ HAVE_OS_H = @HAVE_OS_H@ HAVE_POSIX_SIGNALBLOCKING = @HAVE_POSIX_SIGNALBLOCKING@ HAVE_RANDOM_H = @HAVE_RANDOM_H@ HAVE_RANDOM_R = @HAVE_RANDOM_R@ HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@ HAVE_READLINK = @HAVE_READLINK@ HAVE_REALLOC_POSIX = @HAVE_REALLOC_POSIX@ HAVE_RPMATCH = @HAVE_RPMATCH@ HAVE_SETENV = @HAVE_SETENV@ HAVE_SIGACTION = @HAVE_SIGACTION@ HAVE_SIGINFO_T = @HAVE_SIGINFO_T@ HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@ HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@ HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@ HAVE_SIGSET_T = @HAVE_SIGSET_T@ HAVE_SLEEP = @HAVE_SLEEP@ HAVE_STDINT_H = @HAVE_STDINT_H@ HAVE_STPCPY = @HAVE_STPCPY@ HAVE_STPNCPY = @HAVE_STPNCPY@ HAVE_STRCASECMP = @HAVE_STRCASECMP@ HAVE_STRCASESTR = @HAVE_STRCASESTR@ HAVE_STRCHRNUL = @HAVE_STRCHRNUL@ HAVE_STRNDUP = @HAVE_STRNDUP@ HAVE_STRPBRK = @HAVE_STRPBRK@ HAVE_STRSEP = @HAVE_STRSEP@ HAVE_STRTOD = @HAVE_STRTOD@ HAVE_STRTOLL = @HAVE_STRTOLL@ HAVE_STRTOULL = @HAVE_STRTOULL@ HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@ HAVE_STRUCT_SIGACTION_SA_SIGACTION = @HAVE_STRUCT_SIGACTION_SA_SIGACTION@ HAVE_STRUCT_TIMEVAL = @HAVE_STRUCT_TIMEVAL@ HAVE_STRVERSCMP = @HAVE_STRVERSCMP@ HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@ HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@ HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@ HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@ HAVE_SYS_SELECT_H = @HAVE_SYS_SELECT_H@ HAVE_SYS_SOCKET_H = @HAVE_SYS_SOCKET_H@ HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ HAVE_UNISTD_H = @HAVE_UNISTD_H@ HAVE_UNSETENV = @HAVE_UNSETENV@ HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@ HAVE_WCHAR_H = @HAVE_WCHAR_H@ HAVE_WCRTOMB = @HAVE_WCRTOMB@ HAVE_WCSNRTOMBS = @HAVE_WCSNRTOMBS@ HAVE_WCSRTOMBS = @HAVE_WCSRTOMBS@ HAVE_WCTYPE_H = @HAVE_WCTYPE_H@ HAVE_WINSOCK2_H = @HAVE_WINSOCK2_H@ HAVE_WINT_T = @HAVE_WINT_T@ HAVE_WS2TCPIP_H = @HAVE_WS2TCPIP_H@ HAVE__BOOL = @HAVE__BOOL@ HOST = @HOST@ HTMLDOCS_MAKEINFO_FALSE = @HTMLDOCS_MAKEINFO_FALSE@ HTMLDOCS_MAKEINFO_TRUE = @HTMLDOCS_MAKEINFO_TRUE@ HTMLDOCS_TEXI2HTML_FALSE = @HTMLDOCS_TEXI2HTML_FALSE@ HTMLDOCS_TEXI2HTML_TRUE = @HTMLDOCS_TEXI2HTML_TRUE@ INCLUDES = @INCLUDES@ INCLUDE_NEXT = @INCLUDE_NEXT@ INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INT32_MAX_LT_INTMAX_MAX = @INT32_MAX_LT_INTMAX_MAX@ INT64_MAX_EQ_LONG_MAX = @INT64_MAX_EQ_LONG_MAX@ INTTYPES_H = @INTTYPES_H@ LDFLAGS = @LDFLAGS@ LIBGNU_LIBDEPS = @LIBGNU_LIBDEPS@ LIBGNU_LTLIBDEPS = @LIBGNU_LTLIBDEPS@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@ LIB_NANOSLEEP = @LIB_NANOSLEEP@ LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@ LOCALE_FR_UTF8 = @LOCALE_FR_UTF8@ LOCALE_JA = @LOCALE_JA@ LOCALE_ZH_CN = @LOCALE_ZH_CN@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAKE = @MAKE@ MAKEINFO = @MAKEINFO@ NEXT_ERRNO_H = @NEXT_ERRNO_H@ NEXT_FCNTL_H = @NEXT_FCNTL_H@ NEXT_INTTYPES_H = @NEXT_INTTYPES_H@ NEXT_SIGNAL_H = @NEXT_SIGNAL_H@ NEXT_STDINT_H = @NEXT_STDINT_H@ NEXT_STDLIB_H = @NEXT_STDLIB_H@ NEXT_STRINGS_H = @NEXT_STRINGS_H@ NEXT_STRING_H = @NEXT_STRING_H@ NEXT_SYS_SELECT_H = @NEXT_SYS_SELECT_H@ NEXT_SYS_SOCKET_H = @NEXT_SYS_SOCKET_H@ NEXT_SYS_STAT_H = @NEXT_SYS_STAT_H@ NEXT_SYS_TIME_H = @NEXT_SYS_TIME_H@ NEXT_TIME_H = @NEXT_TIME_H@ NEXT_UNISTD_H = @NEXT_UNISTD_H@ NEXT_WCHAR_H = @NEXT_WCHAR_H@ NEXT_WCTYPE_H = @NEXT_WCTYPE_H@ 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@ PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@ PRIPTR_PREFIX = @PRIPTR_PREFIX@ PRI_MACROS_BROKEN = @PRI_MACROS_BROKEN@ PRODUCT = @PRODUCT@ PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@ RANLIB = @RANLIB@ REPLACE_BTOWC = @REPLACE_BTOWC@ REPLACE_CHOWN = @REPLACE_CHOWN@ REPLACE_CLOSE = @REPLACE_CLOSE@ REPLACE_FCHDIR = @REPLACE_FCHDIR@ REPLACE_GETCWD = @REPLACE_GETCWD@ REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@ REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@ REPLACE_ISWCNTRL = @REPLACE_ISWCNTRL@ REPLACE_LCHOWN = @REPLACE_LCHOWN@ REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@ REPLACE_LSEEK = @REPLACE_LSEEK@ REPLACE_LSTAT = @REPLACE_LSTAT@ REPLACE_MBRLEN = @REPLACE_MBRLEN@ REPLACE_MBRTOWC = @REPLACE_MBRTOWC@ REPLACE_MBSINIT = @REPLACE_MBSINIT@ REPLACE_MBSNRTOWCS = @REPLACE_MBSNRTOWCS@ REPLACE_MBSRTOWCS = @REPLACE_MBSRTOWCS@ REPLACE_MBSTATE_T = @REPLACE_MBSTATE_T@ REPLACE_MEMMEM = @REPLACE_MEMMEM@ REPLACE_MKDIR = @REPLACE_MKDIR@ REPLACE_MKSTEMP = @REPLACE_MKSTEMP@ REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@ REPLACE_OPEN = @REPLACE_OPEN@ REPLACE_PUTENV = @REPLACE_PUTENV@ REPLACE_STRCASESTR = @REPLACE_STRCASESTR@ REPLACE_STRDUP = @REPLACE_STRDUP@ REPLACE_STRERROR = @REPLACE_STRERROR@ REPLACE_STRPTIME = @REPLACE_STRPTIME@ REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@ REPLACE_STRSTR = @REPLACE_STRSTR@ REPLACE_STRTOD = @REPLACE_STRTOD@ REPLACE_TIMEGM = @REPLACE_TIMEGM@ REPLACE_WCRTOMB = @REPLACE_WCRTOMB@ REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@ REPLACE_WCTOB = @REPLACE_WCTOB@ REPLACE_WCWIDTH = @REPLACE_WCWIDTH@ REPLACE_WRITE = @REPLACE_WRITE@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@ SIZE_T_SUFFIX = @SIZE_T_SUFFIX@ STDBOOL_H = @STDBOOL_H@ STDINT_H = @STDINT_H@ STRIP = @STRIP@ SYS_SELECT_H = @SYS_SELECT_H@ SYS_SOCKET_H = @SYS_SOCKET_H@ SYS_STAT_H = @SYS_STAT_H@ SYS_TIME_H = @SYS_TIME_H@ SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ TEXI2DVI = @TEXI2DVI@ TEXI2HTML = @TEXI2HTML@ TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@ TRANSITION_FALSE = @TRANSITION_FALSE@ TRANSITION_TRUE = @TRANSITION_TRUE@ UINT32_MAX_LT_UINTMAX_MAX = @UINT32_MAX_LT_UINTMAX_MAX@ UINT64_MAX_EQ_ULONG_MAX = @UINT64_MAX_EQ_ULONG_MAX@ UNISTD_H_HAVE_WINSOCK2_H = @UNISTD_H_HAVE_WINSOCK2_H@ VERSION = @VERSION@ VOID_UNSETENV = @VOID_UNSETENV@ WCHAR_H = @WCHAR_H@ WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@ WCTYPE_H = @WCTYPE_H@ WINT_T_SUFFIX = @WINT_T_SUFFIX@ ac_ct_CC = @ac_ct_CC@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ 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 = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ gl_LIBOBJS = @gl_LIBOBJS@ gl_LTLIBOBJS = @gl_LTLIBOBJS@ gltests_LIBOBJS = @gltests_LIBOBJS@ gltests_LTLIBOBJS = @gltests_LTLIBOBJS@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ 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@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ AUTOMAKE_OPTIONS = 1.9 EXTRA_DIST = PLATFORMS PROBLEMS LSM.in version.h.in\ gnuit.spec.in mkvcs prepare \ m4/gnulib-tool.m4 m4/gnulib-cache.m4 \ m4/gnulib-common.m4 m4/utimes.m4 m4/sockpfaf.m4 \ LSM gnuit.spec .gitignore CONFIG_CLEAN_FILES = version.h distcleancheck_listfiles = find -type f -exec sh -c 'test -f $(srcdir)/{} || echo {}' ';' GIT_OBSOLETE = dpkg-help.txt .gitrc.aixterm .gitrc.ansi .gitrc.common \ .gitrc.generic .gitrc.hft .gitrc.hpterm .gitrc.linux \ .gitrc.linux-m .gitrc.mach .gitrc.minix .gitrc.thix \ .gitrc.vt100 .gitrc.vt102 .gitrc.xterm .gitrc.xterm-color \ .gitrc.Eterm .gitrc.console .gitrc.dtterm .gitrc.eterm \ .gitrc.hp .gitrc.iris-ansi .gitrc.iris-ansi-net \ .gitrc.pc3 .gitrc.rxvt .gitrc.screen .gitrc.sun \ .gitrc.sun-cmd .gitrc.vt125 .gitrc.vt200 .gitrc.vt201 \ .gitrc.vt220 .gitrc.vt240 .gitrc.vt300 .gitrc.vt320 \ .gitrc.vt400 .gitrc.vt420 .gitrc.xterm-debian \ .gitrc.xterms SUBDIRS = lib src term doc ACLOCAL_AMFLAGS = -I m4 all: config.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) --foreign '; \ cd $(srcdir) && $(AUTOMAKE) --foreign \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --foreign 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) config.h: stamp-h1 @if test ! -f $@; then \ rm -f stamp-h1; \ $(MAKE) stamp-h1; \ else :; fi stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status @rm -f stamp-h1 cd $(top_builddir) && $(SHELL) ./config.status config.h $(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_srcdir) && $(AUTOHEADER) rm -f stamp-h1 touch $@ distclean-hdr: -rm -f config.h stamp-h1 version.h: $(top_builddir)/config.status $(srcdir)/version.h.in cd $(top_builddir) && $(SHELL) ./config.status $@ gnuit.spec: $(top_builddir)/config.status $(srcdir)/gnuit.spec.in cd $(top_builddir) && $(SHELL) ./config.status $@ LSM: $(top_builddir)/config.status $(srcdir)/LSM.in cd $(top_builddir) && $(SHELL) ./config.status $@ uninstall-info-am: # 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" mostlyclean-recursive clean-recursive distclean-recursive \ maintainer-clean-recursive: @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) config.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) config.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) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) config.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) mkdir $(distdir) $(mkdir_p) $(distdir)/. $(distdir)/m4 $(distdir)/term @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ 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" \ distdir) \ || exit 1; \ fi; \ done $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$(top_distdir)" distdir="$(distdir)" \ dist-hook -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 $(SHELL) $(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 '1{h;s/./=/g;p;x;}' -e '$${p;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 config.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: -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." 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-tags dvi: dvi-recursive dvi-am: info: info-recursive info-am: install-data-am: @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) install-data-hook install-exec-am: install-info: install-info-recursive install-man: 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: uninstall-info-am uninstall-info: uninstall-info-recursive .PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am am--refresh check \ check-am clean clean-generic clean-recursive ctags \ ctags-recursive dist dist-all dist-bzip2 dist-gzip dist-hook \ dist-shar dist-tarZ dist-zip distcheck distclean \ distclean-generic distclean-hdr distclean-recursive \ distclean-tags distcleancheck distdir distuninstallcheck dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-data-hook install-exec \ install-exec-am install-info install-info-am install-man \ install-strip installcheck installcheck-am installdirs \ installdirs-am maintainer-clean maintainer-clean-generic \ maintainer-clean-recursive mostlyclean mostlyclean-generic \ mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \ uninstall uninstall-am uninstall-info-am html: cd doc && $(MAKE) html dist-hook: cp LSM gnuit.spec $(distdir) # clean up obsolete files, allow for locations with and without /share/ install-data-hook: for i in $(GIT_OBSOLETE); \ do\ if [ -e "$(DESTDIR)$(datadir)/git/$${i}" ]; then\ rm -f "$(DESTDIR)$(datadir)/git/$${i}" ];\ fi;\ done -rm -f $(DESTDIR)$(infodir)/git.info* >/dev/null 2>&1 -rm -f $(DESTDIR)$(prefix)/info/git.info* >/dev/null 2>&1 if [ -e "$(DESTDIR)$(htmldir)/git.html" ]; then \ rm -f "$(DESTDIR)$(htmldir)/git.html" ];\ fi if [ -e "$(DESTDIR)$(prefix)/doc/git.html" ]; then \ rm -f "$(DESTDIR)$(prefix)/doc/git.html" ];\ fi if [ -e "$(DESTDIR)$(prefix)/doc/git-4.3.20/git.html" ]; then \ rm -f "$(DESTDIR)$(prefix)/doc/git-4.3.20/git.html" ;\ rmdir "$(DESTDIR)${prefix}/doc/git-4.3.20" >/dev/null 2>&1 || true; \ fi rmdir "$(DESTDIR)$(datadir)/git" >/dev/null 2>&1 || true # 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: gnuit-4.9.5/aclocal.m40000644000175000017500000015361711146671375011470 00000000000000# generated automatically by aclocal 1.9.6 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 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. # 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. # po.m4 serial 15 (gettext-0.17) dnl Copyright (C) 1995-2007 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl dnl This file can can be used in projects which are not available under dnl the GNU General Public License or the GNU Library General Public dnl License but which still want to provide support for the GNU gettext dnl functionality. dnl Please note that the actual code of the GNU gettext library is covered dnl by the GNU Library General Public License, and the rest of the GNU dnl gettext package package is covered by the GNU General Public License. dnl They are *not* in the public domain. dnl Authors: dnl Ulrich Drepper , 1995-2000. dnl Bruno Haible , 2000-2003. AC_PREREQ(2.50) dnl Checks for all prerequisites of the po subdirectory. AC_DEFUN([AM_PO_SUBDIRS], [ AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake AC_REQUIRE([AM_NLS])dnl dnl Release version of the gettext macros. This is used to ensure that dnl the gettext macros and po/Makefile.in.in are in sync. AC_SUBST([GETTEXT_MACRO_VERSION], [0.17]) dnl Perform the following tests also if --disable-nls has been given, dnl because they are needed for "make dist" to work. dnl Search for GNU msgfmt in the PATH. dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions. dnl The second test excludes FreeBSD msgfmt. AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt, [$ac_dir/$ac_word --statistics /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 && (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)], :) AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) dnl Test whether it is GNU msgfmt >= 0.15. changequote(,)dnl case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;; *) MSGFMT_015=$MSGFMT ;; esac changequote([,])dnl AC_SUBST([MSGFMT_015]) changequote(,)dnl case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;; *) GMSGFMT_015=$GMSGFMT ;; esac changequote([,])dnl AC_SUBST([GMSGFMT_015]) dnl Search for GNU xgettext 0.12 or newer in the PATH. dnl The first test excludes Solaris xgettext and early GNU xgettext versions. dnl The second test excludes FreeBSD xgettext. AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, [$ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 && (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)], :) dnl Remove leftover from FreeBSD xgettext call. rm -f messages.po dnl Test whether it is GNU xgettext >= 0.15. changequote(,)dnl case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;; *) XGETTEXT_015=$XGETTEXT ;; esac changequote([,])dnl AC_SUBST([XGETTEXT_015]) dnl Search for GNU msgmerge 0.11 or newer in the PATH. AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge, [$ac_dir/$ac_word --update -q /dev/null /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1], :) dnl Installation directories. dnl Autoconf >= 2.60 defines localedir. For older versions of autoconf, we dnl have to define it here, so that it can be used in po/Makefile. test -n "$localedir" || localedir='${datadir}/locale' AC_SUBST([localedir]) dnl Support for AM_XGETTEXT_OPTION. test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS= AC_SUBST([XGETTEXT_EXTRA_OPTIONS]) AC_CONFIG_COMMANDS([po-directories], [[ for ac_file in $CONFIG_FILES; do # Support "outfile[:infile[:infile...]]" case "$ac_file" in *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; esac # PO directories have a Makefile.in generated from Makefile.in.in. case "$ac_file" in */Makefile.in) # Adjust a relative srcdir. ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`" ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` # In autoconf-2.13 it is called $ac_given_srcdir. # In autoconf-2.50 it is called $srcdir. test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir" case "$ac_given_srcdir" in .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;; /*) top_srcdir="$ac_given_srcdir" ;; *) top_srcdir="$ac_dots$ac_given_srcdir" ;; esac # Treat a directory as a PO directory if and only if it has a # POTFILES.in file. This allows packages to have multiple PO # directories under different names or in different locations. if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then rm -f "$ac_dir/POTFILES" test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES" cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES" POMAKEFILEDEPS="POTFILES.in" # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend # on $ac_dir but don't depend on user-specified configuration # parameters. if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then # The LINGUAS file contains the set of available languages. if test -n "$OBSOLETE_ALL_LINGUAS"; then test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete" fi ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"` # Hide the ALL_LINGUAS assigment from automake < 1.5. eval 'ALL_LINGUAS''=$ALL_LINGUAS_' POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS" else # The set of available languages was given in configure.in. # Hide the ALL_LINGUAS assigment from automake < 1.5. eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS' fi # Compute POFILES # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po) # Compute UPDATEPOFILES # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update) # Compute DUMMYPOFILES # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop) # Compute GMOFILES # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo) case "$ac_given_srcdir" in .) srcdirpre= ;; *) srcdirpre='$(srcdir)/' ;; esac POFILES= UPDATEPOFILES= DUMMYPOFILES= GMOFILES= for lang in $ALL_LINGUAS; do POFILES="$POFILES $srcdirpre$lang.po" UPDATEPOFILES="$UPDATEPOFILES $lang.po-update" DUMMYPOFILES="$DUMMYPOFILES $lang.nop" GMOFILES="$GMOFILES $srcdirpre$lang.gmo" done # CATALOGS depends on both $ac_dir and the user's LINGUAS # environment variable. INST_LINGUAS= if test -n "$ALL_LINGUAS"; then for presentlang in $ALL_LINGUAS; do useit=no if test "%UNSET%" != "$LINGUAS"; then desiredlanguages="$LINGUAS" else desiredlanguages="$ALL_LINGUAS" fi for desiredlang in $desiredlanguages; do # Use the presentlang catalog if desiredlang is # a. equal to presentlang, or # b. a variant of presentlang (because in this case, # presentlang can be used as a fallback for messages # which are not translated in the desiredlang catalog). case "$desiredlang" in "$presentlang"*) useit=yes;; esac done if test $useit = yes; then INST_LINGUAS="$INST_LINGUAS $presentlang" fi done fi CATALOGS= if test -n "$INST_LINGUAS"; then for lang in $INST_LINGUAS; do CATALOGS="$CATALOGS $lang.gmo" done fi test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile" sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile" for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do if test -f "$f"; then case "$f" in *.orig | *.bak | *~) ;; *) cat "$f" >> "$ac_dir/Makefile" ;; esac fi done fi ;; esac done]], [# Capture the value of obsolete ALL_LINGUAS because we need it to compute # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it # from automake < 1.5. eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"' # Capture the value of LINGUAS because we need it to compute CATALOGS. LINGUAS="${LINGUAS-%UNSET%}" ]) ]) dnl Postprocesses a Makefile in a directory containing PO files. AC_DEFUN([AM_POSTPROCESS_PO_MAKEFILE], [ # When this code is run, in config.status, two variables have already been # set: # - OBSOLETE_ALL_LINGUAS is the value of LINGUAS set in configure.in, # - LINGUAS is the value of the environment variable LINGUAS at configure # time. changequote(,)dnl # Adjust a relative srcdir. ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`" ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` # In autoconf-2.13 it is called $ac_given_srcdir. # In autoconf-2.50 it is called $srcdir. test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir" case "$ac_given_srcdir" in .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;; /*) top_srcdir="$ac_given_srcdir" ;; *) top_srcdir="$ac_dots$ac_given_srcdir" ;; esac # Find a way to echo strings without interpreting backslash. if test "X`(echo '\t') 2>/dev/null`" = 'X\t'; then gt_echo='echo' else if test "X`(printf '%s\n' '\t') 2>/dev/null`" = 'X\t'; then gt_echo='printf %s\n' else echo_func () { cat < "$ac_file.tmp" if grep -l '@TCLCATALOGS@' "$ac_file" > /dev/null; then # Add dependencies that cannot be formulated as a simple suffix rule. for lang in $ALL_LINGUAS; do frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'` cat >> "$ac_file.tmp" < /dev/null; then # Add dependencies that cannot be formulated as a simple suffix rule. for lang in $ALL_LINGUAS; do frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'` cat >> "$ac_file.tmp" <> "$ac_file.tmp" < 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/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]) ]) # 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. # So let's grep whole file. if grep '^#.*generated by automake' $mf > /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 # 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.58])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 # test to see if srcdir already configured if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 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 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 ]) ]) # 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-"$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 ]) # Copyright (C) 1999, 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 3 # AM_PROG_CC_C_O # -------------- # Like AC_PROG_CC_C_O, but changed for automake. AC_DEFUN([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC_C_O])dnl AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl # FIXME: we rely on the cache variable name because # there is no other way. set dummy $CC ac_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']` if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" != yes"; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi ]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997, 1999, 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_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 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 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 whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise. # # Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories # created by `make install' are always world readable, even if the # installer happens to have an overly restrictive umask (e.g. 077). # This was a mistake. There are at least two reasons why we must not # use `-m 0755': # - it causes special bits like SGID to be ignored, # - it may be too restrictive (some setups expect 775 directories). # # Do not use -m 0755 and let people choose whatever they expect by # setting umask. # # We cannot accept any implementation of `mkdir' that recognizes `-p'. # Some implementations (such as Solaris 8's) are not thread-safe: if a # parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c' # concurrently, both version can detect that a/ is missing, but only # one can create it and the other will error out. Consequently we # restrict ourselves to GNU make (using the --version option ensures # this.) AC_DEFUN([AM_PROG_MKDIR_P], [if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then # We used to keeping the `.' as first argument, in order to # allow $(mkdir_p) to be used without argument. As in # $(mkdir_p) $(somedir) # where $(somedir) is conditionally defined. However this is wrong # for two reasons: # 1. if the package is installed by a user who cannot write `.' # make install will fail, # 2. the above comment should most certainly read # $(mkdir_p) $(DESTDIR)$(somedir) # so it does not work when $(somedir) is undefined and # $(DESTDIR) is not. # To support the latter case, we have to write # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir), # so the `.' trick is pointless. mkdir_p='mkdir -p --' else # On NextStep and OpenStep, the `mkdir' command does not # recognize any option. It will interpret all options as # directories to create, and then abort because `.' already # exists. for d in ./-p ./--version; do test -d $d && rmdir $d done # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. if test -f "$ac_aux_dir/mkinstalldirs"; then mkdir_p='$(mkinstalldirs)' else mkdir_p='$(install_sh) -d' fi fi AC_SUBST([mkdir_p])]) # 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="\${SHELL} \$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # 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 m4_include([m4/00gnulib.m4]) m4_include([m4/alloca.m4]) m4_include([m4/argmatch.m4]) m4_include([m4/clock_time.m4]) m4_include([m4/codeset.m4]) m4_include([m4/dirname.m4]) m4_include([m4/dos.m4]) m4_include([m4/double-slash-root.m4]) m4_include([m4/eealloc.m4]) m4_include([m4/errno_h.m4]) m4_include([m4/error.m4]) m4_include([m4/exitfail.m4]) m4_include([m4/extensions.m4]) m4_include([m4/fcntl_h.m4]) m4_include([m4/flexmember.m4]) m4_include([m4/fnmatch.m4]) m4_include([m4/fsusage.m4]) m4_include([m4/getopt.m4]) m4_include([m4/gettime.m4]) m4_include([m4/gettimeofday.m4]) m4_include([m4/glibc21.m4]) m4_include([m4/gnulib-common.m4]) m4_include([m4/gnulib-comp.m4]) m4_include([m4/human.m4]) m4_include([m4/idcache.m4]) m4_include([m4/include_next.m4]) m4_include([m4/inline.m4]) m4_include([m4/inttypes-pri.m4]) m4_include([m4/inttypes.m4]) m4_include([m4/localcharset.m4]) m4_include([m4/locale-fr.m4]) m4_include([m4/locale-ja.m4]) m4_include([m4/locale-zh.m4]) m4_include([m4/longlong.m4]) m4_include([m4/lstat.m4]) m4_include([m4/malloc.m4]) m4_include([m4/malloca.m4]) m4_include([m4/mbchar.m4]) m4_include([m4/mbiter.m4]) m4_include([m4/mbrtowc.m4]) m4_include([m4/mbsinit.m4]) m4_include([m4/mbslen.m4]) m4_include([m4/mbsstr.m4]) m4_include([m4/mbstate_t.m4]) m4_include([m4/memmove.m4]) m4_include([m4/mkstemp.m4]) m4_include([m4/multiarch.m4]) m4_include([m4/nanosleep.m4]) m4_include([m4/onceonly.m4]) m4_include([m4/open.m4]) m4_include([m4/putenv.m4]) m4_include([m4/quote.m4]) m4_include([m4/quotearg.m4]) m4_include([m4/readlink.m4]) m4_include([m4/rename.m4]) m4_include([m4/safe-read.m4]) m4_include([m4/safe-write.m4]) m4_include([m4/sigaction.m4]) m4_include([m4/signal_h.m4]) m4_include([m4/signalblocking.m4]) m4_include([m4/ssize_t.m4]) m4_include([m4/stdbool.m4]) m4_include([m4/stdint.m4]) m4_include([m4/stdlib_h.m4]) m4_include([m4/strcase.m4]) m4_include([m4/strcasestr.m4]) m4_include([m4/strerror.m4]) m4_include([m4/string_h.m4]) m4_include([m4/strings_h.m4]) m4_include([m4/strndup.m4]) m4_include([m4/strnlen.m4]) m4_include([m4/strtoimax.m4]) m4_include([m4/strtol.m4]) m4_include([m4/strtoll.m4]) m4_include([m4/strtoul.m4]) m4_include([m4/strtoull.m4]) m4_include([m4/strtoumax.m4]) m4_include([m4/sys_select_h.m4]) m4_include([m4/sys_socket_h.m4]) m4_include([m4/sys_stat_h.m4]) m4_include([m4/sys_time_h.m4]) m4_include([m4/tempname.m4]) m4_include([m4/time_h.m4]) m4_include([m4/timespec.m4]) m4_include([m4/unistd_h.m4]) m4_include([m4/utimbuf.m4]) m4_include([m4/utime.m4]) m4_include([m4/utimes-null.m4]) m4_include([m4/wchar.m4]) m4_include([m4/wchar_t.m4]) m4_include([m4/wctype.m4]) m4_include([m4/wcwidth.m4]) m4_include([m4/wint_t.m4]) m4_include([m4/write.m4]) m4_include([m4/xalloc.m4]) m4_include([m4/xstrndup.m4]) m4_include([m4/xstrtol.m4]) gnuit-4.9.5/compile0000755000175000017500000000717311146671375011201 00000000000000#! /bin/sh # Wrapper for compilers which do not understand `-c -o'. scriptversion=2005-05-14.22 # Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc. # Written by Tom Tromey . # # 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. # This file is maintained in Automake, please report # bugs to or send patches to # . case $1 in '') echo "$0: No command. Try \`$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: compile [--help] [--version] PROGRAM [ARGS] Wrapper for compilers which do not understand `-c -o'. Remove `-o dest.o' from ARGS, run PROGRAM with the remaining arguments, and rename the output as expected. If you are trying to build a whole package this is not the right script to run: please start by reading the file `INSTALL'. Report bugs to . EOF exit $? ;; -v | --v*) echo "compile $scriptversion" exit $? ;; esac ofile= cfile= eat= for arg do if test -n "$eat"; then eat= else case $1 in -o) # configure might choose to run compile as `compile cc -o foo foo.c'. # So we strip `-o arg' only if arg is an object. eat=1 case $2 in *.o | *.obj) ofile=$2 ;; *) set x "$@" -o "$2" shift ;; esac ;; *.c) cfile=$1 set x "$@" "$1" shift ;; *) set x "$@" "$1" shift ;; esac fi shift done if test -z "$ofile" || test -z "$cfile"; then # If no `-o' option was seen then we might have been invoked from a # pattern rule where we don't need one. That is ok -- this is a # normal compilation that the losing compiler can handle. If no # `.c' file was seen then we are probably linking. That is also # ok. exec "$@" fi # Name of file we expect compiler to create. cofile=`echo "$cfile" | sed -e 's|^.*/||' -e 's/\.c$/.o/'` # Create the lock directory. # Note: use `[/.-]' here to ensure that we don't use the same name # that we are using for the .o file. Also, base the name on the expected # object file name, since that is what matters with a parallel build. lockdir=`echo "$cofile" | sed -e 's|[/.-]|_|g'`.d while true; do if mkdir "$lockdir" >/dev/null 2>&1; then break fi sleep 1 done # FIXME: race condition here if user kills between mkdir and trap. trap "rmdir '$lockdir'; exit 1" 1 2 15 # Run the compile. "$@" ret=$? if test -f "$cofile"; then mv "$cofile" "$ofile" elif test -f "${cofile}bj"; then mv "${cofile}bj" "$ofile" fi rmdir "$lockdir" exit $ret # 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: gnuit-4.9.5/Makefile.am0000644000175000017500000000366311146671375011657 00000000000000AUTOMAKE_OPTIONS = 1.9 EXTRA_DIST = PLATFORMS PROBLEMS LSM.in version.h.in\ gnuit.spec.in mkvcs prepare \ m4/gnulib-tool.m4 m4/gnulib-cache.m4 \ m4/gnulib-common.m4 m4/utimes.m4 m4/sockpfaf.m4 \ LSM gnuit.spec .gitignore CONFIG_CLEAN_FILES= version.h distcleancheck_listfiles = find -type f -exec sh -c 'test -f $(srcdir)/{} || echo {}' ';' GIT_OBSOLETE=dpkg-help.txt .gitrc.aixterm .gitrc.ansi .gitrc.common \ .gitrc.generic .gitrc.hft .gitrc.hpterm .gitrc.linux \ .gitrc.linux-m .gitrc.mach .gitrc.minix .gitrc.thix \ .gitrc.vt100 .gitrc.vt102 .gitrc.xterm .gitrc.xterm-color \ .gitrc.Eterm .gitrc.console .gitrc.dtterm .gitrc.eterm \ .gitrc.hp .gitrc.iris-ansi .gitrc.iris-ansi-net \ .gitrc.pc3 .gitrc.rxvt .gitrc.screen .gitrc.sun \ .gitrc.sun-cmd .gitrc.vt125 .gitrc.vt200 .gitrc.vt201 \ .gitrc.vt220 .gitrc.vt240 .gitrc.vt300 .gitrc.vt320 \ .gitrc.vt400 .gitrc.vt420 .gitrc.xterm-debian \ .gitrc.xterms SUBDIRS = lib src term doc ACLOCAL_AMFLAGS = -I m4 html: cd doc && $(MAKE) html dist-hook: cp LSM gnuit.spec $(distdir) # clean up obsolete files, allow for locations with and without /share/ install-data-hook: for i in $(GIT_OBSOLETE); \ do\ if [ -e "$(DESTDIR)$(datadir)/git/$${i}" ]; then\ rm -f "$(DESTDIR)$(datadir)/git/$${i}" ];\ fi;\ done -rm -f $(DESTDIR)$(infodir)/git.info* >/dev/null 2>&1 -rm -f $(DESTDIR)$(prefix)/info/git.info* >/dev/null 2>&1 if [ -e "$(DESTDIR)$(htmldir)/git.html" ]; then \ rm -f "$(DESTDIR)$(htmldir)/git.html" ];\ fi if [ -e "$(DESTDIR)$(prefix)/doc/git.html" ]; then \ rm -f "$(DESTDIR)$(prefix)/doc/git.html" ];\ fi if [ -e "$(DESTDIR)$(prefix)/doc/git-4.3.20/git.html" ]; then \ rm -f "$(DESTDIR)$(prefix)/doc/git-4.3.20/git.html" ;\ rmdir "$(DESTDIR)${prefix}/doc/git-4.3.20" >/dev/null 2>&1 || true; \ fi rmdir "$(DESTDIR)$(datadir)/git" >/dev/null 2>&1 || true gnuit-4.9.5/README0000644000175000017500000001732411146671375010502 00000000000000-*-outline-*-- * GNU Interactive Tools ======================= This file documents the install steps that are specific to the GNUIT package, as well as some configuration hints: ** The GNUIT package uses the 'configure' script to guess your system features. The 'configure' script was generated from the file configure.in (available in the package) using the autoconf utility. To install the GNUIT package just type: ./configure make make install If you want to install stripped binaries (smaller), type make install-strip instead of make install The configure script first checks for the termcap library. If the termcap library is not found, some terminfo libraries will be searched: ncursesw, ncurses, curses, termlib, tinfo, terminfo. If you want to change this default behavior and search for terminfo libraries before searching the termcap library, run ./configure --with-terminfo instead of ./configure Note that it is best to use terminfo instead of termcap under HP-UX. The filemanager has recently changed name from 'git' to 'gitfm'. A transitional script that warns users is installed as 'git'. To disable this, use the --disable-transition flag to ./configure. For more information about the 'configure' script please read the INSTALL file in this directory. ** In addition to a termcap/terminfo library and headers, the readline library and headers should ideally be installed, although gnuit falls back on an internal implementation. For production of info, pdf and html documentation, you will want the texinfo package installed, and optionally the texi2html package. gitaction will attempt to use many programs/viewers if they are installed. Some you will already have on your system, and some are only for obscure file formats. Tools used include: 7z aaxine abiword acroread aktion alsaplayer amp ar audacious aviplay bmp bmp-play-files bmp-play-files-2.0 bmp2 bmpx btshowmetainfo bunzip bunzip2 bzcat cacaview chmsee cpio db_dump dbview dia display djview djview3 djview4 dotty dpkg ee elinks emacs epdfview esdplay evince fbgs fbi feh firefox flac123 flip galeon gfontview ggv ghostview gimp gimv gm gmplayer gnash gnochm gnumeric gpe-gallery gpg gpgv gs gthumb gtv gunzip gv gxine herrie html2text iceape iceweasel info inkscape jar javap karbon kbabel kchmviewer kdvi kfax kghostview klyx konqueror kpdf krita ktnef kview kwave kword last ldd less lha lynx lyx metamail mgp mikmod more mp3blaster mpeg_vga mpg123 mpg321 mplayer noatun nroff objdump ogg123 oleo open openoffice pgp pgp5 pgp5i pgpk pgpv play plaympeg pod2text pstotext pvftobasic qcad qiv raplayer realplay rhythmbox rmdtopvf rpm rvplayer safari seamonkey see sensible-browser sodipodi soffice soundtracker sqlite svgdisplay swami swfdec-player swfplayer tar ted timidity tnef totem totem-xine unarj uncompress unrar unrtf unzip uudecode viewfax vlc vplay vrweb w w3m wavplay x11amp xanim xcfview xchm xdvi xemacs xfig xfmedia xgrasp xine xli xloadimage xmms xmp xpdf xv xzgv zgv zoo ** There are many configuration files in GNUIT: a. gnuitrc.generic - generic configuration file b. gnuitrc.linux - Linux console configuration file c. gnuitrc.vt100 - vt100 configuration file d. gnuitrc.vt102 - vt102 configuration file (same as vt100) e. gnuitrc.xterm - xterm configuration file f. gnuitrc.xterm-color - xterm configuration file g. gnuitrc.hpterm - hpterm configuration file h. gnuitrc.aixterm - aixterm configuration file i. gnuitrc.hft - hft configuration file j. gnuitrc.thix - thix configuration file k. gnuitrc.ansi - ansi configuration file l. gnuitrc.minix - minix configuration file m. gnuitrc.mach - mach configuration file (for the GNU Hurd) ..... etc. When git/gitps/gitview are started, they search a file named .gnuitrc.TERM first in the home directory and then (without the leading dot) in the $(datadir)/gnuit directory ($(datadir) is usually /usr/local/share) (see INSTALL). TERM is the value of your 'TERM' environment variable, e.g. vt102; if TERM=vt102, your configuration file should be .gnuitrc.vt102. The package contains many predefined configuration files but, if you are using a different terminal type, then you can easily create a configuration file for it copying and modifying one of them. Put a suitable configuration file in your home directory if you want to overwrite the default configuration file. If you don't have a configuration file for your terminal, gnuitrc.generic will be used. If your terminal supports standard ANSI color sequences, set AnsiColors to ON in the [Setup] section of .gnuitrc.TERM. Otherwise, AnsiColors should be OFF. ** Create the directories /mnt/fd0 and /mnt/fd1 (for mounting floppy disks with gitmount (an auto-mount script). This works for Linux, on other systems it might be different. ** Read the gnuitrc.TERM files to find out how to configure GNUIT's colors, keys ... ** If you are using termcap and your system has a huge termcap database, copy the descriptions of your terminal(s) in a file and put that file into your home directory. After that, set your TERMCAP environment variable to point to it. If your login name is mike and the file you have just created is .termcap, you must append something like this to your .profile : TERMCAP=/home/mike/.termcap This will speed up GNUIT at startup. If you are using terminfo, don't bother. ** In order to be able to read the Info documentation you should append the git.dir file (found in the package) to the file /usr/info/dir (this works for Linux; on other systems the main Info directory could be different). This is *NOT* done by 'make install'. ** Read the info documentation. The man pages are obsolete. They are provided only for those people that don't have info, and just to give them an idea about what gnuit is. ** If you want to take full advantage of all gnuit's features, it is highly recommended that you install the GNU gzip program. You can download it from ftp.gnu.org (/pub/gnu/gzip). ** It might be a good idee to install the GNU termcap library too. On some systems it might make a difference. ** For SCO Unix users: please use -lmalloc when linking gnuit. See the PROBLEMS file for more details. ** For Linux users: you might want to create the special devices for reading/writing the virtual console memory. Use the mkvcs script provided with gnuit. Be aware that current Linux systems do not change the owner of these devices at login time as it is usually done for ttys. Therefore, mkvcs creates /dev/vcs?[0-8] with mode 0666. This is a major security hole on multiuser systems! It is recommended that you create these devices only on systems on which security is not important. Maybe future releases of the Linux login program will change the owner of these devices... ** In order to use per directory .gitaction scripts you should copy the .gitaction example in the target directories and then modify it. ** If gnuit appears to be slow, please consider setting TypeSensitivity to OFF in the configuration files. ** If your terminal or terminal emulator supports ANSI colors (color_xterm & rxvt under Linux, aixterm under AIX, xterm under ULTRIX) you might want to set AnsiColors to ON in the appropriate configuration file (gnuitrc.xterm). If your terminal emulator does not support ANSI color sequences, it is best to set AnsiColors to OFF. ** When using gnuit under cygwin, you should set the CYGWIN environment variable to "tty". This should be done before running cygwin, either in the batch file you use to start cygwin or on boot. Emacs has a similar issue, a web search for "emacs cygwin tty" should provide further explanation. Good luck! Tudor & Andi ---------------------------------------------------------------------- Please send bug reports to gnuit-dev@gnu.org gnuit-4.9.5/src/0000777000175000017500000000000011146672040010454 500000000000000gnuit-4.9.5/src/.gitaction0000755000175000017500000000507311146671376012375 00000000000000#! /bin/sh ############################################################################### ### ### ### GNU Interactive Tools per file type action script ### ### Local version ### ### Copyright (c) 1993-1999 Free Software Foundation, Inc. ### ### ### ### This file is part of gnuit. ### ### ### ### gnuit 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 3 of the ### ### License, or (at your option) any later version. ### ### ### ### gnuit 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, see ### ### http://www.gnu.org/licenses/. ### ### ### ### Written by Tudor Hulubei and Andrei Pitis. ### ### ### ############################################################################### # # This script executes a different action for each file type specified. # The script tries to match the second parameter against the patterns # specified in the 'case' statement (see below). # If you want to add new file types & actions to this script, just add a # new entry to the 'case' statement *before* the last one ( *) ... ) # # For greater flexibility, .gitaction's first parameter is the name of the # directory where the file resides. So, you can get the complete file # name appending the file base name to the file path just like that: $1/$2 # name=`basename $0` if test "$#" -ne 2 -o ! -d "$1" -o ! -f "$2"; then echo "$name: GIT internal script" >&2 exit 1 fi done=1 file="$1/$2" case "$2" in *.foo) ls -la "$file";; *.bar) "$GNUIT_PAGER" "$file";; *) done=0 esac ret=$? if test $done -eq 0; then exit 1 else exit $ret fi gnuit-4.9.5/src/title.h0000644000175000017500000000232611146671376011700 00000000000000/* title.h -- Function prototypes for title.c. */ /* Copyright (C) 1997-1999, 2006-2007 Free Software Foundation, Inc. This file is part of gnuit. gnuit 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 3 of the License, or (at your option) any later version. gnuit 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, see http://www.gnu.org/licenses/. */ /* Written by Tudor Hulubei and Andrei Pitis. */ #ifndef _GIT_TITLE_H #define _GIT_TITLE_H #include #ifdef HAVE_STDDEF_H #include #endif #include "stdc.h" #define TITLE_FIELDS 8 extern char *TitleFields[TITLE_FIELDS]; extern int TitleColors[TITLE_FIELDS]; extern void title_init PROTO (()); extern void title_end PROTO (()); extern void title_resize PROTO ((size_t, size_t)); extern void title_update PROTO (()); #endif /* _GIT_TITLE_H */ gnuit-4.9.5/src/xstack.h0000644000175000017500000000272311146671376012055 00000000000000/* xstack.h -- Prototypes and #defines for the stuff in xstack.c. */ /* Copyright (C) 1993-1999, 2006-2007 Free Software Foundation, Inc. This file is part of gnuit. gnuit 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 3 of the License, or (at your option) any later version. gnuit 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, see http://www.gnu.org/licenses/. */ /* Written by Tudor Hulubei and Andrei Pitis. */ #ifndef _GIT_XSTACK_H #define _GIT_XSTACK_H #include "stdc.h" typedef struct { void *data; /* the stack data. */ int esize; /* # of bytes in a stack element. */ int point; /* # of elements in the stack. */ } xstack_t; extern xstack_t *xstack_init PROTO ((int)); extern void xstack_end PROTO ((xstack_t *)); extern void xstack_push PROTO ((xstack_t *, void *)); extern void *xstack_pop PROTO ((xstack_t *, void *)); extern void *xstack_preview PROTO ((xstack_t *, void *, int)); extern void xstack_truncate PROTO ((xstack_t *, int)); extern int xstack_point PROTO ((xstack_t *)); #endif /* _GIT_XSTACK_H */ gnuit-4.9.5/src/tilde.c0000644000175000017500000002012211146671376011645 00000000000000/* tilde.c -- Tilde expansion code (~/foo := $HOME/foo). */ /* Copyright (C) 1988,1989 Free Software Foundation, Inc. This file is part of GNU Readline, a library for reading lines of text with interactive input and history editing. Readline 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 3 of the License, or (at your option) any later version. Readline 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 Readline; see the file COPYING. If not, see http://www.gnu.org/licenses/ */ #ifdef HAVE_CONFIG_H #include #endif #if defined (HAVE_STDLIB_H) # include #else # include "ansi_stdlib.h" #endif /* HAVE_STDLIB_H */ #include #include #ifdef HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ #include "xmalloc.h" #include "xstring.h" #include "tilde.h" #if defined (USG) && !defined (HAVE_GETPW_DECLS) extern struct passwd *getpwuid (), *getpwnam (); #endif /* USG && !defined (HAVE_GETPW_DECLS) */ #if !defined (savestring) # ifndef strcpy extern char *strcpy (); # endif #define savestring(x) strcpy (xmalloc (1 + strlen (x)), (x)) #endif /* !savestring */ #if !defined (NULL) # if defined (__STDC__) # define NULL ((void *) 0) # else # define NULL 0x0 # endif /* !__STDC__ */ #endif /* !NULL */ /* The default value of tilde_additional_prefixes. This is set to whitespace preceding a tilde so that simple programs which do not perform any word separation get desired behaviour. */ static char *default_prefixes[] = { " ~", "\t~", (char *)NULL }; /* The default value of tilde_additional_suffixes. This is set to whitespace or newline so that simple programs which do not perform any word separation get desired behaviour. */ static char *default_suffixes[] = { " ", "\n", (char *)NULL }; /* If non-null, this contains the address of a function to call if the standard meaning for expanding a tilde fails. The function is called with the text (sans tilde, as in "foo"), and returns a malloc()'ed string which is the expansion, or a NULL pointer if there is no expansion. */ CPFunction *tilde_expansion_failure_hook = (CPFunction *)NULL; /* When non-null, this is a NULL terminated array of strings which are duplicates for a tilde prefix. Bash uses this to expand `=~' and `:~'. */ char **tilde_additional_prefixes = default_prefixes; /* When non-null, this is a NULL terminated array of strings which match the end of a username, instead of just "/". Bash sets this to `:' and `=~'. */ char **tilde_additional_suffixes = default_suffixes; /* Find the start of a tilde expansion in STRING, and return the index of the tilde which starts the expansion. Place the length of the text which identified this tilde starter in LEN, excluding the tilde itself. */ static int tilde_find_prefix (string, len) char *string; int *len; { register int i, j, string_len; register char **prefixes = tilde_additional_prefixes; string_len = strlen (string); *len = 0; if (!*string || *string == '~') return (0); if (prefixes) { for (i = 0; i < string_len; i++) { for (j = 0; prefixes[j]; j++) { if (strncmp (string + i, prefixes[j], strlen (prefixes[j])) == 0) { *len = strlen (prefixes[j]) - 1; return (i + *len); } } } } return (string_len); } /* Find the end of a tilde expansion in STRING, and return the index of the character which ends the tilde definition. */ static int tilde_find_suffix (string) char *string; { register int i, j, string_len; register char **suffixes = tilde_additional_suffixes; string_len = strlen (string); for (i = 0; i < string_len; i++) { if (string[i] == '/' || !string[i]) break; for (j = 0; suffixes && suffixes[j]; j++) { if (strncmp (string + i, suffixes[j], strlen (suffixes[j])) == 0) return (i); } } return (i); } /* Return a new string which is the result of tilde expanding STRING. */ char * tilde_expand (string) char *string; { char *result, *tilde_expand_word (); int result_size, result_index; result_size = result_index = 0; result = (char *)NULL; /* Scan through STRING expanding tildes as we come to them. */ while (1) { register int start, end; char *tilde_word, *expansion; int len; /* Make START point to the tilde which starts the expansion. */ start = tilde_find_prefix (string, &len); /* Copy the skipped text into the result. */ if ((result_index + start + 1) > result_size) result = xrealloc (result, 1 + (result_size += (start + 20))); strncpy (result + result_index, string, start); result_index += start; /* Advance STRING to the starting tilde. */ string += start; /* Make END be the index of one after the last character of the username. */ end = tilde_find_suffix (string); /* If both START and END are zero, we are all done. */ if (!start && !end) break; /* Expand the entire tilde word, and copy it into RESULT. */ tilde_word = xmalloc (1 + end); strncpy (tilde_word, string, end); tilde_word[end] = '\0'; string += end; expansion = tilde_expand_word (tilde_word); xfree (tilde_word); len = strlen (expansion); if ((result_index + len + 1) > result_size) result = xrealloc (result, 1 + (result_size += (len + 20))); strcpy (result + result_index, expansion); result_index += len; xfree (expansion); } result[result_index] = '\0'; return (result); } /* Do the work of tilde expansion on FILENAME. FILENAME starts with a tilde. If there is no expansion, call tilde_expansion_failure_hook. */ char * tilde_expand_word (filename) char *filename; { char *dirname; char *temp_name; if (filename == (char *)0) return ((char *)NULL); dirname = savestring (filename); if (*dirname != '~') return (dirname); if (!dirname[1] || dirname[1] == '/') { /* Prepend $HOME to the rest of the string. */ char *temp_home = (char *)getenv ("HOME"); int home_len; /* If there is no HOME variable, look up the directory in the password database. */ if (!temp_home) { struct passwd *entry; entry = getpwuid (getuid ()); if (entry) temp_home = entry->pw_dir; } home_len = temp_home ? strlen (temp_home) : 0; temp_name = xmalloc (1 + strlen (dirname + 1) + home_len); if (temp_home) strcpy (temp_name, temp_home); strcpy (temp_name + home_len, dirname + 1); xfree (dirname); dirname = temp_name; } else { char *username; struct passwd *user_entry; int i, len; username = xmalloc (strlen (dirname)); for (i = 1; dirname[i] && dirname[i] != '/'; i++) username[i - 1] = dirname[i]; username[i - 1] = '\0'; if ((user_entry = getpwnam (username)) == (struct passwd *)0) { /* If the calling program has a special syntax for expanding tildes, and we couldn't find a standard expansion, then let them try. */ if (tilde_expansion_failure_hook) { char *expansion; expansion = (*tilde_expansion_failure_hook) (username); if (expansion) { len = strlen (expansion); temp_name = xmalloc (1 + len + strlen (dirname + i)); strcpy (temp_name, expansion); strcpy (temp_name + len, dirname + i); xfree (expansion); xfree (dirname); dirname = temp_name; } } /* We shouldn't report errors. */ } else { len = strlen (user_entry->pw_dir); temp_name = xmalloc (1 + len + strlen (dirname + i)); strcpy (temp_name, user_entry->pw_dir); strcpy (temp_name + len, dirname + i); xfree (dirname); dirname = temp_name; } endpwent (); xfree (username); } return (dirname); } gnuit-4.9.5/src/ChangeLog0000644000175000017500000012702111146671376012160 000000000000002007-10-20 Ian Beckwith * Discontinued this ChangeLog, see ../ChangeLog for changes from now on. 2001-06-03 Tudor Hulubei * panel.c (panel_copy): Fixed to work on files >2Gb. * panel.c (panel_compare_files): Fixed to work on files >2Gb. 2000-05-08 Tudor Hulubei * panel.c (panel_update_info): Directories are counted as 0 bytes, instead of the size of the listing. This is less confusing, as people may assume that a non-zero size represent the recursively calculated sum of all the files in that directory, which is not true. 2000-05-01 Tudor Hulubei * panel.c (panel_beautify_number): Support for 64bit numbers. (panel_update_info): Same thing. 2000-04-18 Tudor Hulubei * gitunpack (unzip): Overwrite files w/o prompting. 2000-03-10 Tudor Hulubei * panel.c (panel_act_COPY): Copy operations no longer preserve ownership. This is how `/bin/cp' does it. 2000-03-09 Tudor Hulubei * panel.c (panel_move): Fixed a dangerous bug that could cause the source file to be deleted w/o being copied in some rare circumstances. (panel_copy): Moving across filesystems now preserves ownership. * gitaction (file): *.pm removed, it is more often a Perl module. * gitview.c (update_line): Fixed the bug causing the display of the extra 0 in some files. * panel.c (panel_mkdirs): New function - it creates all the missing directory components in a path. 2000-02-23 Tudor Hulubei * xid.c (xgetpwuid): Fixed sprintf buffer overflow. (xgetgrgid): Same fix. 1999-10-16 Tudor Hulubei * gitaction: Added *.[pP][nN][mM]. 1999-09-30 Tudor Hulubei * git.c (main): BUILTIN_up_one_dir now updates the command line path as well. 1999-09-26 Tudor Hulubei * gitps.c (update_process): Added an arrow in front of the current process. 1999-06-30 Tudor Hulubei * git.c (main): Fixed a crash when hitting ^G during an incremental search. 1999-06-28 Tudor Hulubei * gitaction: acroread is tried before xpdf. 1999-06-05 Tudor Hulubei * gitview.c (update_line): 2 columns for the hex display. * gitps.c (set_signal): Fixed a compilation issue on non-ANSI C compilers. * tty.c (tty_key_print): Fixed a compilation issue on non-ANSI C compilers. * gitaction: Fixed a problem in the gs and default rules. 1999-05-30 Tudor Hulubei * gitaction: Enhanced to use gitwhich and look for alternatives to various viewers. * gitwhich.c: New file (a stripped down version of `which'). * git.c (report_undefined_key): Don't display the error message if the sequence ends in key_INTERRUPT (^G). * gitps.c (report_undefined_key): Same change. * gitview.c (report_undefined_key): Same change. * title.c (clock_refresh): Don't update the clock if in terminal mode. Calling alarm(0) is not enough. 1999-05-19 Tudor Hulubei * misc.c (needs_quotes): # is now quoted. 1999-04-25 Tudor Hulubei * tty.c (tty_get_capabilities): Added xterm-debian and rxvt to the list of xterm-like terminal emulators. 1999-04-22 Tudor Hulubei * tty.c (tty_get_previous_key_seq): New function. 1999-04-20 Tudor Hulubei * git.c (main): The name of the shell command currently being executed is now displayed on the title of the xterm window. 1999-01-11 Tudor Hulubei * tty.c (tty_get_key): Key sequences are now displayed. 1998-09-18 Tudor Hulubei * .gitaction: Absolute references work now. * gitaction: Absolute references work now. 1998-09-14 Tudor Hulubei * gitaction: Removed `pvfspeed -8 -s 8000 $2 2> /dev/null' from the code playing rmd and pvf files. 1998-09-12 Tudor Hulubei * system.c (display_errors): Fixed a SIGSEGV generated by attempting to close the stream even when fopen() failed. 1998-09-10 Tudor Hulubei * gitps.c (update_process): Fixed an off by one error that was causing an incomplete display of the process name on Solaris. 1998-09-04 Tudor Hulubei * git.c (main): The -i command line option displays only the path. Same for gitps & gitview. * gitaction: Added support for playing pvf files. 1998-06-15 Tudor Hulubei > * misc.h: RAND_MAX defined to 2147483647 if not already defined. SunOS needs this apparently. 1998-03-20 Tudor Hulubei * panel.c (panel_update_info): Thumb present only when not all the entries are visible. 1998-03-19 Tudor Hulubei * panel.c (panel_update_info): Added scroll-bar thumb on the right side of the panel frame. 1998-03-14 Tudor Hulubei * signals.c (window_change): Added tty_defaults() before tty_io_clear() to make sure we clear the screen with the correct colors. * tty.c (TTY_CACHE_SIZE): Reduced to 1024, to prevent problems when updating the screen over the net. (tty_flush): Fixed to retry xwrite() until there is an error or everything gets transferred. 1998-03-13 Tudor Hulubei * gitps.c: signal_t replaced with xsignal_t, to compile w/o errors on AIX. 1998-03-12 Tudor Hulubei * Makefile.in (distclean): Depends on clean. 1998-03-11 Tudor Hulubei * panel.c (panel_case_rename): Fixed error message when in read-only directories. 1998-03-05 Tudor Hulubei * signals.c (signals_init): SIGQUIT is now ignored. * panel.c (panel_act_MKDIR): The current entry in the `other' panel is no longer affected by directory creation in `this' panel. (panel_find_index): Added more heuristics. * gitaction: Files that do not match any pattern and are located on msdos disks have the executable bits set. Print them as well, they will appear as "data" to find. * gitaction: Under Linux we can use `file -L' to instruct `file' to follow symbolic links. * git.c (main): Temporary files now have a random number embedded in their name. 1998-03-03 Tudor Hulubei * gitps.c (main): Use colors if COLORTERM is defined. * gitview.c (main): Use colors if COLORTERM is defined. * git.c (main): Use colors if COLORTERM is defined. * tty.c (columns_ok): Fixed to allow less than 80 columns. * tty.c (lines_ok): Fixed to allow less than 7 lines. * git.c (main): Fixed various places where the xterm title was not correctly restored. 1998-01-27 Tudor Hulubei * gitmount: Added support for user mounted devices. Under Linux a regular user can mount the CDROM and the FLOPPY under certain conditions with the `mount /dev/cdrom' and `mount /dev/fd0' commands. * gitaction: Added `.midi'. 1998-01-23 Tudor Hulubei * gitunpack: Added support for cpio archives. (exit_code): Fixed to report the error. * system.c (my_system): Fixed problem with rpm not working if stdin is closed. Sun Jan 18 16:51:36 1998 Tudor Hulubei * gitunpack: Changed to unpack all the selected files. * gitaction: Changed to display information on executables as well. * gitmount: Changed to accept multiple devices to mount. * Makefile.in (strip): New make target. 1997-10-08 Tudor Hulubei * gitmount (name): The mounting directory is created if it does not exist. 1997-10-03 Tudor Hulubei * gitmkdirs: Installed in the bin directory. This is basically a link to mkinstalldirs as found in the root of the source tree. * gitunpack: Implemented Viorel Anghel's suggestion - unpack to a given directory. Wed Sep 24 06:25:10 1997 root * system.c (display_errors): Remove any '\n' at the end of the line. 1997-09-22 Tudor Hulubei * git.c (set_prompt): New function. 1997-09-21 Tudor Hulubei * panel.c (panel_to_old_entry): New function. Helps repositioning on the same entry after rereading the directory. 1997-09-17 Tudor Hulubei * tty.c (tty_resize): LINES & COLUMNS are updated as well. * misc.c (xsetenv): New function that hides the incompatibility between putenv() and setenv(), offering a common interface. * panel.c (load_fti): Modified to choose the longest pattern that maches, so that we no longer depend on the order in which the patterns are specified in the configuration file. 1997-09-14 Tudor Hulubei * signals.c (service_interrupts): New function. To be called when ready to service interrupts. (interrupts): New function. Activates/deactivates suspend/resize signals. (window_change): New function. Handles resizes (SIGWINCH). (signal_handlers): New function. Installs/removes the SIGTSTP and SIGWINCH handlers. (signals_init): New function. * git.c (main): The temporary directory is now selected based on the TMPDIR environment variable, or "/tmp" if TMPDIR is not defined. * gitps.c (main): Same modification. * gitview.c (main): Same modification. 1997-09-13 Tudor Hulubei * title.c (title_init): New file. This stuff used to be in git.c. * inputline.c (il_restore_static): New function. It restores the static part of the input line when the tty has a very small horizontal size and we are forced to hide it in il_update(). (il_update_point): Modified to hide the static part of the input line when the horizontal dimension is too small. (il_update): Same modification. (il_resize): New function. (il_restore): Fixed to take into account potential change of size in the old input line structure. * inputline.c (il_hide_static): New function. It hides the static part of the input line when the tty has a very small horizontal size. * status.c (status_resize): New function. (status_reset): New function. (status_refresh): New function. * misc.c (truncate_long_name): Now hadles len in the 0-3 range as well. * panel.c (panel_copy): Added `dest' to the string displayed on the status bar. (panel_move): Added `to' to the string displayed on the status bar. (panel_update_path): Made scalable. (panel_update_size): Made scalable. (panel_update_info): Made scalable. (panel_update_entry): Made scalable. * git.c (il_isearch): Added support for BUILTIN_refresh and BUILTIN_hard_refresh. (il_read_line): Same thing. (il_read_char): Same thing. * system.c (my_system): New function. It offers much more control over the way the file descriptors and signals are handled. 1997-09-12 Tudor Hulubei * panel.c (panel_action): When changing the sorting key, the current entry doesn't change. * git.c (resize): New function. It resizes all git's components. (refresh): New function. Refreshes git's components. * panel.c (panel_update_size): If the number of free file system blocks is negative, display 0. * inputline.c (il_update_point): Fixed for more consistent horizontal scrolling. (il_update): Same fix. 1997-09-11 Tudor Hulubei * tty.c (tty_puts): Modified to do clipping. * window.c (window_putc): Added some simple minded clipping support. (window_puts): Same thing. * gitkeys.c (main): The exit key is now `q', following the Unix tradition... * git.c (resize): New function. It resizes all git's components if necessary. (refresh): New function. It refreshes all git's components. (usage): New function. (main): Added command line arguments. * tty.c (tty_init): New function. Hides the old tty_kbd_init(), tty_get_capabilities and get_tty_name() in one function. (tty_get_size): This function no longer has parameters. The `tty_lines' & `tty_columns' variables are global and should be used instead of the previous `SCREEN_X'/`SCREEN_Y'. (tty_getc): Activate/deactivate suspend/resize signals before/after the read() system call. Also service any pending signal at the very beginning. (tty_set_interrupt_char): Preserve the interrupt character. We will need it when restoring the NONCANONIC mode. (tty_set_mode): Restore the interrupt character that was in place before switching to CANONIC mode. (tty_resize): New function. Reallocates the tty screen and attribute buffers to fit the new screen dimensions. * gitaction: separate messages for non existing files or non-directories in the command line. 1997-09-06 Tudor Hulubei * gitview.c (main): Added command line arguments. * gitps.c (main): Added command line arguments. * git.c (main): Added command line argumets. (main): Added support for the -p command line argument - output the final path to descriptor 3 at exit. 1997-09-04 Tudor Hulubei * misc.c (update_path): New function. It adds $(prefix)/bin to PATH, so that git can easily find its components. 1997-08-15 Tudor Hulubei * xid.c (fix): New function to fix incorrect user names like: xax^H (Ctrl+H). We don't want these ^Hs sent to the terminal. Thanks to Andrei Caraman for reporting the problem. * tty.c (tty_update_title): Added "dtterm", "aixterm", and "iris-ansi". Wed Jun 4 00:04:29 1997 Tudor Hulubei * tty.c (tty_update_title): New function. If the terminal type is xterm or xterm-color then we can change the title of its window. Mon Jun 2 13:53:28 1997 Tudor Hulubei * panel.c (percent): Changed (total >= 100) to (total >= 100000) to avoid precision errors for small files. Remember, we want to keep this working _without_ using floating point. Fri Dec 27 21:04:00 1996 Tudor Hulubei * panel.c (panel_update_size): Fixed to support file system sizes up to about 100 Tb. * tilde.c (tilde_expand_word): updated from bash-2.0. Sun Dec 22 19:32:57 1996 Tudor Hulubei * panel.c (panel_parse_patterns): New function. Fri Dec 20 15:23:35 1996 Tudor Hulubei * panel.c (panel_act_BIN_PACKING): New function. Implements the First Fit Decreasing algorithm for bin packing the files in the current directory. (panel_update_size): git reports for the superuser the total number of free blocks in the file system, not just the number of free blocks available to the non-superuser. * git.c (il_read_char): IL_HOME - new flag. Position the cursor at the beginning of the line. * panel.c (panel_copy): Fixed the start string to quote the file/directory names. Mon Dec 2 19:34:08 1996 Tudor Hulubei * Makefile.in (prefix-change): New rule. The output is hidden - too boring :-). Even though this prefix stuff turned out to be hard to implement, it should work ok in most of the cases. Don't try to be too smart though, things like `make git prefix=other-prefix' will not work. Just use the regular make / make install stuff w/ and w/o the prefix stuff and you will be safe. Wed Nov 20 14:46:00 1996 Tudor Hulubei * Makefile.in: Support for exec_prefix. Should have been here from the very beginning... * git.c (read_keys): fixed a bug causing segmentation violation signals when tty_get_symbol_key_seq returned NULL. Thanks to Rolf Rossius for reporting the problem. The same bug has been fixed in gitps.c and gitview.c as well. Mon Nov 11 20:45:31 1996 Tudor Hulubei * panel.c: Added casts to NULL, in order to make git compile cleanly on IRIX64 6.1 systems (using the native compiler). * git.c: Same story. Sat Nov 9 21:44:43 1996 Tudor Hulubei * panel.h (struct): The size field is now of type off_t, as it should have been from the very beginning. Tue Oct 29 12:29:57 1996 Tudor Hulubei * gitaction (done): If there is no ./.gitaction in the current directory or if there is no matching pattern in it, back up to $HOME/.gitaction. If that fails too, execute the default action in gitaction. Mon Oct 28 01:07:38 1996 Tudor Hulubei * panel.c (panel_resize): panel_update() no longer called, it is too soon. Instead, call it separately, after switching to the new display mode completely. * git.c (main): Fixed a bug in BUILTIN_two_panels. panel_resize is now called correctly in all the cases. Wed Oct 16 15:02:11 1996 Tudor Hulubei * panel.c (panel_action): act_UP_ONE_DIR: New builtin action that goes up to the parent directory and positions on the entry corresponding to the current directory. Sun Oct 13 18:47:06 1996 Tudor Hulubei * gitaction: Added support for *.rpm files. Fri Oct 11 13:06:11 1996 Tudor Hulubei * Makefile.in (install-strip): Changed to use the install-scripts and install-stripped-binaries targets. Also added a dependency on `all'. (install-stripped-binaries): New target. Installs the stripped versions of the binaries. Tue Oct 8 12:44:21 1996 Tudor Hulubei * misc.c (common_configuration_init): An off-by-many bug has been fixed :-) * panel.c (percent): New function. It makes displaying percents possible for large files. Sun Oct 6 20:03:52 1996 Tudor Hulubei * git.c (il_read_line): Restored the original behaviour, i.e. ignore unrelated keys (just beep) and keep editing the line. Sat Sep 28 21:56:39 1996 Tudor Hulubei * xio.c (rename): New function, for those systems that lack one, like the AT&T 3B2. * xio.c (readlink): New function, for those systems that lack one, like the AT&T 3B2. Tue Sep 10 22:07:39 1996 Tudor Hulubei * stat.h (S_IRWXO): Added. Not defining it caused problems on some NeXT machines. Wed Aug 21 00:45:11 1996 Tudor Hulubei * tty.c (tty_get_size): Changed to handle termcap lines/columns as well. * Makefile.in (DEFS): Added _GNU_SOURCE to turn all the GNU extensions on. * panel.c (panel_unlink): New function. Used to avoid deleting files in panel_copy when not regular files. If for some reason we cannot copy a file to /dev/fd0, there is no need to remove the incomplete target file (/dev/fd0). Sat Aug 10 20:41:35 1996 Tudor Hulubei * panel.c (panel_act_MKDIR): Added S_IRWXO to mkdir. Thu Aug 8 11:59:09 1996 Tudor Hulubei * panel.c: select-file changed to select-entry file-to-input-line changed to entry-to-input-line etc. (panel_act_COMPARE): New function. It compares the contents of the two panels. It can do it quickly, by inspecting the file names, file sizes and time stamp, or thoroughly, by verifying the actual data. Tue Aug 6 00:15:43 1996 Tudor Hulubei * git.c (read_keys): Key sequence conversion errors are now reported. * tty.c (tty_extract_key): New function. It deals with characters with the 8th bit set. * gitkeys.c (main): gitkeys now displays unsigned chars. * tty.c (tty_get_capabilities): Under Linux, tgetent is called with NULL - i.e. let it allocate the buffer. Mon Aug 5 19:53:27 1996 Tudor Hulubei * panel.c (panel_select_all): Fixed a small bug in counting the selected files. Thu Jun 6 09:17:32 1996 Tudor Hulubei * Makefile.in (installdirs): chmod 755 removed. install_strip renamed to install-strip. install now depends on all and on install-only. Mon Apr 22 11:08:06 1996 Tudor Hulubei * All the source files have been tabified. Sun Apr 21 11:25:14 1996 Tudor Hulubei * history.c: All the calls to free() have been replaced with calls to xfree(). * tilde.c: All the calls to free() have been replaced with calls to xfree(). Sat Apr 6 11:51:03 1996 Tudor Hulubei * misc.c: xbasename() moved to xio.c. * Ported to qnx 4.22 thanks to Michael Hunter. Mon Apr 1 00:52:07 1996 Tudor Hulubei * tty.c (tty_beep): Bug fix. Now calls tty_writec() instead of tty_putc(). Thu Mar 28 09:47:06 1996 Tudor Hulubei * misc.c (clear_path): Enhanced to clear things like /usr/local/bin/../lib as well. * panel.c (panel_init): Modified to try to chdir to the directory specified by path and then use xgetcwd() to get the absolute path. This way this->path will never point to an relative path. * git.c (main): StartupLeftPanelPath & StartupRightPanelPath have been removed. They were useless. Wed Mar 27 10:12:36 1996 Tudor Hulubei * panel.c (mode2string): New function. The code used to be duplicated (and slightly different) in panel_build_entry_field() and panel_update_info(). Fri Mar 22 10:43:38 1996 Tudor Hulubei * tty.c (tty_get_size): Odd columns stuff removed. * git.c (main): Wait set to 1 do prevent panels from being redrawn immediately. * git.c (main): If the number of columns is odd, the left panel will be one character lager. * panel.c (panel_act_ENTER): Idem. Tue Mar 19 03:46:45 1996 Tudor Hulubei * tty.c (tty_get_size): Forced an even number of columns. * inputline.c (il_downcase_word): New function. * inputline.c (il_capitalize_word): New function. * inputline.c (il_upcase_word): New function. * misc.c (putenv): New function. Used under NeXT, which seems to lack it. Mon Mar 18 12:02:19 1996 Tudor Hulubei * panel.c (beautify_size_number): New function. It beautifies a number like this: 8,881,152. * panel.c (panel_update_size): Changed to call beautify_size_number(). Thu Mar 14 23:06:27 1996 Tudor Hulubei * inputline.c (il_kill_word): New function. It implements the kill forward word operation. Mapped on M-d (ESC d). Tue Feb 27 23:38:36 1996 Tudor Hulubei * panel.c: Fixed a problem introduced by a previous change in panel.h. Sun Feb 4 17:13:34 1996 Tudor Hulubei * Ported to SVR2/SVR3 using a patch from Philippe De Muyter. Sun Jan 28 16:48:06 1996 Tudor Hulubei * git.c (main): Empty command lines are no longer executed. * panel.c (panel_read_directory): A few improvements for handling braind damaged NFS file systems. * gitaction: If no viewer has been specified, use the default pager to display the file. Sat Jan 13 13:09:13 1996 Tudor Hulubei * panel.c (panel_update_frame): FrameDisplay has been removed. Made useless by the new tty optimization algorithm. * AnsiColorSequences changed to AnsiColors. * system.c (start): A bug has been fixed. git used to hang when started on a terminal owned by some other user but the one running git (i.e. root + su user => root the owner of the tty, but git runs as user). closing the tty descriptors assuming that it will be possible to open them again later was wrong. We now duplicate the descriptors with dup() and restore them later. Thu Jan 11 02:11:19 1996 Tudor Hulubei * tty.c (tty_set_mode): unlock the terminal so that we don't get a locked one and hang. Wed Jan 10 13:18:54 1996 Tudor Hulubei * tty.c: curses-like algorithm rewritten. Much better now. * gitps.c (main): restores screen at exit (under Linux). * gitview.c (main): restores screen at exit (under Linux). Fri Dec 22 13:52:50 1995 Tudor Hulubei * tty.c (tty_defaults): Default ANSI colors are correctly restored under xterm, rxvt, aixterm, whatever. * Makefile.in (install_strip): New rule. Installs striped binaries. * misc.c (get_file_type_info): the foreground, background and brightness fields in the FTI description are optional. Reasonable defaults are used if missing. Mon Oct 30 00:37:52 1995 Tudor Hulubei * gitxgrep: Called by gitr?grep to search for files. * gitrgrep: Changed to use find. Safer. Sun Oct 29 19:41:09 1995 Tudor Hulubei * gitrgrep: Added gitregrep & gitrfgrep, links to gitrgrep. Depending on argv[0], gitrgrep will call grep, egrep or fgrep. * gitaction: Quoted all occurences of $1 & $2 so that it can handle unusual file names. * git.c (il_read_line): Exit from il_read_line when an unused key sequence is typed. * git.c (il_read_line): Added the default string to the history. Fri Oct 27 18:57:26 1995 Tudor Hulubei * panel.c (panel_act_MOVE): Fixed a bug due to which some files were moved across file systems by calling system() instead of panel_copy(). * panel.c (panel_copy): For non-regular files displaying the percent is useless, so we display the number of bytes copied so far. * panel.c: When copying/moving files, the destination is no longer displayed. Also, the message on the status bar is left aligned. Thu Oct 26 02:23:53 1995 Tudor Hulubei * tty.c: Better curses like optimization. Still somehow git specific, but a lot faster. * window.c (window_cursormove_notified): Removed. Used to call tty_cursormove_notified which is gone. * tty.c (tty_cursormove_notified): Removed. The terminal optimizations do not need it anymore. * xtimer.c: Removed. It was only used to prevent races when using gitclock(). Since gitclock is gone, there is no need for xtimer anymore. For a safe implementation of a clock we should use the select() system call, which is a BSD feature (possible portability problem) and which is currently not implemented under Thix. * git.c (gitclock): Removed. Too many races. * panel.c (panel_init): Fixed a bug that prevented FrameDisplay to behave as expected. * Added *.el, *.elc & Co to the [GIT-FTI] section in .gitrc.common. * Changed __P to PROTO to avoid conflicts with Minix headers. * panel.c (load_inode): New function. Contains all the inode stuff that used to be in panel_read_directory(). * panel.c (load_fti): New function. Called to obtain file type information, but only once, when the file is first displayed. Wed Oct 25 17:13:15 1995 Tudor Hulubei * misc.c (get_file_type_info): Fixed a bug reported by Marian Ciobanu on October 24, 1995. User defined [GIT-FTI] sections now work as expected. * git.c (main): The Linux console contents is restored at exit. * tty.c (vcs_io): New function. Implements support for both /dev/vcsa* and /dev/vcs* under Linux. Mon Sep 4 11:23:04 1995 Tudor Hulubei * git.c (command_expand): Fixed a bug that allowed actions to take place when %i or %I where expanded to nothing. Sat Sep 2 17:04:47 1995 Tudor Hulubei * .gitrc.common: Replaced " with ' in gitrgrep and find actions. Sat Jul 29 01:09:27 1995 root * git.c: Fixed a few bugs. After ^Xd, ^X^P, ^X^N and ESC c c the input line is now correctly updated. Fri Jul 28 09:35:27 1995 Tudor Hulubei * gitmatch.c: Removed. * gitaction: Using the shell 'case' statement matching capability instead of gitmatch. Sat Jul 22 13:48:45 1995 Tudor Hulubei * gitaction: Improved. Works now for compressed movies. Sun Jul 16 19:59:32 1995 Tudor Hulubei * "linux" seems to be used instead of "console" as the terminal type. Added .gitrc.linux, just to be sure. It won't hurt and, if I am wrong, it will be easy to remove it. Those rumors... Mon Jul 10 16:55:32 1995 Tudor Hulubei * panel.c: conform-current-directory & conform-other-directory now save the new directory into the directory history. * tty.c: Added support for /dev/vcsa under Linux. It needs r/w permission to /dev/vcsa in order to work. * Added GIT_PAGER. * configure.c: Increased the maximum number of characters allowed in a key sequence (when seek == NO_SEEK). Sat Jul 8 18:45:16 1995 Tudor Hulubei * panel.c (panel_update_entry): Added file type sensitivity. Fri Mar 17 18:38:46 1995 Hulubei Tudor * tty.c: (tty_set_mode): Added many #ifdefs to check for unusual c_cc[] fields. * tty.c: _POSIX_VDISABLE used instead of -1. * panel.c: Scroll step moved to the setup section, in order to make it available for both git and gitps. I don't think it is really important to have a separate scroll step for git and gitps. * gitps.c: Added scroll-step. * git.c: Panels are no longer deleted/displayed when a background command is started. Sun Mar 5 08:20:42 1995 Tudor Hulubei (tudor@cs.pub.ro) * panel.c: Panels can be maximized (only one panel on the screen), still being able to perform all the operations. * git.c: Added unlimited separate history for each command. * git.c: Added %?{confirmation}, a new format specifier. * The key bindings common to all terminal types are now in .gitrc.common. * panel.c: copy/move/delete can act on subdirectories. * panel.c: make-directory no longer expects a basename. * panel.c: Added tilde_expand() on 'copy' and 'move'. * Added ConfirmOnExit. * git.c: Added directory history. * git.c: The command body is no longer necessary. Commands with no body can be used to switch faster between directories. * panel.c: A bug in getting symbolic link sizes has been fixed. * Added scroll step. It uses the StartupScrollStep variable at startup but it can be modified thru the set-scroll-step built-in function. * panel.c: Added incremental search. Both I-search and I-search-backward are provided. Wrapped i-search too. Sat Mar 4 23:34:14 1995 Tudor Hulubei (tudor@cs.pub.ro) * Added a new configuration file that will hold the key bindings common to all terminals. * git.c (il_read_line): added separate history for each command. Mon Feb 13 00:36:30 1995 Tudor Hulubei (tudor@cs.pub.ro) * panel.c: Removed panel_check_name(). It is now possible to make a directory with make-directory anywhere, not only in the current directory. tilde_expand() has been added here too. * panel.c: Added tilde_expand() on copy-files and rename-move-files. Sat Feb 11 10:31:50 1995 Tudor Hulubei (tudor@cs.pub.ro) * git.c: Added a new variable, ConfirmOnExit, in the GIT-Setup section, allowing the user to specify if he wants to be asked for confirmation at exit. Mon Feb 6 00:19:06 1995 Tudor Hulubei (tudor@cs.pub.ro) * panel.c: Added directory history. * configure.in: HAVE_* are all defined in config.h (the file generated by ./configure from config.h.in). Sat Feb 4 17:45:58 1995 Tudor Hulubei (tudor@cs.pub.ro) * term/Makefile.in: Preformatted manual pages have been removed from the distribution. * Makefile.in: All the commands are now displayed. Sat Feb 4 17:42:32 1995 Han Holl (100327.1632@compuserve.com) * gitrgrep: removed the space between -c and $skip and added a sed filter in order to remove some spaces when getting $skip. It now works on SCO Unix 3.2 V 4.2. Fri Jan 27 00:27:55 1995 Tudor Hulubei (tudor@cs.pub.ro) * panel.c: a bug in getting symbolic links size has been fixed. Only symbolic links with no target have been affected. Wed Jan 25 17:31:15 1995 Tudor Hulubei (tudor@cs.pub.ro) * panel.c: Added incremental search (isearch). Both isearch-forward and isearch-backward are available. * panel.c: Added scroll step. The default is to scroll this->lines/2 but this can be changed in the configuration file using the StartupScrollStep variable or, dynamically using the set-scroll-step built-in function. * .gitrc.TERM files have been moved to $(prefix)/lib/git/term. There is no point in filling out the $(prefix)/lib directory :-) Thu Jan 12 22:56:10 1995 Tudor Hulubei (tudor@cs.pub.ro) * ^H (8), ^I (9), ^J (10), ^M (13), ^SPC (0) and BACKSPACE (127) can be configured in the configuration files. * panel.c: When copying files that are longer than 64 Kb, the copied percent is displayed on the status bar. * panel.c: The copy_files built-in command can be interrupted in the middle of a file copy action. If the operation is interrupted in the middle, the incomplete file is deleted. * tty.c: ^G is the new interrupt / quit character. * inputline.c: Added input line editing. Most emacs-like editing commands suitable for editing one line of input are now available. Wed Jan 4 21:41:37 1995 Tudor Hulubei (tudor@cs.pub.ro) * tty.c: Interrupt character and quit character are now ^G (as in emacs). gitkeys.c has been changed too. Sun Jan 1 16:22:11 1995 Tudor Hulubei (tudor@cs.pub.ro) * git.c: Added full history support. history_expand() is now called to expand each command entered at the prompt. * git.c: (add_to_environment): New function. The configuration files use now shell environment variables for the editor, mail reader, compress utility, shell and the vmstat (free) program. The user can use some other default editor without modifying the configuration file, just setting GIT_EDITOR to point to the new one. The same rule applies to all the programs mentioned before. Sat Dec 31 19:40:38 1994 Tudor Hulubei (tudor@cs.pub.ro) * Makefile.in: Major changes. I have split the distribution in three directories: src, info and man. The Makefiles have been changed in order to be able to support compilation in a different directory. Fri Dec 30 00:22:25 1994 Tudor Hulubei (tudor@cs.pub.ro) * gitrgrep: New file. Recursive grep might be useful. * xpasswd.c: User / group ids are now cached in order to increase the speed when reading directories. Previous versions used keep track of the last used user / group id, but I think that caching all the user / group ids is better. * fsusage.c: Added support for file system size using fsusage.c from FSF. Thu Dec 29 00:00:22 1994 Tudor Hulubei (tudor@cs.pub.ro) * LSM: Switched to the new LSM style. * panel.c: (panel_getdirinfo): Added support for symbolic links. Wed Dec 28 15:59:21 1994 Tudor Hulubei (tudor@cs.pub.ro) * Makefile.in: Modified to use a BSD compatible install. * .gitrc.TERM: Major changes. Most default bindings have been changed. A new (hopefully better) scheme is used. * configure.in: Converted to autoconf 2.1 Mon Dec 5 14:47:04 1994 Tudor Hulubei * gitps.c: (build_ps_list): char c changed to int c in order to make it work on systems with default unsigned chars (AIX). I should have done this from the very beginning. * xmalloc.c: Check for size == 0. Some systems return a valid pointer if malloc gets called with size == 0 (HP-UX), others return NULL (AIX). * git.c: (fatal): Removed the edit_end() call from clean_up(). It could lead to an endless loop if xmalloc() fails in write_history() because xmalloc() calls fatal() and fatal() calls clean_up() again. Thu Dec 1 14:50:38 1994 Tudor Hulubei * If a .gitrc.TERM configuration file cannot be found, use .gitrc.generic. Sat Nov 26 14:34:47 1994 Tudor Hulubei * tty.c: Added support for System V and BSD terminal interfaces. Wed Nov 23 16:51:41 1994 Tudor Hulubei * gitps.c: (ps): Fixed a bug (referencing a NULL pointer). Thu Nov 10 16:56:53 1994 Tudor Hulubei (tudor@ulise.cs.pub.ro) * tty.c: (tty_get_capabilities): Better support for the hpterm terminal emulator. I've used a really ugly hack for this but I hope I will be able to change it someday. Wed Nov 9 11:33:23 1994 Tudor Hulubei (tudor@ulise.cs.pub.ro) * git.c: (refresh_after_suspend): Better handling of ^Z (the suspend key). The previous version used to wait a key after the fg command was entered at the shell prompt. Fixed. Sun Nov 6 14:31:00 1994 Tudor Hulubei (tudor@ulise.cs.pub.ro) * tty.c: (tty_get_exit_colors): New function. Used to correctly restore the terminal colors at exit. Since there is no way to do that in a terminal independent way (at least none that I know of), I've used two variables in the [Setup] section to specify the default foreground/background for each terminal type. Tue Sep 6 17:24:17 1994 Tudor Hulubei (tudor@ulise.cs.pub.ro) * uitps.c: If the process we want to kill no longer exists, the error message is correctly displayed. * panel.c: (panel_move): Files are really moved, not copied/removed. * uit.c: (getOpCommand): Fixed a bug in %i & %I handling. * configure.in: Fixed a bug in adding -m486 to CFLAGS. Also added -m386 to CFLAGS when i386 is detected. Wed Aug 31 19:45:55 1994 Tudor Hulubei (tudor@ulise.cs.pub.ro) * The file names are quoted before being copied to the command line. The shell is able this way to correctly parse command lines containing ISO9660 CD file names. * fnmatch.c, tilde.c and history.c are compiled only if the requested functions are not found by the configure script in the standard + readline libraries. * A new script has been written (uitredir) to allow uit to capture the standard output of some programs. * We can use symbolic key names in the configuration files. UIT supports F0, F1 ... F10, UP, DOWN, RIGHT, LEFT, UP, DOWN, HOME, END, INS, DEL, PGUP, PGDOWN. * We can configure the uit package using the 'configure' script. It was generated from configure.in using autoconf 1.11. * panel.c: Rewrote the file iterator. Tue Aug 23 13:27:23 1994 Tudor Hulubei (tudor@ulise.cs.pub.ro) * A *lot* code cleanup. * panel.c: Removed max 1024 files limit in a directory. Everything is now dynamically allocated. * panel.c: (panel_move): Added support for moving files between file systems. * GNU alloca.c added to the distribution. Just in case. * Added tilde expansion using the bash source file tilde.c. * Added history using the GNU history library. * uit.c: Added CopySelectedFilesToCmdLn. * uit.c: (getOpCommand): Added %i & %I. Mon Aug 15 11:58:25 1994 Tudor Hulubei (tudor@ulise.cs.pub.ro) * panel.c: Removed a bug in panel_copy & panel_move. Interpreting 's' and 'a' (skip and all) when copying only one file was useless. * uit.c: 0 & 1 have been replaced by n & y in the configuration files. * status.c: (status): uit can display on the status bar the system type, host name, machine type and the current date. * panel.c: (panel_copy): MS-DOS files are copied without the __x bits. * uit.c: ~ added to the new_dir field in the configuration file to be able to get the user's home directory. * tty.c: Code cleanup. Terminal capabilities are used smarter :-). * panel.c: (panel_move): uit can now move files between file systems. * panel.c: (panel_getdirinfo): The number of files is no longer limited to 1024. Fri Jul 29 17:11:34 1994 Tudor Hulubei (tudor@ulise.cs.pub.ro) * tty.c: The cursor can be now hided. Thu Jul 28 01:33:09 1994 Tudor Hulubei (tudor@ulise.cs.pub.ro) * tty.c: Added terminfo support. Wed Jul 27 15:23:30 1994 Tudor Hulubei (tudor@ulise.cs.pub.ro) * uit.c: If we call start() to execute a shell command (a command typed in the command line window) we must fork() not exec(), in order to be able to execute something like that: make man; make info; make -k Doing: exec make man; make info; make -k is *very* silly ! Tue Jul 26 21:43:37 1994 Tudor Hulubei (tudor@ulise.cs.pub.ro) * Using the standard termcap library ... * termcap.h: removed * termcap.l: removed Wed Jul 6 09:30:22 1994 Tudor Hulubei (tudor@ulise.cs.pub.ro) * Makefile: A lot of fixes. * panel.c: (panel_getdirinfo): Fixed a bug in handling big directories. * uitaction: A per file type action script. .uitaction is the local version. * uit.c: Added * uit.c: Added , Thu Jun 30 15:42:09 1994 Tudor Hulubei (tudor@ulise.cs.pub.ro) * tty.c: (tty_getkey): Added support for ^H. ^H is now treated as backspace. * panel.c: (panel_action): Bug fix: uit recovers ok when the current directory name has changed and we try to go to the parent directory. * panel.c: (panel_getdirinfo): We are now checking for bad directories e.g. directories where "." or ".." are missing. Sat Jun 25 13:28:56 1994 Tudor Hulubei (tudor@ulise.cs.pub.ro) * edit.c: I've added a new feature to the command line. The user is now able to delete the last command line word. The built-in command name is . * .uitrc.TERM: The configuration files have been enhanced with commands running in background. * tty.c: a curses-like algorithm was implemented. *NOTHING* is now written to the screen if it is already there. * panel.c: UIT can display now up to 99G of free file system space. * uitview.c: Same bug fix * uitps.c: Same bug fix * uit.c: Bug fix: uit correctly stops when started in background. SIGTTIN & SIGTTOU are no longer catched. Thu Jun 23 11:33:02 1994 Tudor Hulubei (tudor@ulise.cs.pub.ro) * panel.c: Added act_PATTERN_SELECT & act_PATTERN_UNSELECT. * fnmatch.c: Got fnmatch.c and fnmatch.h from bash sources. It is now possible to select a group of files that matches a given pattern. Added LeadingDotMatch variable to the configuration file. Sun Jun 19 12:23:06 1994 Tudor Hulubei (tudor@ulise.cs.pub.ro) * panel.c: (sortfn): 9 sort methods added. StartupFileSortMode sets the initial sort mode (sort by name will be the default). Thu Jun 16 12:25:03 1994 Tudor Hulubei (tudor@ulise.cs.pub.ro) * uit.c: Added ~ support. can be canceled now with TAB. * uitmount: This is a new script which lets the user to auto-mount file systems. Sat Jun 11 00:10:50 1994 Tudor Hulubei (tudor@ulise.cs.pub.ro) * uit.c: Added . * edit.c (edit_gets): Bug fix in getting the key. Stupid. * tty.c (tty_getkey): This function no longer returns KEY_NOKEY. This avoids testing it outside. Mon Jun 6 22:51:01 1994 Tudor Hulubei (tudor@ulise.cs.pub.ro) * unistd.h included in all the files that use SEEK_SET. I don't know if this is really needed but it won't hurt ... * .uitrc.console: TempDirectory changed to /tmp. * .uittermcap: Added xterm description. Mon May 30 00:56:40 1994 Tudor Hulubei (tudor@ulise.cs.pub.ro) * tty.c (tty_getkey): Bug fix: now we are correctly handling the 0 key (uit ignores it). Thu May 19 08:29:46 1994 Tudor Hulubei (tudor@ulise.cs.pub.ro) * uit.texi: Added cross-references. * uit.c: If FrameDisplay is OFF, BUILTIN_Refresh must clear the screen. Wed May 18 08:41:24 1994 Tudor Hulubei (tudor@ulise.cs.pub.ro) * uit.texi: Added Info format documentation. * uit.man: Manual page updated. Tue May 17 03:03:41 1994 Tudor Hulubei (tudor@ulise.cs.pub.ro) * termcap.l (tc): Corrected invalid handle of terminal descriptions when using tc link. * tty.c: (tty_getscreen): tty_getscreen() now checks if the terminal is a virtual console. It calls the ioctl() only if it is. Doing otherwise seems to lead to problems when running under X. * Makefile: changed -O6 to -O2 * Two small bugs corrected. UIT now correctly clears the screen when FrameDisplay is OFF and wait == 1. uitps now correctly jumps to the end of file on files with "magic" sizes. * Added [UITPS-Setup] & [UITVIEW-Setup] to be able to change the status line of both uitps & uitview. * uitps & uitview modified to support full configurable keys. Two sections have been added: [UITPS-Keys] & [UITVIEW-Keys]. Mon May 16 01:21:25 1994 Tudor Hulubei (tudor@ulise.cs.pub.ro) * I've changed the name of the configuration file from .uitrc to .uitrc.TERM where TERM is the value of the TERM environment variable. * Ok, done. UIT now understands any key sequence. Any key sequence can be used, even if it's not supported by termcap. F11, F12, Shift-F..., Ctrl-F... are now available. The .uitrc file is shorter because undefined key sequences have been removed. * Keys are now in a linked list which is still able to detect the first key that doesn't match. Faster. A good start in making UIT able to handle more flexible key definitions. Thu May 12 03:44:16 1994 Tudor Hulubei (tudor@ulise.cs.pub.ro) * tty.c (tty_init): Opening /dev/tty or /dev/console wasn't really necessary and seemed to lead to problems. Removed. gnuit-4.9.5/src/title.c0000644000175000017500000001713211146671376011674 00000000000000/* title.c -- title bar. */ /* Copyright (C) 1993-1999, 2006-2007 Free Software Foundation, Inc. This file is part of gnuit. gnuit 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 3 of the License, or (at your option) any later version. gnuit 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, see http://www.gnu.org/licenses/. */ /* Written by Tudor Hulubei and Andrei Pitis. */ #ifdef HAVE_CONFIG_H #include #endif #include #ifdef HAVE_STDLIB_H #include #else /* !HAVE_STDLIB_H */ #include "ansi_stdlib.h" #endif /* !HAVE_STDLIB_H */ #include #if HAVE_UTIME_H #include #else /* !HAVE_UTIME_H */ #include #endif /* !HAVE_UTIME_H */ #ifdef HAVE_STDDEF_H #include #endif #include #include #include "window.h" #include "xmalloc.h" #include "xstring.h" #include "xio.h" #include "tty.h" #include "title.h" #include "misc.h" char *TitleFields[TITLE_FIELDS] = { "TitleForeground", "TitleBackground", "TitleBrightness", "UserName", "TtyName", "ClockForeground", "ClockBackground", "ClockBrightness", }; #ifdef HAVE_LINUX int TitleColors[TITLE_FIELDS] = { CYAN, BLUE, ON, YELLOW, YELLOW }; #else /* !HAVE_LINUX */ int TitleColors[TITLE_FIELDS] = { WHITE, BLACK, ON, WHITE, WHITE }; #endif /* !HAVE_LINUX */ #define TitleForeground TitleColors[0] #define TitleBackground TitleColors[1] #define TitleBrightness TitleColors[2] #define UserName TitleColors[3] #define TtyName TitleColors[4] #define ClockForeground TitleColors[5] #define ClockBackground TitleColors[6] #define ClockBrightness TitleColors[7] static char *product_name; static int product_name_length; static int login_name_length; static int tty_device_length; /* The length of the "User: tudor tty: /dev/ttyp0" info string. It also includes 6 characters for the clock. */ static int info_length; static char login_string[] = "User:"; static char ttydev_string[] = "tty:"; static char mail_have_none[] = ""; static char mail_have_mail[] = "(Mail)"; static char mail_have_new[] = "(New Mail)"; static char *mail_string = ""; static char *mail_file=NULL; static off64_t mail_size=0; static time_t mail_mtime=0; static window_t *title_window; extern int in_terminal_mode PROTO (()); static int calc_info_length PROTO (()); static int mail_check PROTO (()); static int calc_info_length() { info_length = (sizeof(login_string) - 1) + 1 + login_name_length + 1 + (strlen(mail_string)) + 1 + (sizeof(ttydev_string) - 1) + 1 + tty_device_length + 1 + 6 + 1; return(info_length); } void title_init() { product_name = xmalloc(1 + strlen(PRODUCT) + 1 + strlen(VERSION) + 1); sprintf(product_name, " %s %s", PRODUCT, VERSION); product_name_length = strlen(product_name); login_name_length = strlen(login_name); tty_device_length = strlen(tty_device); mail_file=getenv("MAIL"); if(mail_file) { struct stat s; if(xstat(mail_file,&s) != -1) { mail_size=s.st_size; mail_mtime=s.st_mtime; } } mail_check(); info_length = calc_info_length(); title_window = window_init(); } void title_end() { window_end(title_window); } void title_resize(columns, line) size_t columns, line; { window_resize(title_window, 0, line, 1, columns); } /* * Update the title clock and check for mail. If signum is 0 it means that * clock_refresh() has been called synchronously and no terminal * flushing is necessary at this point. */ void clock_refresh(signum) int signum; { int hour; char buf[16]; struct tm *time; int line, column; tty_status_t status; if (in_terminal_mode()) return; if (product_name_length + 2 + info_length >= title_window->columns) return; /* signum means we weren't called from title_update */ if(signum && mail_check()) { title_update(); } time = get_local_time(); tty_save(&status); tty_get_cursor(&line, &column); tty_cursor(OFF); if ((hour = time->tm_hour % 12) == 0) hour = 12; sprintf(buf, "%2d:%02d%c", hour, time->tm_min, (time->tm_hour < 12) ? 'a' : 'p'); window_goto(title_window, 0, title_window->columns - 7); tty_colors(ClockBrightness, ClockForeground, ClockBackground); window_puts(title_window, buf, strlen(buf)); tty_goto(line, column); tty_restore(&status); if (signum) tty_update(); } static int mail_check() { char *old_mail=mail_string; mail_string=mail_have_none; int total=0; int read=0; int inheaders=0; int gotstatus=0; FILE *mbox; #define TMPBUFSIZE 2048 char line[TMPBUFSIZE]; struct stat s; struct utimbuf utbuf; if(!mail_file) return 0; if(xstat(mail_file,&s) == -1) return 0; utbuf.actime=s.st_atime; utbuf.modtime=s.st_mtime; mbox=fopen(mail_file,"r"); if(!mbox) return 0; while(fgets(line,TMPBUFSIZE,mbox)) { if(strcmp(line,"")==0) inheaders=0; else if(strncmp(line,"From ",strlen("From ")) == 0) { inheaders=1; gotstatus=0; total++; } else if(inheaders && !gotstatus && (strncmp(line,"Status:",strlen("Status:"))==0)) { char *status=strchr(line,':'); status++; while(*status && isspace(*status)) status++; if(*status) { gotstatus=1; if(strchr(status,'R')) read++; } } } fclose(mbox); utime(mail_file,&utbuf); if(total) { if(total-read) { mail_string=mail_have_new; } else { mail_string=mail_have_mail; } } info_length=calc_info_length(); if(strcmp(mail_string,old_mail) == 0) return 0; /* No change */ else return 1; /* need to update title */ } void title_update() { int length; char *buf; tty_status_t status; tty_save(&status); tty_colors(TitleBrightness, TitleForeground, TitleBackground); window_goto(title_window, 0, 0); window_puts(title_window, product_name, product_name_length); buf = xmalloc(title_window->columns + 1); mail_check(); if (product_name_length + 2 + info_length < title_window->columns) { length = title_window->columns - product_name_length - info_length; assert(length > 0); memset(buf, ' ', length); window_puts(title_window, buf, length); window_goto(title_window, 0, product_name_length + length); window_puts(title_window, login_string, sizeof(login_string) - 1); window_putc(title_window, ' '); tty_foreground(UserName); window_puts(title_window, login_name, login_name_length); window_putc(title_window, ' '); window_puts(title_window, mail_string, strlen(mail_string)); window_putc(title_window, ' '); tty_foreground(TitleForeground); window_puts(title_window, ttydev_string, sizeof(ttydev_string) - 1); window_putc(title_window, ' '); tty_foreground(TtyName); window_puts(title_window, tty_device, tty_device_length); tty_foreground(TitleForeground); window_putc(title_window, ' '); clock_refresh(0); window_goto(title_window, 0, title_window->columns - 1); window_putc(title_window, ' '); } else if (product_name_length < title_window->columns) { length = title_window->columns - product_name_length; memset(buf, ' ', length); window_puts(title_window, buf, length); } xfree(buf); tty_restore(&status); } gnuit-4.9.5/src/window.h0000644000175000017500000000351611146671376012070 00000000000000/* window.h -- Data structures and function prototypes used by window.c. */ /* Copyright (C) 1993-1999, 2006-2007 Free Software Foundation, Inc. This file is part of gnuit. gnuit 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 3 of the License, or (at your option) any later version. gnuit 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, see http://www.gnu.org/licenses/. */ /* Written by Tudor Hulubei and Andrei Pitis. */ #ifndef _GIT_WINDOW_H #define _GIT_WINDOW_H #include #ifdef HAVE_STDDEF_H #include #endif #include "stdc.h" typedef struct { int x; /* window's x origin in the tty screen. */ int y; /* window's y origin in the tty screen. */ int lines; /* window's number of lines. */ int columns; /* window's number of columns. */ int cursor_x; /* window's cursor current x position. */ int cursor_y; /* window's cursor current y position. */ } window_t; extern window_t *window_init PROTO (()); extern void window_end PROTO ((window_t *)); extern void window_resize PROTO ((window_t *, int, int, int, int)); extern int window_puts PROTO ((window_t *, char *, int)); extern int window_putc PROTO ((window_t *, int)); extern void window_goto PROTO ((window_t *, int, int)); extern int window_x PROTO ((window_t *)); extern int window_y PROTO ((window_t *)); extern int window_lines PROTO ((window_t *)); extern int window_columns PROTO ((window_t *)); #endif /* _GIT_WINDOW_H */ gnuit-4.9.5/src/Makefile.in0000644000175000017500000010347111146671376012456 00000000000000# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 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@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. 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 = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = gitfm$(EXEEXT) gitps$(EXEEXT) gitview$(EXEEXT) \ gitwipe$(EXEEXT) gitkeys$(EXEEXT) gitwhich$(EXEEXT) @DEBIAN_TRUE@am__append_1 = -DDEBIAN subdir = src DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ChangeLog ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \ $(top_srcdir)/m4/alloca.m4 $(top_srcdir)/m4/argmatch.m4 \ $(top_srcdir)/m4/clock_time.m4 $(top_srcdir)/m4/codeset.m4 \ $(top_srcdir)/m4/dirname.m4 $(top_srcdir)/m4/dos.m4 \ $(top_srcdir)/m4/double-slash-root.m4 \ $(top_srcdir)/m4/eealloc.m4 $(top_srcdir)/m4/errno_h.m4 \ $(top_srcdir)/m4/error.m4 $(top_srcdir)/m4/exitfail.m4 \ $(top_srcdir)/m4/extensions.m4 $(top_srcdir)/m4/fcntl_h.m4 \ $(top_srcdir)/m4/flexmember.m4 $(top_srcdir)/m4/fnmatch.m4 \ $(top_srcdir)/m4/fsusage.m4 $(top_srcdir)/m4/getopt.m4 \ $(top_srcdir)/m4/gettime.m4 $(top_srcdir)/m4/gettimeofday.m4 \ $(top_srcdir)/m4/glibc21.m4 $(top_srcdir)/m4/gnulib-common.m4 \ $(top_srcdir)/m4/gnulib-comp.m4 $(top_srcdir)/m4/human.m4 \ $(top_srcdir)/m4/idcache.m4 $(top_srcdir)/m4/include_next.m4 \ $(top_srcdir)/m4/inline.m4 $(top_srcdir)/m4/inttypes-pri.m4 \ $(top_srcdir)/m4/inttypes.m4 $(top_srcdir)/m4/localcharset.m4 \ $(top_srcdir)/m4/locale-fr.m4 $(top_srcdir)/m4/locale-ja.m4 \ $(top_srcdir)/m4/locale-zh.m4 $(top_srcdir)/m4/longlong.m4 \ $(top_srcdir)/m4/lstat.m4 $(top_srcdir)/m4/malloc.m4 \ $(top_srcdir)/m4/malloca.m4 $(top_srcdir)/m4/mbchar.m4 \ $(top_srcdir)/m4/mbiter.m4 $(top_srcdir)/m4/mbrtowc.m4 \ $(top_srcdir)/m4/mbsinit.m4 $(top_srcdir)/m4/mbslen.m4 \ $(top_srcdir)/m4/mbsstr.m4 $(top_srcdir)/m4/mbstate_t.m4 \ $(top_srcdir)/m4/memmove.m4 $(top_srcdir)/m4/mkstemp.m4 \ $(top_srcdir)/m4/multiarch.m4 $(top_srcdir)/m4/nanosleep.m4 \ $(top_srcdir)/m4/onceonly.m4 $(top_srcdir)/m4/open.m4 \ $(top_srcdir)/m4/putenv.m4 $(top_srcdir)/m4/quote.m4 \ $(top_srcdir)/m4/quotearg.m4 $(top_srcdir)/m4/readlink.m4 \ $(top_srcdir)/m4/rename.m4 $(top_srcdir)/m4/safe-read.m4 \ $(top_srcdir)/m4/safe-write.m4 $(top_srcdir)/m4/sigaction.m4 \ $(top_srcdir)/m4/signal_h.m4 \ $(top_srcdir)/m4/signalblocking.m4 $(top_srcdir)/m4/ssize_t.m4 \ $(top_srcdir)/m4/stdbool.m4 $(top_srcdir)/m4/stdint.m4 \ $(top_srcdir)/m4/stdlib_h.m4 $(top_srcdir)/m4/strcase.m4 \ $(top_srcdir)/m4/strcasestr.m4 $(top_srcdir)/m4/strerror.m4 \ $(top_srcdir)/m4/string_h.m4 $(top_srcdir)/m4/strings_h.m4 \ $(top_srcdir)/m4/strndup.m4 $(top_srcdir)/m4/strnlen.m4 \ $(top_srcdir)/m4/strtoimax.m4 $(top_srcdir)/m4/strtol.m4 \ $(top_srcdir)/m4/strtoll.m4 $(top_srcdir)/m4/strtoul.m4 \ $(top_srcdir)/m4/strtoull.m4 $(top_srcdir)/m4/strtoumax.m4 \ $(top_srcdir)/m4/sys_select_h.m4 \ $(top_srcdir)/m4/sys_socket_h.m4 \ $(top_srcdir)/m4/sys_stat_h.m4 $(top_srcdir)/m4/sys_time_h.m4 \ $(top_srcdir)/m4/tempname.m4 $(top_srcdir)/m4/time_h.m4 \ $(top_srcdir)/m4/timespec.m4 $(top_srcdir)/m4/unistd_h.m4 \ $(top_srcdir)/m4/utimbuf.m4 $(top_srcdir)/m4/utime.m4 \ $(top_srcdir)/m4/utimes-null.m4 $(top_srcdir)/m4/wchar.m4 \ $(top_srcdir)/m4/wchar_t.m4 $(top_srcdir)/m4/wctype.m4 \ $(top_srcdir)/m4/wcwidth.m4 $(top_srcdir)/m4/wint_t.m4 \ $(top_srcdir)/m4/write.m4 $(top_srcdir)/m4/xalloc.m4 \ $(top_srcdir)/m4/xstrndup.m4 $(top_srcdir)/m4/xstrtol.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)" binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) PROGRAMS = $(bin_PROGRAMS) am_gitfm_OBJECTS = git.$(OBJEXT) tty.$(OBJEXT) window.$(OBJEXT) \ inputline.$(OBJEXT) status.$(OBJEXT) panel.$(OBJEXT) \ title.$(OBJEXT) configure.$(OBJEXT) misc.$(OBJEXT) \ signals.$(OBJEXT) xmalloc.$(OBJEXT) xio.$(OBJEXT) \ xstack.$(OBJEXT) system.$(OBJEXT) tilde.$(OBJEXT) \ history.$(OBJEXT) gitfm_OBJECTS = $(am_gitfm_OBJECTS) am__DEPENDENCIES_1 = gitfm_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) am_gitkeys_OBJECTS = gitkeys.$(OBJEXT) gitkeys_OBJECTS = $(am_gitkeys_OBJECTS) gitkeys_LDADD = $(LDADD) am_gitps_OBJECTS = gitps.$(OBJEXT) tty.$(OBJEXT) window.$(OBJEXT) \ misc.$(OBJEXT) configure.$(OBJEXT) signals.$(OBJEXT) \ xio.$(OBJEXT) xmalloc.$(OBJEXT) gitps_OBJECTS = $(am_gitps_OBJECTS) gitps_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) am_gitview_OBJECTS = gitview.$(OBJEXT) tty.$(OBJEXT) window.$(OBJEXT) \ misc.$(OBJEXT) configure.$(OBJEXT) signals.$(OBJEXT) \ xio.$(OBJEXT) xmalloc.$(OBJEXT) gitview_OBJECTS = $(am_gitview_OBJECTS) gitview_DEPENDENCIES = $(am__DEPENDENCIES_1) am_gitwhich_OBJECTS = gitwhich.$(OBJEXT) xmalloc.$(OBJEXT) gitwhich_OBJECTS = $(am_gitwhich_OBJECTS) gitwhich_DEPENDENCIES = $(am__DEPENDENCIES_1) am_gitwipe_OBJECTS = gitwipe.$(OBJEXT) gitwipe_OBJECTS = $(am_gitwipe_OBJECTS) gitwipe_LDADD = $(LDADD) binSCRIPT_INSTALL = $(INSTALL_SCRIPT) SCRIPTS = $(bin_SCRIPTS) DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) 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 = $(gitfm_SOURCES) $(EXTRA_gitfm_SOURCES) $(gitkeys_SOURCES) \ $(gitps_SOURCES) $(gitview_SOURCES) $(gitwhich_SOURCES) \ $(gitwipe_SOURCES) DIST_SOURCES = $(gitfm_SOURCES) $(EXTRA_gitfm_SOURCES) \ $(gitkeys_SOURCES) $(gitps_SOURCES) $(gitview_SOURCES) \ $(gitwhich_SOURCES) $(gitwipe_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) INSTALL = @INSTALL@ ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ ALLOCA_H = @ALLOCA_H@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BITSIZEOF_PTRDIFF_T = @BITSIZEOF_PTRDIFF_T@ BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@ BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@ BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@ BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CLEANFILES = @CLEANFILES@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEBIAN_FALSE = @DEBIAN_FALSE@ DEBIAN_TRUE = @DEBIAN_TRUE@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EMULTIHOP_HIDDEN = @EMULTIHOP_HIDDEN@ EMULTIHOP_VALUE = @EMULTIHOP_VALUE@ ENOLINK_HIDDEN = @ENOLINK_HIDDEN@ ENOLINK_VALUE = @ENOLINK_VALUE@ EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@ EOVERFLOW_VALUE = @EOVERFLOW_VALUE@ ERRNO_H = @ERRNO_H@ EXEEXT = @EXEEXT@ FCNTL_H = @FCNTL_H@ FNMATCH_H = @FNMATCH_H@ GETOPT_H = @GETOPT_H@ GLIBC21 = @GLIBC21@ GL_COND_LIBTOOL_FALSE = @GL_COND_LIBTOOL_FALSE@ GL_COND_LIBTOOL_TRUE = @GL_COND_LIBTOOL_TRUE@ GNULIB_ACCEPT = @GNULIB_ACCEPT@ GNULIB_ATOLL = @GNULIB_ATOLL@ GNULIB_BIND = @GNULIB_BIND@ GNULIB_BTOWC = @GNULIB_BTOWC@ GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@ GNULIB_CHOWN = @GNULIB_CHOWN@ GNULIB_CLOSE = @GNULIB_CLOSE@ GNULIB_CONNECT = @GNULIB_CONNECT@ GNULIB_DUP2 = @GNULIB_DUP2@ GNULIB_ENVIRON = @GNULIB_ENVIRON@ GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@ GNULIB_FCHDIR = @GNULIB_FCHDIR@ GNULIB_FSYNC = @GNULIB_FSYNC@ GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@ GNULIB_GETCWD = @GNULIB_GETCWD@ GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@ GNULIB_GETDTABLESIZE = @GNULIB_GETDTABLESIZE@ GNULIB_GETHOSTNAME = @GNULIB_GETHOSTNAME@ GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@ GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@ GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@ GNULIB_GETPEERNAME = @GNULIB_GETPEERNAME@ GNULIB_GETSOCKNAME = @GNULIB_GETSOCKNAME@ GNULIB_GETSOCKOPT = @GNULIB_GETSOCKOPT@ GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@ GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@ GNULIB_IMAXABS = @GNULIB_IMAXABS@ GNULIB_IMAXDIV = @GNULIB_IMAXDIV@ GNULIB_LCHMOD = @GNULIB_LCHMOD@ GNULIB_LCHOWN = @GNULIB_LCHOWN@ GNULIB_LINK = @GNULIB_LINK@ GNULIB_LISTEN = @GNULIB_LISTEN@ GNULIB_LSEEK = @GNULIB_LSEEK@ GNULIB_LSTAT = @GNULIB_LSTAT@ GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@ GNULIB_MBRLEN = @GNULIB_MBRLEN@ GNULIB_MBRTOWC = @GNULIB_MBRTOWC@ GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@ GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@ GNULIB_MBSCHR = @GNULIB_MBSCHR@ GNULIB_MBSCSPN = @GNULIB_MBSCSPN@ GNULIB_MBSINIT = @GNULIB_MBSINIT@ GNULIB_MBSLEN = @GNULIB_MBSLEN@ GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@ GNULIB_MBSNLEN = @GNULIB_MBSNLEN@ GNULIB_MBSNRTOWCS = @GNULIB_MBSNRTOWCS@ GNULIB_MBSPBRK = @GNULIB_MBSPBRK@ GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@ GNULIB_MBSRCHR = @GNULIB_MBSRCHR@ GNULIB_MBSRTOWCS = @GNULIB_MBSRTOWCS@ GNULIB_MBSSEP = @GNULIB_MBSSEP@ GNULIB_MBSSPN = @GNULIB_MBSSPN@ GNULIB_MBSSTR = @GNULIB_MBSSTR@ GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@ GNULIB_MEMMEM = @GNULIB_MEMMEM@ GNULIB_MEMPCPY = @GNULIB_MEMPCPY@ GNULIB_MEMRCHR = @GNULIB_MEMRCHR@ GNULIB_MKDTEMP = @GNULIB_MKDTEMP@ GNULIB_MKSTEMP = @GNULIB_MKSTEMP@ GNULIB_OPEN = @GNULIB_OPEN@ GNULIB_PUTENV = @GNULIB_PUTENV@ GNULIB_RANDOM_R = @GNULIB_RANDOM_R@ GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@ GNULIB_READLINK = @GNULIB_READLINK@ GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@ GNULIB_RECV = @GNULIB_RECV@ GNULIB_RECVFROM = @GNULIB_RECVFROM@ GNULIB_RPMATCH = @GNULIB_RPMATCH@ GNULIB_SELECT = @GNULIB_SELECT@ GNULIB_SEND = @GNULIB_SEND@ GNULIB_SENDTO = @GNULIB_SENDTO@ GNULIB_SETENV = @GNULIB_SETENV@ GNULIB_SETSOCKOPT = @GNULIB_SETSOCKOPT@ GNULIB_SHUTDOWN = @GNULIB_SHUTDOWN@ GNULIB_SIGACTION = @GNULIB_SIGACTION@ GNULIB_SIGNAL_H_SIGPIPE = @GNULIB_SIGNAL_H_SIGPIPE@ GNULIB_SIGPROCMASK = @GNULIB_SIGPROCMASK@ GNULIB_SLEEP = @GNULIB_SLEEP@ GNULIB_SOCKET = @GNULIB_SOCKET@ GNULIB_STPCPY = @GNULIB_STPCPY@ GNULIB_STPNCPY = @GNULIB_STPNCPY@ GNULIB_STRCASESTR = @GNULIB_STRCASESTR@ GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@ GNULIB_STRDUP = @GNULIB_STRDUP@ GNULIB_STRERROR = @GNULIB_STRERROR@ GNULIB_STRNDUP = @GNULIB_STRNDUP@ GNULIB_STRNLEN = @GNULIB_STRNLEN@ GNULIB_STRPBRK = @GNULIB_STRPBRK@ GNULIB_STRSEP = @GNULIB_STRSEP@ GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@ GNULIB_STRSTR = @GNULIB_STRSTR@ GNULIB_STRTOD = @GNULIB_STRTOD@ GNULIB_STRTOIMAX = @GNULIB_STRTOIMAX@ GNULIB_STRTOK_R = @GNULIB_STRTOK_R@ GNULIB_STRTOLL = @GNULIB_STRTOLL@ GNULIB_STRTOULL = @GNULIB_STRTOULL@ GNULIB_STRTOUMAX = @GNULIB_STRTOUMAX@ GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@ GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@ GNULIB_UNSETENV = @GNULIB_UNSETENV@ GNULIB_WCRTOMB = @GNULIB_WCRTOMB@ GNULIB_WCSNRTOMBS = @GNULIB_WCSNRTOMBS@ GNULIB_WCSRTOMBS = @GNULIB_WCSRTOMBS@ GNULIB_WCTOB = @GNULIB_WCTOB@ GNULIB_WCWIDTH = @GNULIB_WCWIDTH@ GNULIB_WRITE = @GNULIB_WRITE@ GREP = @GREP@ HAVE_ATOLL = @HAVE_ATOLL@ HAVE_BTOWC = @HAVE_BTOWC@ HAVE_CALLOC_POSIX = @HAVE_CALLOC_POSIX@ HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@ HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@ HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@ HAVE_DECL_IMAXABS = @HAVE_DECL_IMAXABS@ HAVE_DECL_IMAXDIV = @HAVE_DECL_IMAXDIV@ HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@ HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@ HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@ HAVE_DECL_STRERROR = @HAVE_DECL_STRERROR@ HAVE_DECL_STRNCASECMP = @HAVE_DECL_STRNCASECMP@ HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@ HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@ HAVE_DECL_STRSIGNAL = @HAVE_DECL_STRSIGNAL@ HAVE_DECL_STRTOIMAX = @HAVE_DECL_STRTOIMAX@ HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@ HAVE_DECL_STRTOUMAX = @HAVE_DECL_STRTOUMAX@ HAVE_DECL_WCTOB = @HAVE_DECL_WCTOB@ HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@ HAVE_DUP2 = @HAVE_DUP2@ HAVE_EUIDACCESS = @HAVE_EUIDACCESS@ HAVE_FSYNC = @HAVE_FSYNC@ HAVE_FTRUNCATE = @HAVE_FTRUNCATE@ HAVE_GETDOMAINNAME = @HAVE_GETDOMAINNAME@ HAVE_GETDTABLESIZE = @HAVE_GETDTABLESIZE@ HAVE_GETHOSTNAME = @HAVE_GETHOSTNAME@ HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@ HAVE_GETSUBOPT = @HAVE_GETSUBOPT@ HAVE_GETUSERSHELL = @HAVE_GETUSERSHELL@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_ISWCNTRL = @HAVE_ISWCNTRL@ HAVE_LCHMOD = @HAVE_LCHMOD@ HAVE_LINK = @HAVE_LINK@ HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@ HAVE_LSTAT = @HAVE_LSTAT@ HAVE_MALLOC_POSIX = @HAVE_MALLOC_POSIX@ HAVE_MBRLEN = @HAVE_MBRLEN@ HAVE_MBRTOWC = @HAVE_MBRTOWC@ HAVE_MBSINIT = @HAVE_MBSINIT@ HAVE_MBSNRTOWCS = @HAVE_MBSNRTOWCS@ HAVE_MBSRTOWCS = @HAVE_MBSRTOWCS@ HAVE_MEMPCPY = @HAVE_MEMPCPY@ HAVE_MKDTEMP = @HAVE_MKDTEMP@ HAVE_OS_H = @HAVE_OS_H@ HAVE_POSIX_SIGNALBLOCKING = @HAVE_POSIX_SIGNALBLOCKING@ HAVE_RANDOM_H = @HAVE_RANDOM_H@ HAVE_RANDOM_R = @HAVE_RANDOM_R@ HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@ HAVE_READLINK = @HAVE_READLINK@ HAVE_REALLOC_POSIX = @HAVE_REALLOC_POSIX@ HAVE_RPMATCH = @HAVE_RPMATCH@ HAVE_SETENV = @HAVE_SETENV@ HAVE_SIGACTION = @HAVE_SIGACTION@ HAVE_SIGINFO_T = @HAVE_SIGINFO_T@ HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@ HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@ HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@ HAVE_SIGSET_T = @HAVE_SIGSET_T@ HAVE_SLEEP = @HAVE_SLEEP@ HAVE_STDINT_H = @HAVE_STDINT_H@ HAVE_STPCPY = @HAVE_STPCPY@ HAVE_STPNCPY = @HAVE_STPNCPY@ HAVE_STRCASECMP = @HAVE_STRCASECMP@ HAVE_STRCASESTR = @HAVE_STRCASESTR@ HAVE_STRCHRNUL = @HAVE_STRCHRNUL@ HAVE_STRNDUP = @HAVE_STRNDUP@ HAVE_STRPBRK = @HAVE_STRPBRK@ HAVE_STRSEP = @HAVE_STRSEP@ HAVE_STRTOD = @HAVE_STRTOD@ HAVE_STRTOLL = @HAVE_STRTOLL@ HAVE_STRTOULL = @HAVE_STRTOULL@ HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@ HAVE_STRUCT_SIGACTION_SA_SIGACTION = @HAVE_STRUCT_SIGACTION_SA_SIGACTION@ HAVE_STRUCT_TIMEVAL = @HAVE_STRUCT_TIMEVAL@ HAVE_STRVERSCMP = @HAVE_STRVERSCMP@ HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@ HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@ HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@ HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@ HAVE_SYS_SELECT_H = @HAVE_SYS_SELECT_H@ HAVE_SYS_SOCKET_H = @HAVE_SYS_SOCKET_H@ HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ HAVE_UNISTD_H = @HAVE_UNISTD_H@ HAVE_UNSETENV = @HAVE_UNSETENV@ HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@ HAVE_WCHAR_H = @HAVE_WCHAR_H@ HAVE_WCRTOMB = @HAVE_WCRTOMB@ HAVE_WCSNRTOMBS = @HAVE_WCSNRTOMBS@ HAVE_WCSRTOMBS = @HAVE_WCSRTOMBS@ HAVE_WCTYPE_H = @HAVE_WCTYPE_H@ HAVE_WINSOCK2_H = @HAVE_WINSOCK2_H@ HAVE_WINT_T = @HAVE_WINT_T@ HAVE_WS2TCPIP_H = @HAVE_WS2TCPIP_H@ HAVE__BOOL = @HAVE__BOOL@ HOST = @HOST@ HTMLDOCS_MAKEINFO_FALSE = @HTMLDOCS_MAKEINFO_FALSE@ HTMLDOCS_MAKEINFO_TRUE = @HTMLDOCS_MAKEINFO_TRUE@ HTMLDOCS_TEXI2HTML_FALSE = @HTMLDOCS_TEXI2HTML_FALSE@ HTMLDOCS_TEXI2HTML_TRUE = @HTMLDOCS_TEXI2HTML_TRUE@ INCLUDES = @INCLUDES@ INCLUDE_NEXT = @INCLUDE_NEXT@ INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INT32_MAX_LT_INTMAX_MAX = @INT32_MAX_LT_INTMAX_MAX@ INT64_MAX_EQ_LONG_MAX = @INT64_MAX_EQ_LONG_MAX@ INTTYPES_H = @INTTYPES_H@ LDFLAGS = @LDFLAGS@ LIBGNU_LIBDEPS = @LIBGNU_LIBDEPS@ LIBGNU_LTLIBDEPS = @LIBGNU_LTLIBDEPS@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@ LIB_NANOSLEEP = @LIB_NANOSLEEP@ LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@ LOCALE_FR_UTF8 = @LOCALE_FR_UTF8@ LOCALE_JA = @LOCALE_JA@ LOCALE_ZH_CN = @LOCALE_ZH_CN@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAKE = @MAKE@ MAKEINFO = @MAKEINFO@ NEXT_ERRNO_H = @NEXT_ERRNO_H@ NEXT_FCNTL_H = @NEXT_FCNTL_H@ NEXT_INTTYPES_H = @NEXT_INTTYPES_H@ NEXT_SIGNAL_H = @NEXT_SIGNAL_H@ NEXT_STDINT_H = @NEXT_STDINT_H@ NEXT_STDLIB_H = @NEXT_STDLIB_H@ NEXT_STRINGS_H = @NEXT_STRINGS_H@ NEXT_STRING_H = @NEXT_STRING_H@ NEXT_SYS_SELECT_H = @NEXT_SYS_SELECT_H@ NEXT_SYS_SOCKET_H = @NEXT_SYS_SOCKET_H@ NEXT_SYS_STAT_H = @NEXT_SYS_STAT_H@ NEXT_SYS_TIME_H = @NEXT_SYS_TIME_H@ NEXT_TIME_H = @NEXT_TIME_H@ NEXT_UNISTD_H = @NEXT_UNISTD_H@ NEXT_WCHAR_H = @NEXT_WCHAR_H@ NEXT_WCTYPE_H = @NEXT_WCTYPE_H@ 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@ PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@ PRIPTR_PREFIX = @PRIPTR_PREFIX@ PRI_MACROS_BROKEN = @PRI_MACROS_BROKEN@ PRODUCT = @PRODUCT@ PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@ RANLIB = @RANLIB@ REPLACE_BTOWC = @REPLACE_BTOWC@ REPLACE_CHOWN = @REPLACE_CHOWN@ REPLACE_CLOSE = @REPLACE_CLOSE@ REPLACE_FCHDIR = @REPLACE_FCHDIR@ REPLACE_GETCWD = @REPLACE_GETCWD@ REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@ REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@ REPLACE_ISWCNTRL = @REPLACE_ISWCNTRL@ REPLACE_LCHOWN = @REPLACE_LCHOWN@ REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@ REPLACE_LSEEK = @REPLACE_LSEEK@ REPLACE_LSTAT = @REPLACE_LSTAT@ REPLACE_MBRLEN = @REPLACE_MBRLEN@ REPLACE_MBRTOWC = @REPLACE_MBRTOWC@ REPLACE_MBSINIT = @REPLACE_MBSINIT@ REPLACE_MBSNRTOWCS = @REPLACE_MBSNRTOWCS@ REPLACE_MBSRTOWCS = @REPLACE_MBSRTOWCS@ REPLACE_MBSTATE_T = @REPLACE_MBSTATE_T@ REPLACE_MEMMEM = @REPLACE_MEMMEM@ REPLACE_MKDIR = @REPLACE_MKDIR@ REPLACE_MKSTEMP = @REPLACE_MKSTEMP@ REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@ REPLACE_OPEN = @REPLACE_OPEN@ REPLACE_PUTENV = @REPLACE_PUTENV@ REPLACE_STRCASESTR = @REPLACE_STRCASESTR@ REPLACE_STRDUP = @REPLACE_STRDUP@ REPLACE_STRERROR = @REPLACE_STRERROR@ REPLACE_STRPTIME = @REPLACE_STRPTIME@ REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@ REPLACE_STRSTR = @REPLACE_STRSTR@ REPLACE_STRTOD = @REPLACE_STRTOD@ REPLACE_TIMEGM = @REPLACE_TIMEGM@ REPLACE_WCRTOMB = @REPLACE_WCRTOMB@ REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@ REPLACE_WCTOB = @REPLACE_WCTOB@ REPLACE_WCWIDTH = @REPLACE_WCWIDTH@ REPLACE_WRITE = @REPLACE_WRITE@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@ SIZE_T_SUFFIX = @SIZE_T_SUFFIX@ STDBOOL_H = @STDBOOL_H@ STDINT_H = @STDINT_H@ STRIP = @STRIP@ SYS_SELECT_H = @SYS_SELECT_H@ SYS_SOCKET_H = @SYS_SOCKET_H@ SYS_STAT_H = @SYS_STAT_H@ SYS_TIME_H = @SYS_TIME_H@ SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ TEXI2DVI = @TEXI2DVI@ TEXI2HTML = @TEXI2HTML@ TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@ TRANSITION_FALSE = @TRANSITION_FALSE@ TRANSITION_TRUE = @TRANSITION_TRUE@ UINT32_MAX_LT_UINTMAX_MAX = @UINT32_MAX_LT_UINTMAX_MAX@ UINT64_MAX_EQ_ULONG_MAX = @UINT64_MAX_EQ_ULONG_MAX@ UNISTD_H_HAVE_WINSOCK2_H = @UNISTD_H_HAVE_WINSOCK2_H@ VERSION = @VERSION@ VOID_UNSETENV = @VOID_UNSETENV@ WCHAR_H = @WCHAR_H@ WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@ WCTYPE_H = @WCTYPE_H@ WINT_T_SUFFIX = @WINT_T_SUFFIX@ ac_ct_CC = @ac_ct_CC@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ 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 = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ gl_LIBOBJS = @gl_LIBOBJS@ gl_LTLIBOBJS = @gl_LTLIBOBJS@ gltests_LIBOBJS = @gltests_LIBOBJS@ gltests_LTLIBOBJS = @gltests_LTLIBOBJS@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ 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@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ EXTRA_DIST = gitaction gitmkdirs gitmount gitrgrep gitunpack gitxgrep\ .gitaction .gdbinit git.transition gitdpkgname bin_SCRIPTS = gitaction gitmkdirs gitmount gitrgrep gitunpack gitxgrep\ .gitaction gitdpkgname # We're not including tilde.c & tilde.h here because they are # automagically detected (configure.in includes them in LIBOBJS). EXTRA_gitfm_SOURCES = ansi_stdlib.h file.h stat.h stdc.h xtime.h gitfm_SOURCES = git.c tty.c tty.h window.c window.h inputline.c inputline.h\ status.c status.h panel.c panel.h title.c title.h\ configure.c configure.h misc.c misc.h signals.c signals.h\ xmalloc.c xmalloc.h xstring.h xio.c xio.h\ xstack.c xstack.h system.c system.h \ tilde.c tilde.h history.c history.h gitps_SOURCES = gitps.c tty.c tty.h window.c window.h misc.c misc.h\ configure.c configure.h signals.c signals.h xio.c xio.h\ xmalloc.c xmalloc.h xstring.h gitview_SOURCES = gitview.c tty.c tty.h window.c window.h misc.c misc.h\ configure.c configure.h signals.c signals.h xio.c xio.h\ xmalloc.c xmalloc.h xstring.h gitwipe_SOURCES = gitwipe.c gitkeys_SOURCES = gitkeys.c gitwhich_SOURCES = gitwhich.c xmalloc.c xmalloc.h gitfm_LDADD = -L../lib -lgnu $(LIB_CLOCK_GETTIME) $(LIB_NANOSLEEP) $(LIBINTL) gitps_LDADD = -L../lib -lgnu $(LIB_CLOCK_GETTIME) $(LIB_NANOSLEEP) $(LIBINTL) gitview_LDADD = -L../lib -lgnu $(LIBINTL) gitwhich_LDADD = -L../lib -lgnu $(LIBINTL) AM_CPPFLAGS = -I$(srcdir)/.. -I.. -I$(top_srcdir)/lib \ -I$(top_srcdir)/src $(am__append_1) @DEBIAN_TRUE@gitfm_LDFLAGS = -Wl,-z,defs -Wl,--as-needed @DEBIAN_TRUE@gitps_LDFLAGS = -Wl,-z,defs -Wl,--as-needed @DEBIAN_TRUE@gitview_LDFLAGS = -Wl,-z,defs -Wl,--as-needed @DEBIAN_TRUE@gitwipe_LDFLAGS = -Wl,-z,defs -Wl,--as-needed @DEBIAN_TRUE@gitkeys_LDFLAGS = -Wl,-z,defs -Wl,--as-needed @DEBIAN_TRUE@gitwhich_LDFLAGS = -Wl,-z,defs -Wl,--as-needed 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) --foreign src/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --foreign 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) gitfm$(EXEEXT): $(gitfm_OBJECTS) $(gitfm_DEPENDENCIES) @rm -f gitfm$(EXEEXT) $(LINK) $(gitfm_LDFLAGS) $(gitfm_OBJECTS) $(gitfm_LDADD) $(LIBS) gitkeys$(EXEEXT): $(gitkeys_OBJECTS) $(gitkeys_DEPENDENCIES) @rm -f gitkeys$(EXEEXT) $(LINK) $(gitkeys_LDFLAGS) $(gitkeys_OBJECTS) $(gitkeys_LDADD) $(LIBS) gitps$(EXEEXT): $(gitps_OBJECTS) $(gitps_DEPENDENCIES) @rm -f gitps$(EXEEXT) $(LINK) $(gitps_LDFLAGS) $(gitps_OBJECTS) $(gitps_LDADD) $(LIBS) gitview$(EXEEXT): $(gitview_OBJECTS) $(gitview_DEPENDENCIES) @rm -f gitview$(EXEEXT) $(LINK) $(gitview_LDFLAGS) $(gitview_OBJECTS) $(gitview_LDADD) $(LIBS) gitwhich$(EXEEXT): $(gitwhich_OBJECTS) $(gitwhich_DEPENDENCIES) @rm -f gitwhich$(EXEEXT) $(LINK) $(gitwhich_LDFLAGS) $(gitwhich_OBJECTS) $(gitwhich_LDADD) $(LIBS) gitwipe$(EXEEXT): $(gitwipe_OBJECTS) $(gitwipe_DEPENDENCIES) @rm -f gitwipe$(EXEEXT) $(LINK) $(gitwipe_LDFLAGS) $(gitwipe_OBJECTS) $(gitwipe_LDADD) $(LIBS) install-binSCRIPTS: $(bin_SCRIPTS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)" @list='$(bin_SCRIPTS)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ if test -f $$d$$p; then \ f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ echo " $(binSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(bindir)/$$f'"; \ $(binSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(bindir)/$$f"; \ else :; fi; \ done uninstall-binSCRIPTS: @$(NORMAL_UNINSTALL) @list='$(bin_SCRIPTS)'; for p in $$list; do \ f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ rm -f "$(DESTDIR)$(bindir)/$$f"; \ done mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/configure.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/git.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gitkeys.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gitps.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gitview.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gitwhich.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gitwipe.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/history.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inputline.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/misc.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/panel.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/signals.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/status.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/system.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tilde.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/title.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tty.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/window.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xio.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xmalloc.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xstack.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @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@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @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) '$<'` uninstall-info-am: 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)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ 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) $(SCRIPTS) installdirs: for dir in "$(DESTDIR)$(bindir)" "$(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: -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." 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-exec-am: install-binPROGRAMS install-binSCRIPTS @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) install-exec-hook install-info: install-info-am install-man: 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 uninstall-binSCRIPTS \ uninstall-info-am @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) uninstall-hook .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-binSCRIPTS install-data install-data-am install-exec \ install-exec-am install-exec-hook install-info install-info-am \ install-man 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 \ uninstall-binSCRIPTS uninstall-hook uninstall-info-am install-exec-hook: @TRANSITION_TRUE@ $(INSTALL_SCRIPT) $(srcdir)/git.transition $(DESTDIR)$(bindir)/git ln -sf gitrgrep $(DESTDIR)$(bindir)/gitregrep ln -sf gitrgrep $(DESTDIR)$(bindir)/gitrfgrep uninstall-hook: -rm -f $(DESTDIR)$(bindir)/git -rm -f $(DESTDIR)$(bindir)/gitregrep $(DESTDIR)$(bindir)/gitrfgrep # 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: gnuit-4.9.5/src/git.transition0000755000175000017500000000103111146671376013300 00000000000000#!/bin/sh cat >&2 << EOT git, the filemanager with GNU Interactive Tools, is now called gitfm. If you are looking for git, Linus Torvald's content tracker, go to http://git.or.cz/. If it is already installed, see git(7). This transition script will be removed in a later release. EOT # If we are attached to a terminal, run gitfm, else run git-scm if [ -t 0 ] && [ -t 1 ];then echo "Press RETURN to run gitfm" >&2 read dummy exec gitfm "$@" else if [ -x /usr/bin/git-scm ] then exec -a git git-scm "$@" fi fi exit 1 gnuit-4.9.5/src/xmalloc.c0000644000175000017500000000246511146671376012215 00000000000000/* xmalloc.c -- Safe memory management routines. Includes xmalloc, xcalloc, xrealloc and free. fatal() is called when there is no more memory available. */ /* Copyright (C) 1993-1999, 2006-2007 Free Software Foundation, Inc. This file is part of gnuit. gnuit 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 3 of the License, or (at your option) any later version. gnuit 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, see http://www.gnu.org/licenses/. */ /* Written by Tudor Hulubei and Andrei Pitis. */ #ifdef HAVE_CONFIG_H #include #endif #include #ifdef HAVE_STDDEF_H #include #endif #include "xmalloc.h" extern void fatal PROTO ((char *)); void xalloc_die(void) { fatal("virtual memory exhausted"); /* NOTREACHED */ abort(); } void xfree(pointer) void *pointer; { if (pointer) free(pointer); else fatal("xfree: trying to free NULL"); } gnuit-4.9.5/src/Makefile.am0000644000175000017500000000424711146671376012446 00000000000000EXTRA_DIST = gitaction gitmkdirs gitmount gitrgrep gitunpack gitxgrep\ .gitaction .gdbinit git.transition gitdpkgname bin_PROGRAMS = gitfm gitps gitview gitwipe gitkeys gitwhich bin_SCRIPTS = gitaction gitmkdirs gitmount gitrgrep gitunpack gitxgrep\ .gitaction gitdpkgname # We're not including tilde.c & tilde.h here because they are # automagically detected (configure.in includes them in LIBOBJS). EXTRA_gitfm_SOURCES = ansi_stdlib.h file.h stat.h stdc.h xtime.h gitfm_SOURCES = git.c tty.c tty.h window.c window.h inputline.c inputline.h\ status.c status.h panel.c panel.h title.c title.h\ configure.c configure.h misc.c misc.h signals.c signals.h\ xmalloc.c xmalloc.h xstring.h xio.c xio.h\ xstack.c xstack.h system.c system.h \ tilde.c tilde.h history.c history.h gitps_SOURCES = gitps.c tty.c tty.h window.c window.h misc.c misc.h\ configure.c configure.h signals.c signals.h xio.c xio.h\ xmalloc.c xmalloc.h xstring.h gitview_SOURCES = gitview.c tty.c tty.h window.c window.h misc.c misc.h\ configure.c configure.h signals.c signals.h xio.c xio.h\ xmalloc.c xmalloc.h xstring.h gitwipe_SOURCES = gitwipe.c gitkeys_SOURCES = gitkeys.c gitwhich_SOURCES = gitwhich.c xmalloc.c xmalloc.h gitfm_LDADD = -L../lib -lgnu $(LIB_CLOCK_GETTIME) $(LIB_NANOSLEEP) $(LIBINTL) gitps_LDADD = -L../lib -lgnu $(LIB_CLOCK_GETTIME) $(LIB_NANOSLEEP) $(LIBINTL) gitview_LDADD = -L../lib -lgnu $(LIBINTL) gitwhich_LDADD = -L../lib -lgnu $(LIBINTL) AM_CPPFLAGS = -I$(srcdir)/.. -I.. -I$(top_srcdir)/lib -I$(top_srcdir)/src if DEBIAN AM_CPPFLAGS += -DDEBIAN gitfm_LDFLAGS = -Wl,-z,defs -Wl,--as-needed gitps_LDFLAGS = -Wl,-z,defs -Wl,--as-needed gitview_LDFLAGS = -Wl,-z,defs -Wl,--as-needed gitwipe_LDFLAGS = -Wl,-z,defs -Wl,--as-needed gitkeys_LDFLAGS = -Wl,-z,defs -Wl,--as-needed gitwhich_LDFLAGS = -Wl,-z,defs -Wl,--as-needed endif install-exec-hook: if TRANSITION $(INSTALL_SCRIPT) $(srcdir)/git.transition $(DESTDIR)$(bindir)/git endif ln -sf gitrgrep $(DESTDIR)$(bindir)/gitregrep ln -sf gitrgrep $(DESTDIR)$(bindir)/gitrfgrep uninstall-hook: -rm -f $(DESTDIR)$(bindir)/git -rm -f $(DESTDIR)$(bindir)/gitregrep $(DESTDIR)$(bindir)/gitrfgrep gnuit-4.9.5/src/panel.c0000644000175000017500000033254411146671376011661 00000000000000/* panel.c -- The panels management file. */ /* Copyright (C) 1993-2000, 2006-2007 Free Software Foundation, Inc. This file is part of gnuit. gnuit 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 3 of the License, or (at your option) any later version. gnuit 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, see http://www.gnu.org/licenses/. */ /* Written by Tudor Hulubei and Andrei Pitis. */ #ifdef HAVE_CONFIG_H #include #endif #include #ifdef HAVE_STDLIB_H #include #else /* !HAVE_STDLIB_H */ #include "ansi_stdlib.h" #endif /* !HAVE_STDLIB_H */ #include #if HAVE_INTTYPES_H # include #endif #if HAVE_STDINT_H # include #endif #if HAVE_UNISTD_H # include #endif #ifndef UINTMAX_MAX # define UINTMAX_MAX ((uintmax_t) -1) #endif #ifdef HAVE_STDDEF_H #include #endif #include #include "file.h" #ifdef HAVE_VALUES_H #include #endif /* HAVE_VALUES_H */ #include #ifndef INT_MAX #define INT_MAX 2147483647 #endif /* INT_MAX */ #ifdef HAVE_64BIT_IO #ifndef LONG_LONG_MAX #define LONG_LONG_MAX 9223372036854775807LL #endif /* LONG_LONG_MAX */ #endif /* HAVE_64BIT_IO */ #ifdef HAVE_64BIT_IO #define MAXFILESIZE LONG_LONG_MAX #else /* !HAVE_64BIT_IO */ #define MAXFILESIZE INT_MAX #endif /* !HAVE_64BIT_IO */ #ifdef HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ #include "xtime.h" #include /* Not all systems declare ERRNO in errno.h... and some systems #define it! */ #if !defined (errno) extern int errno; #endif /* !errno */ /* Get the statfs() prototipe from sys/vfs.h. */ #ifdef HAVE_LINUX #include #endif /* HAVE_LINUX */ #include #include #include "stdc.h" #include "xstring.h" #include "xmalloc.h" #include "xio.h" #include "fsusage.h" #include "window.h" #include "status.h" #include "signals.h" #include "tty.h" #include "inputline.h" #include "panel.h" #include "tilde.h" #include "fnmatch.h" #include "configure.h" #include "system.h" #include "misc.h" #include "stat.h" /* prototypes from gnulib idcache.c (no idcache.h for some reason) */ char *getuser PROTO ((uid_t uid)); char *getgroup PROTO ((gid_t gid)); extern int AnsiColors; extern int TypeSensitivity; char rights[16] = "-rwxrwxrwx"; #define FILE_DISPLAY_MODES 7 char *FileDisplayMode[FILE_DISPLAY_MODES] = { "OwnerGroup", "DateTime", "Size", "AbbrevSize", "Mode", "FullName", "All", }; #define FILE_SORT_METHODS 9 char *FileSortMethod[FILE_SORT_METHODS] = { "Name", "Extension", "Size", "Date", "Mode", "OwnerId", "GroupId", "OwnerName", "GroupName", }; #define PANEL_FIELDS 20 static char *PanelFields[PANEL_FIELDS] = { "PanelFrame", "PanelBackground", "PanelThumbForeground", "PanelThumbBackground", "PanelThumbBrightness", "PanelSelectedFile", "PanelSelectedFileBrightness", "PanelNotSelectedFile", "PanelNotSelectedFileBrightness", "PanelCurrentSelectedFile", "PanelCurrentNotSelectedFile", "PanelCurrentFile", "PanelPath", "PanelPathBrightness", "PanelDeviceFreeSpace", "PanelDeviceFreeSpaceBrightness", "PanelFileInfo", "PanelFileInfoBrightness", "PanelFilesInfo", "PanelFilesInfoBrightness", }; #ifdef HAVE_LINUX static int PanelColors[PANEL_FIELDS] = { WHITE, BLUE, BLACK, WHITE, OFF, YELLOW, ON, WHITE, ON, YELLOW, WHITE, CYAN, RED, OFF, RED, OFF, RED, OFF, BLACK, OFF, }; #else /* !HAVE_LINUX */ static int PanelColors[PANEL_FIELDS] = { WHITE, BLACK, BLACK, WHITE, OFF, WHITE, ON, WHITE, OFF, WHITE, BLACK, WHITE, BLACK, OFF, BLACK, OFF, BLACK, OFF, BLACK, OFF }; #endif /* !HAVE_LINUX */ #define PanelFrame PanelColors[0] #define PanelBackground PanelColors[1] #define PanelThumbForeground PanelColors[2] #define PanelThumbBackground PanelColors[3] #define PanelThumbBrightness PanelColors[4] #define PanelSelectedFile PanelColors[5] #define PanelSelectedFileBrightness PanelColors[6] #define PanelNotSelectedFile PanelColors[7] #define PanelNotSelectedFileBrightness PanelColors[8] #define PanelCurrentSelectedFile PanelColors[9] #define PanelCurrentNotSelectedFile PanelColors[10] #define PanelCurrentFile PanelColors[11] #define PanelPath PanelColors[12] #define PanelPathBrightness PanelColors[13] #define PanelDeviceFreeSpace PanelColors[14] #define PanelDeviceFreeSpaceBrightness PanelColors[15] #define PanelFileInfo PanelColors[16] #define PanelFileInfoBrightness PanelColors[17] #define PanelFilesInfo PanelColors[18] #define PanelFilesInfoBrightness PanelColors[19] char *panel_il_message[] = { "Wait, reading directory...", "Wait, copying file...", "Wait, copying file(s)...", "Wait, copying directory...", "Wait, deleting directory...", "Wait, deleting file(s)...", "Wait, moving file...", "Wait, moving file(s)...", "Wait, moving directory...", "Wait, comparing directories...", "Wait, comparing files...", "Wait, renaming file(s)...", }; #define PANEL_READ_DIR_MSG panel_il_message[ 0] #define PANEL_COPY_FILE_MSG panel_il_message[ 1] #define PANEL_COPY_FILES_MSG panel_il_message[ 2] #define PANEL_COPY_DIR_MSG panel_il_message[ 3] #define PANEL_DELETE_DIR_MSG panel_il_message[ 4] #define PANEL_DELETE_FILES_MSG panel_il_message[ 5] #define PANEL_MOVE_FILE_MSG panel_il_message[ 6] #define PANEL_MOVE_FILES_MSG panel_il_message[ 7] #define PANEL_MOVE_DIR_MSG panel_il_message[ 8] #define PANEL_COMPARE_DIR_MSG panel_il_message[ 9] #define PANEL_COMPARE_FILES_MSG panel_il_message[10] #define PANEL_RENAME_FILES_MSG panel_il_message[11] /* Some useful isearch stack management functions. */ #define STACK_PUSH(__entry__, __length__) \ { \ isearch_t current_isearch; \ \ current_isearch.entry = __entry__; \ current_isearch.length = __length__; \ \ xstack_push(this->isearch_stack, ¤t_isearch); \ } #define STACK_POP(__entry__, __length__) \ { \ isearch_t tmp_isearch; \ \ xstack_pop(this->isearch_stack, &tmp_isearch); \ \ __entry__ = tmp_isearch.entry; \ __length__ = tmp_isearch.length; \ } #define STACK_PREVIEW(__entry__, __length__) \ { \ isearch_t tmp_isearch; \ \ xstack_preview(this->isearch_stack, &tmp_isearch, 1); \ \ __entry__ = tmp_isearch.entry; \ __length__ = tmp_isearch.length; \ } /* Is the current directory the root directory? */ #define rootdir() (this->path[0] == '/' && this->path[1] == '\0') static int StartupFileDisplayMode; static int StartupFileSortMethod; static int StartupScrollStep; static int CurrentSortMethod; static int LeadingDotMatch = OFF; static int InfoDisplay = OFF; static int GroupDigits = ON; static int MaxUnscaledDigits=9; static char nice_try[] = "Nice try, maybe later... :-)"; extern void fatal PROTO ((char *)); extern void panel_update_entry PROTO ((panel_t *, int)); extern char il_read_char PROTO ((char *, char *, int)); extern char *il_read_line PROTO ((char *, char **, char *, xstack_t *)); static xstack_t *copy_history; static xstack_t *move_history; static xstack_t *mkdir_history; static void xchg(a, b) int *a, *b; { int tmp = *a; *a = *b; *b = tmp; } /* * Initialize the panel data structures. Read the necessary data from * the configuration files, if needed. */ panel_t * panel_init(path) char *path; { static int configured; panel_t *this = (panel_t *)xmalloc(sizeof(panel_t)); this->x = 0; this->y = 0; this->lines = 1; this->columns = 1; this->focus = OFF; this->entries = 0; this->selected_entries = 0; this->last_index = -1; this->display_mode = this->sort_method = 0; this->current_entry = 0; this->first_on_screen = 0; this->on_screen = INT_MAX / 2; this->temp = NULL; this->dir = NULL; this->isearch_stack = NULL; this->visible = 1; this->scroll_step = 1; this->thumb = 0; this->horizontal_offset = 0; #ifdef HAVE_LINUX this->msdosfs = 0; #endif /* HAVE_LINUX */ this->dir_entry = NULL; if (chdir(path) == -1) fatal("`chdir' failed: permission denied"); this->path = xgetcwd(); if (this->path == NULL) fatal("`getcwd' failed: permission denied"); minimize_path(this->path); this->pathlen = strlen(this->path); this->window = window_init(); if (configured) { this->display_mode = StartupFileDisplayMode; this->sort_method = StartupFileSortMethod; return this; } use_section("[Setup]"); StartupScrollStep = get_int_var("StartupScrollStep", 0); use_section("[GITFM-Setup]"); StartupFileDisplayMode = get_const_var("StartupFileDisplayMode", FileDisplayMode, FILE_DISPLAY_MODES, 0); this->display_mode = StartupFileDisplayMode; StartupFileSortMethod = get_const_var("StartupFileSortMethod", FileSortMethod, FILE_SORT_METHODS, 0); this->sort_method = StartupFileSortMethod; MaxUnscaledDigits=get_int_var("MaxUnscaledDigits",9); InfoDisplay = get_flag_var("InfoDisplay", ON); LeadingDotMatch = get_flag_var("LeadingDotMatch", ON); GroupDigits = get_flag_var("GroupDigits", ON); use_section(AnsiColors ? color_section : monochrome_section); get_colorset_var(PanelColors, PanelFields, PANEL_FIELDS); copy_history = xstack_init(sizeof(char *)); move_history = xstack_init(sizeof(char *)); mkdir_history = xstack_init(sizeof(char *)); configured = 1; return this; } /* * Destroy a panel. */ void panel_end(this) panel_t *this; { int i; if (this->dir) closedir(this->dir); for (i = 0; i < this->entries; i++) if (this->dir_entry[i].name) { xfree(this->dir_entry[i].name); this->dir_entry[i].name = NULL; } xfree(this->dir_entry); xfree(this->temp); window_end(this->window); xfree(this); } window_t * panel_window(this) panel_t *this; { return this->window; } /* * We might need to call this twice in the same expression, so this is * the reason for having tname[2]. If filled != 0, fill the resulting * string with spaces up to 14 characters. */ static char * cutname(name, which, filled) char *name; int which, filled; { static char tname[2][16]; if (filled) { memset(tname[which], ' ', 14); tname[which][14] = 0; return memcpy(tname[which], name, min(strlen(name), 14)); } else return strncpy(tname[which], name, 14); } static int sort_compare_fn(_first, _second) const void *_first; const void *_second; { int retval; char *pfirst, *psecond; const dir_entry_t *first = (const dir_entry_t *)_first; const dir_entry_t *second = (const dir_entry_t *)_second; int first_is_dir = first->type == DIR_ENTRY; int second_is_dir = second->type == DIR_ENTRY; if (first_is_dir != second_is_dir) return first_is_dir ? -1 : 1; switch (CurrentSortMethod) { case SORT_BY_NAME: break; case SORT_BY_EXTENSION: pfirst = strrchr(first->name, '.'); psecond = strrchr(second->name, '.'); if (pfirst && psecond) { retval = strcmp(++pfirst, ++psecond); if (retval != 0) return retval; } else if (pfirst || psecond) return (pfirst ? -1 : 1); break; case SORT_BY_SIZE: if (first->size == second->size) break; return( (first->size > second->size) ? 1 : -1); case SORT_BY_DATE: if (first->mtime == second->mtime) break; return first->mtime - second->mtime; case SORT_BY_MODE: if (first->mode == second->mode) break; return first->mode - second->mode; case SORT_BY_OWNER_ID: if (first->uid == second->uid) break; return first->uid - second->uid; case SORT_BY_GROUP_ID: if (first->gid == second->gid) break; return first->gid - second->gid; case SORT_BY_OWNER_NAME: if (first->uid == second->uid) break; return strcmp(first->owner, second->owner); case SORT_BY_GROUP_NAME: if (first->gid == second->gid) break; return strcmp(first->group, second->group); default: fatal("bad sort method"); } return strcmp(first->name, second->name); } void panel_no_optimizations(this) panel_t *this; { this->on_screen = INT_MAX / 2; } char * panel_get_current_file_name(this) panel_t *this; { return this->dir_entry[this->current_entry].name; } uid_t panel_get_current_file_uid(this) panel_t *this; { return this->dir_entry[this->current_entry].uid; } gid_t panel_get_current_file_gid(this) panel_t *this; { return this->dir_entry[this->current_entry].gid; } mode_t panel_get_current_file_mode(this) panel_t *this; { return this->dir_entry[this->current_entry].mode; } int panel_get_current_file_type(this) panel_t *this; { return this->dir_entry[this->current_entry].type; } /* * Return an (unconditionally centered) first entry index. */ static int panel_get_centered_fos(this) panel_t *this; { int lines = (this->lines - 2); int tmp = this->current_entry - (lines / 2); if (tmp + lines >= this->entries) return max(0, this->entries - lines); else return max(0, tmp); } /* * Return the `first on screen' panel entry, i.e. the first file entry * in the panel that is visible on the screen. */ static int panel_get_fos(this) panel_t *this; { assert(this->first_on_screen >= 0); if ((this->first_on_screen <= this->current_entry) && (this->first_on_screen + this->lines - 2 > this->current_entry) && (this->first_on_screen + this->lines - 2 <= this->entries)) return this->first_on_screen; return panel_get_centered_fos(this); } static void panel_set_current_entry(this, entry) panel_t *this; int entry; { assert(entry >= 0); assert(entry < this->entries); this->current_entry = entry; this->first_on_screen = panel_get_fos(this); } void panel_center_current_entry(this) panel_t *this; { this->first_on_screen = panel_get_centered_fos(this); } void panel_activate(this) panel_t *this; { this->visible = 1; } void panel_deactivate(this) panel_t *this; { this->visible = 0; } /* * Resize a panel. */ void panel_resize(this, x, y, lines, columns) panel_t *this; size_t x, y, lines, columns; { this->x = x; this->y = y; this->lines = lines; this->columns = columns; this->thumb = 0; if (StartupScrollStep <= 0 || StartupScrollStep >= (this->lines - 1)) this->scroll_step = this->lines / 2; else this->scroll_step = StartupScrollStep; this->temp = xrealloc(this->temp, this->columns); window_resize(this->window, x, y, lines, columns); panel_center_current_entry(this); this->horizontal_offset = 0; } void panel_set_wrapped_isearch_flag(this, value) panel_t *this; int value; { this->wrapped_isearch = value; } int panel_isearch_backward(this, string, len, start_entry) panel_t *this; char *string; size_t len; int start_entry; { int i; for (i = start_entry; i >= 0; i--) { if (strncasecmp(string, this->dir_entry[i].name, len) == 0) { /* Success, return the entry just found. */ return i; } } /* Error, cannot find matching entry. */ return -1; } int panel_isearch_forward(this, string, len, start_entry) panel_t *this; char *string; size_t len; int start_entry; { int entry; for (entry = start_entry; entry < this->entries; entry++) if (strncasecmp(string, this->dir_entry[entry].name, len) == 0) { /* Success, return the entry just found. */ return entry; } /* Error, cannot find matching entry. */ return -1; } #define panel_1s_message il_read_char char panel_2s_message(format, string, options, flags) char *format; char *string; char *options; int flags; { char c; char *message = xmalloc(strlen(format) + strlen(string) + 1); sprintf(message, format, string); c = panel_1s_message(message, options, flags); xfree(message); return c; } char panel_3s_message(format, string1, string2, options, flags) char *format; char *string1; char *string2; char *options; int flags; { char c; char *message = xmalloc(strlen(format)+strlen(string1)+strlen(string2)+1); sprintf(message, format, string1, string2); c = panel_1s_message(message, options, flags); xfree(message); return c; } void panel_recover(this) panel_t *this; { panel_set_current_entry(this, 0); panel_2s_message("%s/: Permission denied.", this->path, (char *)NULL, IL_MOVE | IL_BEEP | IL_SAVE | IL_ERROR); if (strcmp(this->path, "/") == 0) fatal("/: Permission denied"); strcpy(this->path, "/"); this->pathlen = 1; chdir(this->path); panel_action(this, act_REGET, (panel_t *)NULL, (void *)NULL, 1); } /* * Load the file type information for the given entry. Choose the * longest pattern, such that the order in which the patterns are * specified in the configuration file will not matter. */ static void panel_load_fti(this, entry) panel_t *this; int entry; { size_t length; size_t longest_length = 0; file_type_info_t *fti; file_type_info_t *longest_fti = NULL; this->dir_entry[entry].fti_loaded = 1; /* FIXME: an even better solution here would be to keep track of whether or not the pattern starts with a *. It is always better to match "RMAIL*" than "*.[bg]z". */ for (fti = fti_head; fti; fti = fti->next) if (fnmatch(fti->pattern, this->dir_entry[entry].name, FNM_PERIOD | FNM_PATHNAME | FNM_CASEFOLD) == 0) { length = strlen(fti->pattern); if (length > longest_length) { longest_fti = fti; longest_length = length; } } fti = longest_fti; if (fti) { this->dir_entry[entry].brightness = (fti->brightness == -1) ? OFF : fti->brightness; this->dir_entry[entry].foreground = (fti->foreground == -1) ? PanelNotSelectedFile : fti->foreground; this->dir_entry[entry].background = (fti->background == -1) ? PanelBackground : fti->background; } else { /* No match. An invalid value of the brightness field specifies it. It's ugly, but there are no more free bits in dir_entry_t. */ this->dir_entry[entry].brightness = 2; } } /* * Read the inode information. */ static void panel_load_inode(this, entry) panel_t *this; int entry; { int sz, hour; struct stat s; struct tm *time; char *owner; char *group; memset(&s, 0, sizeof(s)); xlstat(this->dir_entry[entry].name, &s); this->dir_entry[entry].mode = s.st_mode; this->dir_entry[entry].uid = s.st_uid; this->dir_entry[entry].gid = s.st_gid; if (s.st_ino) { if (S_ISDIR(s.st_mode)) this->dir_entry[entry].type = DIR_ENTRY; else { if (S_ISREG(s.st_mode)) { this->dir_entry[entry].type = FILE_ENTRY; #ifdef HAVE_LINUX /* Starting with the 0.99.13 Linux kernel all MSDOS files have are "executables", so, when working with msdos file systems, we have to ignore those bits ... At least when displaying them in the panel. :-( */ this->dir_entry[entry].executable = ((s.st_mode & 0111) && !this->msdosfs) ? 1 : 0; #else /* !HAVE_LINUX */ this->dir_entry[entry].executable = (s.st_mode & 0111) ? 1 : 0; #endif /* !HAVE_LINUX */ } else { this->dir_entry[entry].executable = 0; if (S_ISFIFO(s.st_mode)) this->dir_entry[entry].type = FIFO_ENTRY; else if (S_ISSOCK(s.st_mode)) this->dir_entry[entry].type = SOCKET_ENTRY; else if (S_ISLNK(s.st_mode)) { struct stat s_tmp; int stat_error = xstat(this->dir_entry[entry].name, &s_tmp); if (stat_error == -1) { /* This symbolic link has no target. */ this->dir_entry[entry].type = SYMLINK_ENTRY; sz = xreadlink(this->dir_entry[entry].name); s.st_size = (sz == -1) ? 0 : sz; } else { /* The symbolic link has a target, and we are going to display the target size, not the link one. Feel free to blame me for this. :-) */ this->dir_entry[entry].type = S_ISDIR(s_tmp.st_mode) ? DIR_ENTRY : FILE_ENTRY; s.st_size = s_tmp.st_size; /* Also take care if the link target is an executable. */ this->dir_entry[entry].executable = (s_tmp.st_mode & 0111) ? 1 : 0; } } else this->dir_entry[entry].type = FILE_ENTRY; } } this->dir_entry[entry].size = s.st_size; } else { /* I think this is obsolete. But I am keeping this it just in case something wrong happens... :-) I think I've covered symbolic links completely on the true branch of this `if' statement. However, if s.st_mode == 0, we might reach this point. */ this->dir_entry[entry].type = SYMLINK_ENTRY; sz = xreadlink(this->dir_entry[entry].name); this->dir_entry[entry].size = (sz == -1) ? 0 : sz; } owner=getuser(s.st_uid); if(owner) { this->dir_entry[entry].owner=xmalloc(1 + max(strlen(owner),8)); sprintf(this->dir_entry[entry].owner,"%-7s", owner); } else { this->dir_entry[entry].owner=xmalloc(32); sprintf(this->dir_entry[entry].owner,"%-7u",s.st_uid); } group=getgroup(s.st_gid); if(group) { this->dir_entry[entry].group=xmalloc(1 + max(strlen(group),8)); sprintf(this->dir_entry[entry].group,"%-7s", group); } else { this->dir_entry[entry].group=xmalloc(32); sprintf(this->dir_entry[entry].group,"%-7u",s.st_gid); } this->dir_entry[entry].mtime = s.st_mtime; time = localtime(&s.st_mtime); if ((hour = time->tm_hour % 12) == 0) hour = 12; sprintf(this->dir_entry[entry].date,"%2d-%02d-%02d %2d:%02d%c", time->tm_mon + 1, time->tm_mday, time->tm_year % 100, hour, time->tm_min, (time->tm_hour < 12) ? 'a' : 'p'); } int panel_read_directory(this, directory, verify) panel_t *this; char *directory; int verify; { #ifdef HAVE_LINUX struct statfs fstat; #endif /* HAVE_LINUX */ DIR *tmpdir; struct stat s; int namelen; char *old_path; struct dirent *d; int dotdot_found = 0; dir_entry_t *old_dir_entry = NULL, tmp; int entry, old_entries = 0, backdir_index = -1; tmpdir = opendir(directory); /* If the directory is on a NFS file system and we are superuser, opendir will not fail but readdir will report 0 files :-(. */ if (tmpdir == NULL) { if (strcmp(directory, "..") != 0) return 0; /* Try harder. This migh be due to the fact that we don't have the ".." directory (NFS). */ directory = xgetcwd(); if (directory == NULL) { char *ptr; /* FIXME: This isn't always deallocated! We should use alloca instead... But is ugly anyway :-( */ directory = xstrdup(this->path); ptr = strrchr(directory, '/'); if (ptr == NULL) fatal("bad directory"); *ptr = 0; } tmpdir = opendir(directory); if (tmpdir == NULL) { xfree(directory); return 0; } } if (chdir(directory) == -1) { closedir(tmpdir); return 0; } if (this->dir) closedir(this->dir); this->dir = tmpdir; old_path = xmalloc(this->pathlen + 1); strcpy(old_path, this->path); if (directory[0] == '/') this->path = xstrdup(directory); else { /* There is definitely a reason why this code is here, but I don't remember it :-) I think it might have been a problem with entering a directory through a symbolic link which skips a protected directory. xgetcwd() will fail (due to the fact that one directory in the real path is protected) and I had to remove the last entry in the path to make it work. */ char *path = xgetcwd(); if (path) { xfree(this->path); this->path = path; } else { this->pathlen = strlen(this->path); if (strcmp(directory, "..") == 0) { char *ptr = strrchr(this->path, '/'); if (ptr == NULL) fatal("bad path"); *ptr = 0; } else { this->path = xrealloc(this->path, this->pathlen + 1 + 1 + strlen(directory)); strcat(this->path, "/"); strcat(this->path, directory); } } } minimize_path(this->path); this->pathlen = strlen(this->path); xstat(this->path, &s); if (s.st_size >= 2048) { il_message(PANEL_READ_DIR_MSG); tty_update(); } #ifdef HAVE_LINUX /* I can't get this number without including linux/msdos_fs.h :-(, so I've hard-coded it here. */ statfs(".", &fstat); this->msdosfs = fstat.f_type == 0x4d44; #endif /* HAVE_LINUX */ verify = verify && this->selected_entries && (strcmp(old_path, this->path) == 0); if (verify) { old_dir_entry = this->dir_entry; old_entries = this->entries; this->dir_entry = NULL; } else if (this->dir_entry) { for (entry = 0; entry < this->entries; entry++) if (this->dir_entry[entry].name) { xfree(this->dir_entry[entry].name); this->dir_entry[entry].name = NULL; } xfree(this->dir_entry); this->dir_entry = NULL; } this->dir_entry = (dir_entry_t *)xmalloc(sizeof(dir_entry_t)); this->selected_entries = 0; this->maxname = 0; for (this->entries = 0; (d = readdir(this->dir)); this->entries++) { /* Ignore the "." directory. */ if (d->d_name[0] == '.' && d->d_name[1] == 0) { this->entries--; continue; } if (strcmp(d->d_name, "..") == 0) { dotdot_found = 1; if (this->path[1]) backdir_index = this->entries; else { /* Ignore ".." if this is the root directory. */ this->entries--; continue; } } this->dir_entry = (dir_entry_t *)xrealloc(this->dir_entry, (this->entries + 1) * sizeof(dir_entry_t)); if (verify) { for (entry = 0; entry < old_entries; entry++) if (strcmp(d->d_name, old_dir_entry[entry].name) == 0) { this->selected_entries += (this->dir_entry[this->entries].selected = old_dir_entry[entry].selected); break; } if (entry == old_entries) this->dir_entry[this->entries].selected = 0; } else this->dir_entry[this->entries].selected = 0; /* Clear the fti cache flags. */ this->dir_entry[this->entries].fti_loaded = 0; namelen = strlen(d->d_name); this->dir_entry[this->entries].name = xmalloc(namelen + 1); strcpy(this->dir_entry[this->entries].name, d->d_name); this->maxname = max(this->maxname, namelen); panel_load_inode(this, this->entries); } /* Consistency check. Some NFS file systems don't have the "." and ".." directory entries. */ /* We should have found the ".." directory. */ if (dotdot_found) { if (backdir_index != -1) if (!S_ISDIR(this->dir_entry[backdir_index].mode)) this->dir_entry[backdir_index].mode = S_IFDIR; } else { /* Build the ".." entry "by hand". */ this->dir_entry = (dir_entry_t *)xrealloc(this->dir_entry, (this->entries + 1) * sizeof(dir_entry_t)); this->dir_entry[this->entries].selected = 0; /* Set the fti cache flags. */ this->dir_entry[this->entries].fti_loaded = 1; namelen = strlen(".."); this->dir_entry[this->entries].name = xmalloc(namelen + 1); strcpy(this->dir_entry[this->entries].name, ".."); this->maxname = max(this->maxname, namelen); panel_load_inode(this, this->entries); /* This is a directory. */ this->dir_entry[this->entries].mode = S_IFDIR; this->dir_entry[this->entries].type = DIR_ENTRY; this->entries++; } if (verify) { for (entry = 0; entry < old_entries; entry++) if (old_dir_entry[entry].name) { xfree(old_dir_entry[entry].name); old_dir_entry[entry].name = NULL; } xfree(old_dir_entry); } CurrentSortMethod = this->sort_method; this->horizontal_offset = 0; if (backdir_index != -1) { tmp = this->dir_entry[0]; this->dir_entry[0] = this->dir_entry[backdir_index]; this->dir_entry[backdir_index] = tmp; qsort(this->dir_entry + 1, this->entries - 1, sizeof(dir_entry_t), sort_compare_fn); } else qsort(this->dir_entry, this->entries, sizeof(dir_entry_t), sort_compare_fn); panel_set_current_entry(this, min(this->current_entry, this->entries - 1)); xfree(old_path); return 1; } void panel_init_iterator(this) panel_t *this; { this->last_index = -1; this->multiple_files = this->selected_entries; } int panel_get_next(this) panel_t *this; { int i; if (this->multiple_files) { for (i = this->last_index + 1; i < this->entries; i++) if (this->dir_entry[i].selected) return this->last_index = i; return -1; } else { if (this->last_index == 0) return -1; this->last_index = 0; /* In the root directory there is no '..' entry, so the first entry can be returned. */ if (rootdir()) return this->current_entry; else return (this->current_entry != 0) ? this->current_entry : -1; } } void panel_update_entries(this) panel_t *this; { int i, limit; tty_status_t status; assert(this->current_entry < this->entries); if (!this->visible) return; tty_save(&status); for (i = this->first_on_screen; (i < this->entries) && (i - this->first_on_screen < this->lines - 2); i++) panel_update_entry(this, i); tty_colors(OFF, WHITE, PanelBackground); memset(this->temp, ' ', this->columns); limit = min(this->lines - 2, this->on_screen); for (; i < limit; i++) { window_goto(this->window, i - this->first_on_screen + 1, 1); window_puts(this->window, this->temp, this->columns - 2); } this->on_screen = this->entries; tty_restore(&status); } void panel_update_path(this) panel_t *this; { size_t len; tty_status_t status; if (this->columns < (1 + 1 + 1 + 1 + 14 + 1 + 1)) return; if (!this->visible) return; tty_save(&status); len = this->columns - (1 + 1 + 1 + 14 + 1 + 1); memset(this->temp, ' ', this->columns); truncate_long_name(this->path, this->temp, len); toprintable(this->temp, len); tty_colors(PanelPathBrightness, PanelPath, PanelFrame); window_goto(this->window, 0, 2); window_puts(this->window, this->temp, len + 1); tty_restore(&status); } static char * panel_beautify_number(buf, number, inflags) char *buf; off64_t number; int inflags; { int flags = ( inflags | human_ceiling | human_suppress_point_zero ); return human_readable(number, buf, flags, 1, 1); } static int panel_fit_number(buf, number, flags, maxlen) char *buf; off64_t number; int flags; int maxlen; { char *str=NULL; int scaled=(flags & human_autoscale); str=panel_beautify_number(buf,number,(flags | (GroupDigits ? human_group_digits : 0))); /* if too big, force autoscale */ if((str == NULL) || (strlen(str) > maxlen)) { scaled=1; str=panel_beautify_number(buf, number, (flags|human_autoscale|human_SI|human_base_1024)); } strncpy(buf,str,maxlen); /* just in case */ buf[maxlen]='\0'; return scaled; } static char * panel_beautify_info_number(buf, number, width, numfiles) char *buf; off64_t number; int width; int numfiles; { char shortnumbuf[LONGEST_HUMAN_READABLE+1]; char *shortnum; char longnumbuf[LONGEST_HUMAN_READABLE+1]; char filesbuf[LONGEST_HUMAN_READABLE+1]; char *filestr; int scaled; filestr=panel_beautify_number(filesbuf, (off64_t) numfiles, (GroupDigits ? human_group_digits : 0)); /* " (xxxxxPB) in yyyyy files", not including yyyyy */ #define STATIC_TEXT_LEN 18 scaled=panel_fit_number(longnumbuf, number, 0, (width - (STATIC_TEXT_LEN + strlen(filestr)))); if ( (!scaled) && (number > 999) ) { shortnum=panel_beautify_number(shortnumbuf, number, (human_SI|human_autoscale|human_base_1024)); sprintf(buf, "%s (%sB) in %s file%s", longnumbuf, shortnum, filestr, (numfiles > 1) ? "s" : ""); } else { sprintf(buf, "%s in %s file%s", longnumbuf, filestr, (numfiles > 1) ? "s" : ""); } return buf; } void panel_update_size(this) panel_t *this; { char buf[LONGEST_HUMAN_READABLE+3]; char *sz; tty_status_t status; struct fs_usage fsu; int viewable = this->columns - (1 + 1 + 1 + 1); if (!this->visible) return; tty_save(&status); fsu.fsu_blocks = (uintmax_t) -1; /* get_fs_usage will fail on SVR2 (needs disk instead of NULL) */ if (viewable < 6 || get_fs_usage(this->path, NULL, &fsu) < 0 || fsu.fsu_blocks == (uintmax_t) -1) { memset(buf, ' ', sizeof(buf)); sz=buf; tty_brightness(OFF); tty_foreground(PanelFrame); } else { off64_t n; off64_t free_blocks = fsu.fsu_bavail; /* Indeed, this might happen... */ if (free_blocks < 0) free_blocks = 0; n = free_blocks * fsu.fsu_blocksize; sz=panel_beautify_number(buf, n, (human_autoscale|human_SI|human_base_1024)); sz=strcat(sz,"B"); tty_brightness(PanelDeviceFreeSpaceBrightness); tty_foreground(PanelDeviceFreeSpace); } tty_background(PanelFrame); window_goto(this->window, 0, this->columns - 2 - min(strlen(sz), viewable)); window_puts(this->window, sz, min(strlen(sz), viewable)); tty_restore(&status); } static void panel_mode2string(this, entry, string) panel_t *this; int entry; char *string; { int i; mode_t mode; strcpy(string, rights); mode = this->dir_entry[entry].mode; #ifdef S_ISREG if (S_ISREG(mode)) string[0] = '-'; else #endif /* S_ISREG */ #ifdef S_ISDIR if (S_ISDIR(mode)) string[0] = 'd'; else #endif /* S_ISDIR */ #ifdef S_ISCHR if (S_ISCHR(mode)) string[0] = 'c'; else #endif /* S_ISCHR */ #ifdef S_ISBLK if (S_ISBLK(mode)) string[0] = 'b'; else #endif /* S_ISBLK */ #ifdef S_ISFIFO if (S_ISFIFO(mode)) string[0] = 'p'; else #endif /* S_ISFIFO */ #ifdef S_ISSOCK if (S_ISSOCK(mode)) string[0] = 's'; else #endif /* S_ISSOCK */ #ifdef S_ISLNK if (S_ISLNK(mode)) string[0] = 'l'; else #endif /* S_ISLNK */ string[0] = '?'; for (i = 0; i < 9; mode >>= 1, i++) if ((mode & 1) == 0) string[9 - i] = '-'; mode = this->dir_entry[entry].mode; #ifdef S_ISUID if (mode & S_ISUID) string[3] = (string[3] == 'x') ? 's' : 'S'; #endif /* S_ISUID */ #ifdef S_ISGID if (mode & S_ISGID) string[6] = (string[6] == 'x') ? 's' : 'S'; #endif /* S_ISGID */ #ifdef S_ISVTX if (mode & S_ISVTX) string[9] = (string[9] == 'x') ? 't' : 'T'; #endif /* S_ISVTX */ } void panel_update_info(this) panel_t *this; { tty_status_t status; size_t len, maxname; off64_t total_size = 0; char str[1024]; char temp_rights[16]; assert(this->current_entry < this->entries); if (!this->visible) return; tty_save(&status); if (this->lines >= 3) { /* This is an ugly hack, I know, but it does what I want. */ tty_colors(OFF, PanelFrame, PanelFrame); window_goto(this->window, this->thumb + 1, this->columns - 1); window_putc(this->window, ' '); if (this->entries > this->lines-2) { this->thumb = ((this->current_entry * (this->lines-2)) / this->entries); tty_colors(PanelThumbBrightness, PanelThumbForeground, PanelThumbBackground); window_goto(this->window, this->thumb+1, this->columns-1); window_putc(this->window, '#'); } } if (this->columns < 40) { if (this->columns < (1 + 1 + 10 + 1 + 1)) *str = '\0'; else { panel_mode2string(this, this->current_entry, temp_rights); sprintf(str, "%10s", temp_rights); } goto skip_info_display; } if (this->selected_entries) { int entry; for (entry = 0; entry < this->entries; entry++) if (this->dir_entry[entry].selected && this->dir_entry[entry].type == FILE_ENTRY) total_size += this->dir_entry[entry].size; panel_beautify_info_number(str, total_size, this->columns, this->selected_entries); tty_brightness(PanelFilesInfoBrightness); tty_foreground(PanelFilesInfo); } else { if (InfoDisplay == OFF) { *str = '\0'; goto skip_info_display; } panel_mode2string(this, this->current_entry, temp_rights); maxname = this->columns - 26; /* FIXME: Huh? */ len = min(strlen(this->dir_entry[this->current_entry].name), maxname); memcpy(str, this->dir_entry[this->current_entry].name, len); memset(str + len, ' ', maxname - len); if (this->dir_entry[this->current_entry].type == DIR_ENTRY) sprintf(str + maxname, " %10s %10s", (strcmp(this->dir_entry[this->current_entry].name, "..") == 0) ? " UP-DIR" : "SUB-DIR", temp_rights); else { char size[LONGEST_HUMAN_READABLE+1]; panel_fit_number(size,this->dir_entry[this->current_entry].size,0,10); sprintf(str + maxname, " %10s %10s",size,temp_rights); } skip_info_display: tty_brightness(PanelFileInfoBrightness); tty_foreground(PanelFileInfo); } memcpy(this->temp, str, len = strlen(str)); if( (len+2) < this->columns) memset(this->temp + len, ' ', this->columns - 2 - len); toprintable(this->temp, len); tty_background(PanelFrame); window_goto(this->window, this->lines - 1, 2); window_puts(this->window, this->temp, this->columns - 4); tty_restore(&status); } void panel_build_entry_field(this, entry, display_mode, offset) panel_t *this; int entry, display_mode, offset; { char temp_rights[16]; char hbuf[LONGEST_HUMAN_READABLE+1]; switch (display_mode) { case ENABLE_OWNER_GROUP: memcpy(this->temp + this->columns - 2 - offset, this->dir_entry[entry].owner, 7); memcpy(this->temp + this->columns - 2 - offset + 8, this->dir_entry[entry].group, 7); break; case ENABLE_DATE_TIME: memcpy(this->temp + this->columns - 2 - offset, this->dir_entry[entry].date, 15); break; case ENABLE_SIZE: case ENABLE_ABBREVSIZE: { char *ptr; int buflen; int flags = 0; if((display_mode==ENABLE_ABBREVSIZE) || (strlen(human_readable(this->dir_entry[entry].size, hbuf, human_ceiling, 1, 1)) > MaxUnscaledDigits)) { flags |= (human_autoscale | human_SI |human_base_1024); } panel_fit_number(hbuf, this->dir_entry[entry].size, flags, 10); buflen=min(strlen(hbuf),10); ptr=this->temp + this->columns - 2 - offset; if(buflen < 10) { memset(ptr,' ',10-buflen); ptr += (10-buflen); } memcpy(ptr, hbuf, buflen); break; } case ENABLE_MODE: panel_mode2string(this, entry, temp_rights); memcpy(this->temp + this->columns - 2 - offset, temp_rights, 10); break; case ENABLE_FULL_NAME: /* This should not be called... */ assert(0); #if 0 /* file name -> 20 characters (at least) owner + group -> 16 characters date + time -> 16 characters size -> 11 characters mode -> 11 characters */ if (this->columns < 20 + 16 + 16 + 11 + 11) break; #endif break; case ENABLE_ALL: break; default: fatal("invalid mode"); } } static int reserved_characters[FILE_DISPLAY_MODES] = { 1 + 1 + 16 + 1 + 1, 1 + 1 + 16 + 1 + 1, 1 + 1 + 11 + 1 + 1, 1 + 1 + 11 + 1 + 1, 1 + 1 + 11 + 1 + 1, 1 + 1 + 0 + 1 + 1, 1 + 1 + 16 + 16 + 11 + 11 + 1 + 1, }; static int panel_get_reserved_characters(this) panel_t *this; { if ((this->columns < 40) || ((this->columns < 20 + 16 + 16 + 11 + 11) && (this->display_mode == ENABLE_ALL))) return 1 + 1 + 1 + 1; else return reserved_characters[this->display_mode]; } void panel_update_entry(this, entry) panel_t *this; int entry; { char c = '\0'; int foreground, background, brightness; size_t len, reserved, entry_length, offset; assert(this->current_entry < this->entries); if (!this->visible) return; memset(this->temp, ' ', this->columns); reserved = panel_get_reserved_characters(this); if ((entry > 0) || rootdir()) switch (this->dir_entry[entry].type) { case FILE_ENTRY: if (this->dir_entry[entry].executable) c = '*'; break; case DIR_ENTRY: c = '/'; break; case SYMLINK_ENTRY: c = '@'; break; case FIFO_ENTRY: c = '|'; break; case SOCKET_ENTRY: c = '='; break; } if (c != '\0') reserved++; entry_length = strlen(this->dir_entry[entry].name); if (this->columns - reserved >= entry_length) offset = 0; else if (this->columns - reserved + this->horizontal_offset > entry_length) offset = entry_length - (this->columns - reserved); else offset = this->horizontal_offset; len = min(entry_length - offset, this->columns - reserved); memcpy(&this->temp[1], this->dir_entry[entry].name + offset, len); toprintable(&this->temp[1], len); if (c != '\0') this->temp[len + 1] = c; if (this->columns >= 40) switch (this->display_mode) { case ENABLE_OWNER_GROUP: case ENABLE_DATE_TIME: panel_build_entry_field(this, entry, this->display_mode, 16); break; case ENABLE_SIZE: case ENABLE_ABBREVSIZE: case ENABLE_MODE: panel_build_entry_field(this, entry, this->display_mode, 11); break; case ENABLE_FULL_NAME: /* Don't call panel_build_entry_field(), it's useless. */ break; case ENABLE_ALL: /* file name -> 20 characters (at least) owner + group -> 16 characters date + time -> 16 characters size -> 11 characters mode -> 11 characters */ if (this->columns < 20 + 16 + 16 + 11 + 11) break; panel_build_entry_field(this, entry, ENABLE_OWNER_GROUP, 16 + 16 + 11 + 11); panel_build_entry_field(this, entry, ENABLE_DATE_TIME, 16 + 11 + 11); panel_build_entry_field(this, entry, ENABLE_SIZE, 11 + 11); panel_build_entry_field(this, entry, ENABLE_MODE, 11); break; default: fatal("invalid mode"); } if (this->dir_entry[entry].selected) this->temp[this->columns - 3] = '*'; if (entry == this->current_entry) this->temp[0] = this->focus ? ACTIVE_PANEL_MARKER : INACTIVE_PANEL_MARKER; if (TypeSensitivity && this->dir_entry[entry].type != DIR_ENTRY && !this->dir_entry[entry].selected) { /* Notify about the cursor movement just once. */ window_goto(this->window, entry - this->first_on_screen + 1, 1); /* Display the first character of the entry. That character is either a space or the '>' character (the current file marker). */ brightness = this->dir_entry[entry].selected ? PanelSelectedFileBrightness : PanelNotSelectedFileBrightness; foreground = this->dir_entry[entry].selected ? PanelSelectedFile : PanelNotSelectedFile; if (entry == this->current_entry && this->focus == ON) background = PanelCurrentFile; else background = PanelBackground; tty_colors(brightness, foreground, background); window_putc(this->window, *this->temp); /* Try to match the current file name against the specified patterns. Display it with the appropriate color. */ if (this->dir_entry[entry].fti_loaded == 0) panel_load_fti(this, entry); if (this->dir_entry[entry].brightness != 2) { if (entry == this->current_entry && this->focus == ON) tty_colors(brightness, this->dir_entry[entry].foreground, background); else tty_colors(this->dir_entry[entry].brightness, this->dir_entry[entry].foreground, this->dir_entry[entry].background); } window_puts(this->window, this->temp + 1, len + 1); /* Display the end of the entry (the part after the file name). */ window_puts(this->window, this->temp + 1 + len + 1, this->columns - len - 2 - 2); tty_colors(brightness, foreground, background); } else { if (entry == this->current_entry && this->focus == ON) { foreground = this->dir_entry[entry].selected ? PanelCurrentSelectedFile : PanelCurrentNotSelectedFile; background = PanelCurrentFile; } else { foreground = this->dir_entry[entry].selected ? PanelSelectedFile : PanelNotSelectedFile; background = PanelBackground; } brightness = this->dir_entry[entry].selected ? PanelSelectedFileBrightness : PanelNotSelectedFileBrightness; tty_colors(brightness, foreground, background); window_goto(this->window, entry - this->first_on_screen + 1, 1); window_puts(this->window, this->temp, this->columns - 2); } } void panel_update_frame(this) panel_t *this; { int line; tty_status_t status; char *buf = xmalloc(this->columns); if (!this->visible) return; tty_save(&status); tty_colors(OFF, PanelFrame, PanelFrame); for (line = 1; line < this->lines - 1; line++) { window_goto(this->window, line, 0); window_putc(this->window, ' '); } for (line = 1; line < this->lines - 1; line++) { window_goto(this->window, line, this->columns - 1); window_putc(this->window, ' '); } memset(buf, ' ', this->columns); window_goto(this->window, 0, 0); window_puts(this->window, buf, this->columns); window_goto(this->window, this->lines - 1, 0); window_puts(this->window, buf, this->columns); xfree(buf); tty_restore(&status); } void panel_update(this) panel_t *this; { assert(this->current_entry < this->entries); panel_update_frame(this); panel_update_path(this); panel_update_info(this); panel_update_size(this); panel_update_entries(this); } void panel_set_focus(this, status) panel_t *this; int status; { this->focus = status; panel_update_entry(this, this->current_entry); if (this->focus) if (chdir(this->path) == -1) { panel_recover(this); panel_update(this); } } void panel_select_all(this) panel_t *this; { int entry; for (entry = 0; entry < this->entries; entry++) if (this->dir_entry[entry].selected == 0 && this->dir_entry[entry].type != DIR_ENTRY) { this->dir_entry[entry].selected = 1; this->selected_entries++; } } void panel_unselect_all(this) panel_t *this; { int entry; for (entry = 0; entry < this->entries; entry++) this->dir_entry[entry].selected = 0; this->selected_entries = 0; } char * panel_get_path(this) panel_t *this; { return this->path; } int canceled() { int key; if (user_heart_attack) { input_line_t *saved_il; user_heart_attack = 0; saved_il = il_save(); key = panel_1s_message("Abort current operation? ", "yn", IL_FREEZED | IL_BEEP); il_restore(saved_il); il_update(); il_update_point(); tty_update(); return (key == 'n' || key == 'N') ? 0 : 1; } return 0; } /* * Check if two file names point to the same file. It works by * checking the devices and inodes. */ int same_file(file1, file2) char *file1; char *file2; { struct stat s1; struct stat s2; if (xstat(file1, &s1) == 0 && xstat(file2, &s2) == 0 && s1.st_dev == s2.st_dev && s1.st_ino == s2.st_ino) return 1; return 0; } #define WARN_OVERWRITE 0 #define WARN_OK 1 #define WARN_CANCEL 2 #define WARN_SKIP 3 int panel_warning(this, file) panel_t *this; char *file; { char c; if (this->selected_entries) c = panel_2s_message("%s: File exists. Overwrite/Skip/All/Cancel? ", file, "osac", IL_MOVE|IL_BEEP|IL_SAVE|IL_ERROR); else c = panel_2s_message("%s: File exists. Overwrite/Cancel? ", file, "oc", IL_MOVE|IL_BEEP|IL_SAVE|IL_ERROR); switch (c) { case 'o': return WARN_OVERWRITE; case 'a': if (this->selected_entries) { this->chkdest = OFF; return WARN_OVERWRITE; } break; case 's': if (this->selected_entries) return WARN_SKIP; default: break; } return WARN_CANCEL; } /* * Remove a directory entry only if it is not a special file. */ void panel_unlink(name) char *name; { struct stat statbuf; /* Don't delete the file unless it is a regular one. Also don't delete it if we cannot stat it. Avoid doing anything stupid. */ if (xstat(name, &statbuf) == 0 && S_ISREG(statbuf.st_mode)) unlink(name); } #define COPY_BUFFER_SIZE (32 * 1024) #define SD_OK WARN_OK #define SD_CANCEL WARN_CANCEL #define SD_SKIP WARN_SKIP #define S_OPENERR 4 #define S_READERR 5 #define D_CREATERR 6 #define D_WRITEERR 7 #define SD_NOSPACE 8 #define SD_UNKNOWN 9 #define D_STATERR 10 #define SD_INVAL 11 #define SD_INTERRUPTED 12 char *copyerr[12] = { "", "", "", "cannot open source file", "cannot read from source file", "cannot create destination file", "cannot write to destination file", "not enough space on device", "unknown error", "cannot stat destination file", "cannot copy a directory to a non-directory", "cp was interrupted by a signal", }; static int panel_percent(x, total) off64_t x; off64_t total; { /* This shouldn't happen. */ if (total == 0) return 0; return (total >= 100000) ? (x / (total / 100)) : ((x * 100) / total); } int panel_copy(this, src, dest, mode, uid, gid) panel_t *this; char *src; char *dest; mode_t mode; uid_t uid; gid_t gid; { size_t len; int sfd, dfd, error; off64_t flen, n, memsize; struct stat dest_statbuf; char *buf, *dest_file, *msg; int bytes_transferred, bytes_to_transfer; if (S_ISLNK(mode)) { struct stat s_tmp; if(xstat(src,&s_tmp) != -1) { mode=s_tmp.st_mode; } } if (S_ISDIR(mode)) { /* The source file is a directory. */ int result; char *temp; if (xstat(dest, &dest_statbuf) == 0) { /* The destination exists. */ /* We can't copy a directory to a non-directory. */ if (!S_ISDIR(dest_statbuf.st_mode)) return SD_INVAL; /* The destination is a directory. The directory 'dest' might contain a directory 'src' so we have to check it out. */ temp = xmalloc(strlen(dest) + 1 + strlen(src) + 1); sprintf(temp, "%s/%s", dest, src); if (this->chkdest && access(temp, 0) == 0) { status_default(); error = panel_warning(this, temp); tty_update(); xfree(temp); if (error) return error; } else xfree(temp); } /* The 'dest' directory contains no 'src' directory or we have the permission to overwrite it, so we may proceed. */ temp = xmalloc(32 + strlen(src) + strlen(dest) + 1); dest_file = xbasename(dest); if (*dest_file == '\0') return D_CREATERR; msg = xmalloc(32 + strlen(src) + strlen(dest)); sprintf(msg, "(COPY) cp -r \"%s\" \"%s\"", src, dest); status(msg, STATUS_WARNING, STATUS_LEFT); tty_update(); xfree(msg); sprintf(temp, "cp -r \"%s\" \"%s\"", src, dest); result = start(temp, 1); xfree(temp); tty_update_title(this->path); if (WIFSIGNALED(result)) { return SD_INTERRUPTED; } if(WIFEXITED(result) && (WEXITSTATUS(result) != 0)) { display_errors("cp"); return SD_UNKNOWN; } return SD_OK; } /* The source is a regular file. */ len = strlen(dest); dest = xstrdup(dest); if (xstat(dest, &dest_statbuf) == 0 && S_ISDIR(dest_statbuf.st_mode)) { /* The destination is a directory. */ dest = xrealloc(dest, len + 1 + strlen(src) + 1); strcat(dest, "/"); strcat(dest, src); } dest_file = xbasename(dest); if (*dest_file == '\0') { xfree(dest); return D_CREATERR; } if (this->chkdest && (access(dest, 0) == 0)) { status_default(); error = panel_warning(this, dest_file); tty_update(); if (error) return error; } msg = xmalloc(32 + strlen(src)); if (S_ISREG(mode)) sprintf(msg, "(COPY) [ 0%%] %s", src); else sprintf(msg, "(COPY) [0 bytes] %s", src); status(msg, STATUS_WARNING, STATUS_LEFT); tty_update(); xfree(msg); if ((sfd = open64(src, O_RDONLY | O_BINARY)) == -1) return S_OPENERR; #ifdef HAVE_LINUX /* Ignore the executable bits when copying from a MSDOG file system. */ if (this->msdosfs) mode &= ~0111; #endif /* HAVE_LINUX */ if ((dfd = creat(dest, mode)) == -1) { close(sfd); xfree(dest); return D_CREATERR; } memsize = min(flen = get_file_length(sfd), COPY_BUFFER_SIZE); if (S_ISBLK(mode) || S_ISCHR(mode)) { flen = MAXFILESIZE; memsize = COPY_BUFFER_SIZE; } if (flen == 0) { if (getuid() == 0) chown(dest, uid, gid); close2(sfd, dfd); xfree(dest); return SD_OK; } buf = xmalloc(memsize); for (n = 0; n < flen; n += COPY_BUFFER_SIZE) { bytes_to_transfer = min(flen - n, memsize); if (canceled()) { close2(sfd, dfd); panel_unlink(dest); xfree2(buf, dest); return SD_CANCEL; } signals(ON); bytes_transferred = xread(sfd, buf, bytes_to_transfer); signals(OFF); if (bytes_transferred != bytes_to_transfer) { if (bytes_transferred >= 0) { if (bytes_transferred) bytes_to_transfer = bytes_transferred; else { if (getuid() == 0) chown(dest, uid, gid); close2(sfd, dfd); xfree2(buf, dest); return SD_OK; } } else { close2(sfd, dfd); panel_unlink(dest); xfree2(buf, dest); return S_READERR; } } if (canceled()) { close2(sfd, dfd); panel_unlink(dest); xfree2(buf, dest); return SD_CANCEL; } bytes_transferred = xwrite(dfd, buf, bytes_to_transfer); if (bytes_transferred != bytes_to_transfer) { int safe_errno = errno; close2(sfd, dfd); panel_unlink(dest); xfree2(buf, dest); return (bytes_transferred > 0) ? SD_NOSPACE : ((safe_errno == ENOSPC) ? SD_NOSPACE : D_WRITEERR); } if (n + bytes_to_transfer <= flen) { msg = xmalloc(32 + strlen(src)); if (S_ISREG(mode)) sprintf(msg, "(COPY) [%3d%%] %s", panel_percent(n + bytes_to_transfer, flen), src); else { #ifdef HAVE_64BIT_IO sprintf(msg, "(COPY) [%Ld bytes] %s", (long long)(n + bytes_to_transfer), src); #else /* !HAVE_64BIT_IO */ sprintf(msg, "(COPY) [%ld bytes] %s", (long)(n + bytes_to_transfer), src); #endif /* !HAVE_64BIT_IO */ } status(msg, STATUS_WARNING, STATUS_LEFT); tty_update(); xfree(msg); } } if (getuid() == 0) chown(dest, uid, gid); close2(sfd, dfd); xfree2(buf, dest); return SD_OK; } #define FT_OK WARN_OK #define FT_CANCEL WARN_CANCEL #define FT_SKIP WARN_SKIP #define T_CREATERR 4 #define F_DELETERR 5 #define F_STATERR 6 #define T_STATERR 7 #define FT_UNKNOWN 8 #define FT_INVAL 9 #define FT_NOSPACE 10 #define FT_COPY 11 #define FT_INTERRUPTED 12 char *moveerr[12] = { "", "", "", "cannot create destination file", "cannot remove source file", "cannot stat source file", "cannot stat destination directory", "unknown error", "cannot copy a directory to a non-directory", "not enough space on device", "cannot copy file", "mv was interrupted by a signal", }; int panel_move(this, from, to, mode) panel_t *this; char *from, *to; mode_t mode; { int error; size_t len; struct stat to_statbuf; struct stat from_statbuf; char *to_file, *msg; if (S_ISDIR(mode)) { /* The source file is a directory. */ int result; char *temp; if (xstat(to, &to_statbuf) == 0) { /* The destination exists. */ /* We can't move a directory to a non-directory. */ if (!S_ISDIR(to_statbuf.st_mode)) return FT_INVAL; /* The destination is a directory. The directory 'to' might contain a directory 'from' so we have to check it out. */ temp = xmalloc(strlen(to) + 1 + strlen(from) + 1); sprintf(temp, "%s/%s", to, from); if (this->chkdest && access(temp, 0) == 0) { status_default(); error = panel_warning(this, temp); tty_update(); xfree(temp); if (error) return error; } else xfree(temp); } /* The 'to' directory contains no 'from' directory or we have the permission to overwrite it, so we may proceed. */ temp = xmalloc(32 + strlen(from) + strlen(to) + 1); to_file = xbasename(to); if (*to_file == '\0') return T_CREATERR; msg = xmalloc(32 + strlen(from) + strlen(to)); sprintf(msg, "(MOVE) mv -f \"%s\" \"%s\"", from, to); status(msg, STATUS_WARNING, STATUS_LEFT); tty_update(); xfree(msg); sprintf(temp, "mv -f \"%s\" \"%s\"", from, to); result = start(temp, 1); xfree(temp); tty_update_title(this->path); if (WIFSIGNALED(result)) return FT_INTERRUPTED; if(WIFEXITED(result)) { if(WEXITSTATUS(result) != 0) { display_errors("mv"); return FT_UNKNOWN; } return FT_OK; } return FT_UNKNOWN; } /* The source is not a directory. */ len = strlen(to); to = xstrdup(to); if (xstat(to, &to_statbuf) == 0 && S_ISDIR(to_statbuf.st_mode)) { /* The destination is a directory. */ to = xrealloc(to, len + 1 + strlen(from) + 1); strcat(to, "/"); strcat(to, from); } to_file = xbasename(to); if (*to_file == '\0') { xfree(to); return T_CREATERR; } if (to_file == to) { /* 'to' is relative to the current directory. We have to add './' to its beginning in order to be able to stat the destination directory later. */ char *temp = xmalloc(2 + (len = strlen(to)) + 1); temp[0] = '.'; temp[1] = '/'; memcpy(temp + 2, to, len + 1); xfree(to); to = temp; /* Update 'to_file'. */ to_file = to + 2; } if (this->chkdest && (access(to, 0) == 0)) { status_default(); error = panel_warning(this, to_file); tty_update(); if (error) return error; } msg = xmalloc(32 + strlen(from)); sprintf(msg, "(MOVE) %s", from); status(msg, STATUS_WARNING, STATUS_LEFT); tty_update(); xfree(msg); if (xstat(from, &from_statbuf) == -1) return F_STATERR; if (xstat(to, &to_statbuf) == -1) { /* This is very very ugly ... :-(. We need to stat the destination directory in order to find out if we can move the file. If we can't, we have to copy it. */ char c = *(to_file - 1); *(to_file - 1) = 0; error = (*to) ? xstat(to, &to_statbuf) : xstat("/", &to_statbuf); *(to_file - 1) = c; if (error == -1) return T_STATERR; } if (to_statbuf.st_dev != from_statbuf.st_dev #ifdef HAVE_LINUX || this->msdosfs #endif /* HAVE_LINUX */ ) { error = panel_copy(this, from, to, from_statbuf.st_mode, from_statbuf.st_uid, from_statbuf.st_gid); switch (error) { case SD_OK: goto remove_from; case SD_CANCEL: return FT_CANCEL; case SD_SKIP: return FT_SKIP; case SD_NOSPACE: return FT_NOSPACE; default: panel_3s_message("%s: Copy failed, %s.", from, copyerr[error - 1], (char *)NULL, IL_MOVE | IL_BEEP | IL_ERROR); return FT_COPY; } /* Not reached. */ } service_pending_signals(); if (S_ISREG(to_statbuf.st_mode) || S_ISDIR(to_statbuf.st_mode)) { unlink(to); if (link(from, to) == -1) return T_CREATERR; } remove_from: if (unlink(from) == -1) return F_DELETERR; return FT_OK; } /* * Return the index of the entry whose name is pointed to by `str', or 0 * if no such entry is found. Note that 0 is still a valid entry number, * but it is also used as the default entry in case of failure. */ int panel_find_index(this, str) panel_t *this; char *str; { int entry; size_t len = strlen(str); char *temp = xmalloc(len + 1); len = min(len, (size_t)this->maxname); strncpy(temp, str, len); temp[len] = 0; /* Do we have a perfect match? */ for (entry = 0; entry < this->entries; entry++) if (strcmp(temp, this->dir_entry[entry].name) == 0) break; if (entry != this->entries) goto done; /* Do we have a case insensitive match? */ for (entry = 0; entry < this->entries; entry++) if (strcasecmp(temp, this->dir_entry[entry].name) == 0) break; if (entry != this->entries) goto done; /* Do we have a partial match? */ for (entry = 0; entry < this->entries; entry++) if (strncmp(temp, this->dir_entry[entry].name, min(len, strlen(this->dir_entry[entry].name))) == 0) break; if (entry != this->entries) goto done; /* Do we have a partial case insensitive match? */ for (entry = 0; entry < this->entries; entry++) if (strncasecmp(temp, this->dir_entry[entry].name, min(len, strlen(this->dir_entry[entry].name))) == 0) break; /* FIXME: We can add here as many heuristics as we want. */ if (entry == this->entries) entry = 0; done: xfree(temp); return entry; } /* An ugly hack. */ extern int wait_msg; extern char *screen; /* * Change the directory of the current panel to the directory under * the cursor. If that directory is ".." then go up to the parent * directory. */ int panel_act_ENTER(this, other) panel_t *this, *other; { int back; char *old_path, *cmd, *old_entry_name; char *name = this->dir_entry[this->current_entry].name; switch (this->dir_entry[this->current_entry].type) { case DIR_ENTRY: if (strcmp(name, "..") == 0 && strcmp(this->path, "/") == 0) break; back = (strcmp(name, "..") == 0) ? 1 : 0; old_path = xmalloc(this->pathlen + 1); strcpy(old_path, this->path); if (!panel_read_directory(this, name, ON)) { if (back) { panel_recover(this); panel_update(this); } else panel_2s_message("%s/: Permission denied.", name, (char *)NULL, IL_FREEZED | IL_BEEP | IL_SAVE | IL_ERROR); break; } if (back) { int index; old_entry_name = strrchr(old_path, '/'); assert(old_entry_name); index = panel_find_index(this, ++old_entry_name); panel_set_current_entry(this, index); } else panel_set_current_entry(this, 0); xfree(old_path); panel_update(this); if (strcmp(this->path, other->path) == 0) { panel_action(other, act_REGET, this, (void *)-1, 1); panel_update(other); } else panel_update_size(other); break; case FILE_ENTRY: if (this->dir_entry[this->current_entry].executable) { cmd = xmalloc(32 + strlen(name) + 1); sprintf(cmd, "./\"%s\"", name); start(cmd, 0); wait_msg = 1; xfree(cmd); tty_touch(); tty_get_screen(screen); panel_no_optimizations(this); panel_no_optimizations(other); il_insert_text(name); tty_update_title(this->path); return 1; } break; } return 0; } /* * Copy the selected files in the active panel into some other place, * usually the current directory of the other panel. */ void panel_act_COPY(this, other) panel_t *this, *other; { size_t len; int error, entry; char *file, *dir = NULL, *msg, *input = NULL, *tmp_input; this->chkdest = ON; if (this->selected_entries == 0) { char *name = this->dir_entry[this->current_entry].name; if (this->current_entry == 0 && !rootdir()) return; msg = xmalloc(16 + strlen(name) + 1); sprintf(msg, "Copy %s to: ", cutname(name, 0, 0)); len = 1 + strlen(name) + 1; file = xmalloc(strlen(other->path) + len); sprintf(file, "%s/%s", other->path, name); if (!il_read_line(msg, &input, file, copy_history)) { xfree(msg); return; } xfree(msg); if (S_ISDIR(this->dir_entry[this->current_entry].mode)) il_message(PANEL_COPY_DIR_MSG); else il_message(PANEL_COPY_FILE_MSG); tty_update(); tmp_input = tilde_expand(input); xfree(input); input = tmp_input; error = same_file(name, input); xfree(file); if (error) { panel_3s_message("%s and %s point to the same file.", name, input, (char *)NULL, IL_MOVE | IL_BEEP | IL_SAVE | IL_ERROR); xfree(input); return; } error = panel_copy(this, name, input, this->dir_entry[this->current_entry].mode, getuid(), getgid()); xfree(input); if (error != SD_OK && error != SD_CANCEL) panel_3s_message("%s: Copy failed, %s.", name, copyerr[error - 1], (char *)NULL, IL_MOVE | IL_BEEP | IL_SAVE | IL_ERROR); status_default(); panel_update_size(this); panel_update_size(other); tty_update(); } else { if (!il_read_line("Copy selected file(s) to: ", &dir, other->path, copy_history)) return; if (same_file(this->path, dir)) { panel_1s_message(nice_try, (char *)NULL, IL_FREEZED | IL_BEEP | IL_ERROR); return; } dir = xrealloc(dir, (len = strlen(dir) + 1) + 1); dir[len-1] = '/'; dir[len ] = '\0'; panel_init_iterator(this); while ((entry = panel_get_next(this)) != -1) { char *name = this->dir_entry[entry].name; mode_t mode = this->dir_entry[entry].mode; uid_t uid = getuid(); gid_t gid = getgid(); dir = xrealloc(dir, len + strlen(name) + 1); strcpy(dir + len, name); if (canceled()) break; il_message(PANEL_COPY_FILES_MSG); tty_update(); error = panel_copy(this, name, dir, mode, uid, gid); if (error != SD_OK) { if (error == SD_CANCEL) break; if (error == SD_SKIP) continue; if (panel_3s_message("%s: Copy failed, %s.", name, copyerr[error - 1], (char *)NULL, IL_MOVE | IL_BEEP | IL_ERROR) == 0) break; } else this->dir_entry[entry].selected = 0; panel_update_size(this); panel_update_size(other); } if (dir) xfree(dir); status_default(); tty_update(); } if (!panel_read_directory(other, other->path, ON)) panel_recover(other); panel_update(other); if (!panel_read_directory(this, this->path, ON)) panel_recover(this); panel_update(this); } /* * Delete the selected files and directories in the active panel. */ void panel_act_DELETE(this, other) panel_t *this, *other; { char *msg; char *command; int keep_asking = 1; int first_entry, entry, answer = 0, result; if (this->selected_entries == 0 && (this->current_entry == 0 && !rootdir())) return; if (panel_1s_message("Delete selected entries? ","yn",IL_FREEZED) != 'y') return; /* Remember the index of the first selected file. */ for (first_entry = 0; first_entry < this->entries; first_entry++) if (this->dir_entry[first_entry].selected) break; panel_init_iterator(this); while ((entry = panel_get_next(this)) != -1) { char *name = this->dir_entry[entry].name; int interrupted=0; service_pending_signals(); msg = xmalloc(32 + strlen(name)); sprintf(msg, "(DELETE) %s", name); status(msg, STATUS_ERROR, STATUS_LEFT); tty_update(); xfree(msg); if (canceled()) break; if (keep_asking) answer = panel_2s_message("Delete %s? (Yes/Skip/All/Cancel) ", name, "ysac", IL_MOVE); il_message(PANEL_DELETE_FILES_MSG); tty_update(); if (answer == 'a') keep_asking = 0; else if (answer == 's') continue; else if (answer == 'c') break; else if (answer != 'y') break; if (this->dir_entry[entry].type == DIR_ENTRY) { il_message(PANEL_DELETE_DIR_MSG); tty_update(); result = (rmdir(name) == 0); if (!result) { if (panel_2s_message( "%s/: directory might contain files. Delete? ", name, "yn", IL_MOVE | IL_SAVE) == 'y') { command = xmalloc(32 + strlen(name) + 1); sprintf(command, "rm -r -f \"%s\"", name); result = start(command, 1); xfree(command); tty_update_title(this->path); if(WIFSIGNALED(result)) { result=0; interrupted=1; } else if(WIFEXITED(result)) { if(WEXITSTATUS(result) != 0) { display_errors("rm"); result=0; } else { result=1; /* ok */ } } else result=0; /* unknown error */ } } } else result = unlink(name) == 0; if (interrupted) { if (panel_2s_message("%s: Deletion interrupted. Continue? ", name, "yn", IL_MOVE | IL_BEEP | IL_ERROR) != 'y') break; } else if (!result) { if (panel_2s_message("%s: Deletion failed. Continue? ", name, "yn", IL_MOVE | IL_BEEP | IL_ERROR) != 'y') break; } else this->dir_entry[entry].selected = 0; } if (first_entry != this->entries) panel_set_current_entry(this, first_entry); panel_update_size(this); panel_update_size(other); status_default(); tty_update(); if (!panel_read_directory(this, this->path, ON)) panel_recover(this); panel_update(this); if (strcmp(this->path, other->path) == 0) { if (!panel_read_directory(other, other->path, ON)) panel_recover(other); panel_update(other); } } int panel_isdir(path) const char *path; { struct stat s; if (stat(path, &s) < 0) return 0; return S_ISDIR(s.st_mode); } int panel_mkdirs(path, mode) const char *path; int mode; { char *copy = xstrdup(path); char *z = copy; for (; *z != '\0'; z++) if (*z == '/' && z != copy) { *z = '\0'; if (!panel_isdir(copy)) if (mkdir(copy, mode) != 0) { xfree(copy); return -1; } *z = '/'; } xfree(copy); return 0; } /* * Create a new directory into the current panel's directory. */ void panel_act_MKDIR(this, other) panel_t *this, *other; { size_t len; char *input = NULL, *tmp_input; if (!il_read_line("New directory name: ", &input, NULL, mkdir_history)) return; if (input[0] == '\0') { xfree(input); return; } tmp_input = tilde_expand(input); xfree(input); input = tmp_input; /* Add a '/' at the end, otherwise panel_mkdirs() will think the last component is a regular file and will not create the directory. */ len = strlen(input); input = realloc(input, len + 1 + 1); input[len] = '/'; input[len + 1] = '\0'; /* I don't remember why I've put S_IFDIR here. Is it really necessary? */ if (panel_mkdirs(input, S_IFDIR | S_IRWXU | S_IRWXG | S_IRWXO) == -1) { panel_2s_message("%s: Permission denied.", input, (char *)NULL, IL_FREEZED | IL_BEEP | IL_SAVE | IL_ERROR); xfree(input); return; } if (!panel_read_directory(this, this->path, ON)) panel_recover(this); else { /* If `input' is something like `a/b/c' we will default on the first entry. */ this->current_entry = panel_find_index(this, input); this->first_on_screen = panel_get_centered_fos(this); panel_update_entries(this); panel_update_info(this); panel_update_size(this); } if (strcmp(this->path, other->path) == 0) { char *old_entry = xstrdup(other->dir_entry[other->current_entry].name); if (!panel_read_directory(other, other->path, ON)) panel_recover(other); else { other->current_entry = panel_find_index(other, old_entry); other->first_on_screen = panel_get_centered_fos(other); panel_update_entries(other); panel_update_info(other); } xfree(old_entry); } panel_update_size(other); xfree(input); } /* * Move the selected files and directories from the active panel into * some other place in the current file system (usually in the other * panel's directory. Files can also be moved across file systems. */ void panel_act_MOVE(this, other) panel_t *this; panel_t *other; { size_t len; int first_entry, entry, error; char *file, *dir = NULL, *msg, *input = NULL, *tmp_input; this->chkdest = ON; if (this->selected_entries == 0) { char *name = this->dir_entry[this->current_entry].name; if (this->current_entry == 0 && !rootdir()) return; msg = xmalloc(16 + strlen(name) + 1); sprintf(msg, "Move %s to: ", cutname(name, 0, 0)); len = 1 + strlen(name) + 1; file = xmalloc(strlen(other->path) + len); sprintf(file, "%s/%s", other->path, name); if (!il_read_line(msg, &input, file, move_history)) { xfree(msg); return; } xfree(msg); if (S_ISDIR(this->dir_entry[this->current_entry].mode)) il_message(PANEL_MOVE_DIR_MSG); else il_message(PANEL_MOVE_FILE_MSG); tty_update(); tmp_input = tilde_expand(input); xfree(input); input = tmp_input; error = same_file(name, input); xfree(file); if (error) { panel_3s_message("%s and %s point to the same file.", name, input, (char *)NULL, IL_MOVE | IL_BEEP | IL_SAVE | IL_ERROR); xfree(input); return; } error = panel_move(this, name, input, this->dir_entry[this->current_entry].mode); if (error != FT_OK) { if (error == FT_CANCEL) { xfree(input); status_default(); tty_update(); return; } panel_3s_message("%s: Move failed, %s.", name, moveerr[error - 1], (char *)NULL, IL_MOVE | IL_BEEP | IL_ERROR); } xfree(input); status_default(); panel_update_size(this); panel_update_size(other); tty_update(); } else { if (!il_read_line("Move selected file(s) to: ", &dir, other->path, move_history)) return; if (same_file(this->path, dir)) { panel_1s_message(nice_try, (char *)NULL, IL_FREEZED | IL_BEEP | IL_ERROR); return; } dir = xrealloc(dir, (len = strlen(dir) + 1) + 1); dir[len-1] = '/'; dir[len ] = '\0'; /* Remember the index of the first selected file. */ for (first_entry = 0; first_entry < this->entries; first_entry++) if (this->dir_entry[first_entry].selected) break; panel_init_iterator(this); while ((entry = panel_get_next(this)) != -1) { char *name = this->dir_entry[entry].name; service_pending_signals(); dir = xrealloc(dir, len + strlen(name) + 1); strcpy(dir + len, name); if (canceled()) break; il_message(PANEL_MOVE_FILES_MSG); tty_update(); error = panel_move(this, name, dir, this->dir_entry[entry].mode); if (error != FT_OK) { if (error == FT_CANCEL) break; if (error == FT_SKIP) continue; if (panel_3s_message("%s: Move failed, %s.", name, moveerr[error - 1], (char *)NULL, IL_MOVE | IL_BEEP | IL_ERROR) == 0) break; } else this->dir_entry[entry].selected = 0; } if (dir) xfree(dir); if (first_entry != this->entries) panel_set_current_entry(this, first_entry); status_default(); tty_update(); } if (!panel_read_directory(other, other->path, ON)) panel_recover(other); panel_update(other); if (!panel_read_directory(this, this->path, ON)) panel_recover(this); panel_update(this); } /* * Change the directory of the current panel. Refresh the other panel as * well if it turns out that both point to the same directory. */ void panel_act_CHDIR(this, other, new_dir) panel_t *this; panel_t *other; char *new_dir; { assert(new_dir); if (new_dir[0] == '/') { this->pathlen = strlen(new_dir); this->path = xrealloc(this->path, (this->pathlen + 1) * sizeof(char)); strcpy(this->path, new_dir); } else { this->pathlen += 1 + strlen(new_dir); this->path = xrealloc(this->path, (this->pathlen + 1) * sizeof(char)); strcat(this->path, "/"); strcat(this->path, new_dir); minimize_path(this->path); } panel_set_current_entry(this, 0); panel_action(this, act_REGET, (panel_t *)NULL, (void *)NULL, 1); panel_update(this); if (strcmp(this->path, other->path) == 0) { panel_action(other, act_REGET, (panel_t *)NULL, (void *)-1, 1); panel_update(other); } } /* * Refresh a panel by re-reading the directory from the disk. */ void panel_act_REGET(this, aux_info) panel_t *this; void *aux_info; { char *old_entry; int flag, verify; if (this->dir_entry && this->dir_entry[this->current_entry].name) { old_entry = xstrdup(this->dir_entry[this->current_entry].name); flag = 1; } else old_entry = "", flag = 0; verify = aux_info == (void *)-1; if (panel_read_directory(this, this->path, verify)) { if (verify) panel_set_current_entry(this, panel_find_index(this, old_entry)); else panel_set_current_entry(this, 0); } else panel_recover(this); if (flag) xfree(old_entry); } #define CMP_BUFFER_SIZE (32 * 1024) #define CF_ABORT -1 #define CF_READ1 -2 #define CF_READ2 -3 #define CF_OPEN1 -4 #define CF_OPEN2 -5 /* * Compare the file at index `this_entry' into `this' with the file at * index `other_entry' into `other'. File sizes are written into * *this_size and *other_size. * * Return: * CF_ABORT if aborted, * CF_READ1 if there was a read error on the first file, * CF_READ2 if there was a read error on the second file, * CF_OPEN1 if couldn't open the first file, * CF_OPEN2 if couldn't open the second file, * or return the offset of the first difference encountered. * */ off64_t panel_compare(this, this_entry, this_size, other, other_entry, other_size) panel_t *this; int this_entry; off64_t *this_size; panel_t *other; int other_entry; off64_t *other_size; { off64_t n; char *msg; int fd1, fd2; char *buf1, *buf2; int read1, read2; int aborted = 0; char *name1 = this->dir_entry[this_entry].name; char *name2 = other->dir_entry[other_entry].name; char *file1 = name1; char *file2; int is_special1=0; int is_special2=0; int mismatch=0; off64_t size=0; *this_size = *other_size = 0; if(IS_SPECIAL(this->dir_entry[this_entry].mode)) is_special1=1; if(IS_SPECIAL(other->dir_entry[this_entry].mode)) is_special2=1; /* If either is a special file, use the length of the other. */ /* size is only used for calculating percentage done */ if(is_special1 && is_special2) size=0; else if(is_special1) size=(off64_t)other->dir_entry[other_entry].size; else if(is_special2) size=(off64_t)this->dir_entry[this_entry].size; else /* neither are special files */ size=(off64_t)max(this->dir_entry[this_entry].size, other->dir_entry[other_entry].size); if ((size == 0) && !(is_special1&&is_special2)) return 0; file2 = xmalloc(strlen(other->path) + 1 + strlen(name2) + 1); sprintf(file2, "%s/%s", other->path, name2); msg = xmalloc(32 + strlen(file1) + 1); if(!size) sprintf(msg, "(CMP) %s", file1); else sprintf(msg, "(CMP) [ 0%%] %s", file1); status(msg, STATUS_WARNING, STATUS_LEFT); tty_update(); xfree(msg); if ((fd1 = open64(file1, O_RDONLY | O_BINARY)) == -1) return CF_OPEN1; if ((fd2 = open64(file2, O_RDONLY | O_BINARY)) == -1) { xfree(file2); close(fd1); return CF_OPEN2; } xfree(file2); buf1 = xmalloc(CMP_BUFFER_SIZE); buf2 = xmalloc(CMP_BUFFER_SIZE); msg = xmalloc(32 + strlen(file1) + 1); for(n=0 ; ; ) { int bytes_read; if (canceled()) { aborted = 1; break; } signals(ON); read1 = read(fd1, buf1, CMP_BUFFER_SIZE); signals(OFF); if (read1 < 0) { close(fd1); close(fd2); return CF_READ1; } *this_size += read1; signals(ON); read2 = read(fd2, buf2, CMP_BUFFER_SIZE); signals(OFF); if (read2 < 0) { close(fd1); close(fd2); return CF_READ2; } *other_size += read2; bytes_read = min(read1, read2); if(bytes_read == 0) break; if (memcmp(buf1, buf2, bytes_read) != 0) { int i; /* Ok, there is a difference somewhere. Let's go find it. */ for (i = 0; i < bytes_read; i++) if (buf1[i] != buf2[i]) break; n += i; mismatch=1; break; } n += bytes_read; if(!size) sprintf(msg, "(CMP) %s", file1); else sprintf(msg, "(CMP) [%3d%%] %s", panel_percent(n, size), file1); status(msg, STATUS_WARNING, STATUS_LEFT); tty_update(); } if(mismatch) { /* we aborted the compare before eof. We need to make sure this_size and other_size are right. If they are special files, we need to keep reading to get the size */ if(is_special1) { signals(ON); do { read1 = read(fd1, buf1, CMP_BUFFER_SIZE); } while((read1 > 0) && (*this_size += read1)); signals(OFF); } else *this_size=this->dir_entry[this_entry].size; if(is_special2) { signals(ON); do { read2 = read(fd2, buf2, CMP_BUFFER_SIZE); } while((read2 > 0) && (*other_size += read2)); signals(OFF); } else *other_size=other->dir_entry[other_entry].size; } xfree(msg); xfree(buf1); xfree(buf2); close(fd1); close(fd2); return aborted ? CF_ABORT : n; } /* * Compare the current file in the active panel with the current * file in the other one. */ void panel_act_COMPARE(this, other) panel_t *this; panel_t *other; { int permission = 1; int this_entry = this->current_entry; int other_entry = other->current_entry; il_message(PANEL_COMPARE_FILES_MSG); tty_update(); if ((strcmp(this->path, other->path) == 0) && (strcmp(this->dir_entry[this_entry].name, other->dir_entry[other_entry].name) == 0)) { panel_1s_message("There is no point in comparing a file with itself. ", (char *)NULL, IL_BEEP | IL_SAVE | IL_ERROR); return; } if (this->dir_entry[this_entry].type == FILE_ENTRY && other->dir_entry[other_entry].type == FILE_ENTRY) { if ((this->dir_entry[this_entry].size != other->dir_entry[other_entry].size) && (!(IS_SPECIAL(this->dir_entry[this_entry].mode) || IS_SPECIAL(other->dir_entry[other_entry].mode)))) { /* Ask for permission to continue if the files have different size. */ if (panel_1s_message("Files have different size. Continue? ", "yn", IL_BEEP | IL_ERROR) != 'y') permission = 0; } if (permission) { off64_t this_size,other_size; off64_t result = panel_compare(this, this_entry, &this_size, other, other_entry, &other_size); switch ((int)result) { case CF_ABORT: break; case CF_OPEN1: panel_2s_message("Cannot open file %s. ", this->dir_entry[this_entry].name, (char *)NULL, IL_MOVE | IL_BEEP | IL_SAVE | IL_ERROR); break; case CF_OPEN2: panel_2s_message("Cannot open file %s. ", other->dir_entry[other_entry].name, (char *)NULL, IL_MOVE | IL_BEEP | IL_SAVE | IL_ERROR); break; case CF_READ1: panel_2s_message("I/O error reading from file %s. ", this->dir_entry[this_entry].name, (char *)NULL, IL_MOVE | IL_BEEP | IL_SAVE | IL_ERROR); break; case CF_READ2: panel_2s_message("I/O error reading from file %s. ", other->dir_entry[other_entry].name, (char *)NULL, IL_MOVE | IL_BEEP | IL_SAVE | IL_ERROR); break; default: if ((result == this_size) && (this_size == other_size)) { /* files are identical */ panel_1s_message("Compare OK. ", (char *)NULL, IL_BEEP | IL_SAVE); } else if (result == min(this_size, other_size)) { /* The files appear to be equal, if we ignore the difference in size. */ panel_1s_message("Files are different sizes but are identical up to the size of the smallest.", (char *)NULL, IL_BEEP | IL_SAVE); } else { /* The files differ. Report the offset of the first difference encountered. */ char *msg = xmalloc(128); #ifdef HAVE_64BIT_IO sprintf(msg, "%Ld (0x%Lx)", result, result); #else /* !HAVE_64BIT_IO */ sprintf(msg, "%ld (0x%lx)", (long)result, (long)result); #endif /* !HAVE_64BIT_IO */ panel_2s_message("Files differ at offset %s. ", msg, (char *)NULL, IL_BEEP | IL_SAVE); xfree(msg); } break; } } } else { panel_2s_message("Only regular files can be compared. ", this->path, (char *)NULL, IL_MOVE | IL_BEEP | IL_SAVE | IL_ERROR); /* At least one of the files is not a regular file, thus we will not go any further. */ } status_default(); tty_update(); } /* * Compare the files in the two panels. If `quick' is 1, then perform * a "quick" comparison, i.e. just look at the name, size and date of * the files. Otherwise, do a thorough comparison. */ void panel_act_CMPDIR(this, other, quick) panel_t *this; panel_t *other; int quick; { int i, j; il_message(PANEL_COMPARE_DIR_MSG); tty_update(); if (strcmp(this->path, other->path) == 0) { panel_1s_message("No point in comparing a directory with itself. ", (char *)NULL, IL_BEEP | IL_SAVE | IL_ERROR); panel_unselect_all(this); panel_unselect_all(other); panel_update(this); panel_update(other); return; } panel_select_all(this); panel_select_all(other); for (i = 1; i < this->entries; i++) if (this->dir_entry[i].type == FILE_ENTRY) for (j = 1; j < other->entries; j++) { service_pending_signals(); if (other->dir_entry[j].type == FILE_ENTRY && strcmp(this->dir_entry[i].name, other->dir_entry[j].name) == 0) { if (this->dir_entry[i].size == other->dir_entry[j].size) { if (quick) { if (this->dir_entry[i].mtime != other->dir_entry[j].mtime) goto hilight_the_newer_one; else goto unhilight_both; } else { off64_t this_size, other_size; off64_t result = panel_compare(this, i, &this_size, other, j, &other_size); if (result == CF_ABORT) goto done; if ((result == this_size) && (result == other_size)) goto unhilight_both; } } hilight_the_newer_one: /* We don't use difftime(), to avoid floating point (Thix doesn't have fp :-(). Not good. */ if (this->dir_entry[i].mtime >= other->dir_entry[j].mtime) { other->dir_entry[j].selected = 0; other->selected_entries--; } else { this->dir_entry[i].selected = 0; this->selected_entries--; } break; unhilight_both: this->dir_entry[i].selected = 0; this->selected_entries--; other->dir_entry[j].selected = 0; other->selected_entries--; break; } } done: status_default(); panel_update(this); panel_update(other); tty_update(); /* Beep if there are differences. */ if (this->selected_entries || other->selected_entries) tty_beep(); } #define ON_OK WARN_OK #define ON_CANCEL WARN_CANCEL #define ON_SKIP WARN_SKIP #define O_RMERR 4 #define N_RMERR 5 #define ON_RENERR 6 #define ON_INTERRUPTED 7 char *renerr[7] = { "", "", "", "cannot remove old entry", "cannot remove existing entry", "cannot rename entry", "mv interrupted by a signal", }; int panel_case_rename(this, entry, upcase) panel_t *this; int entry; int upcase; { char *msg; char *new_name; int n = 0, error, first_time = 1, len; char *name = this->dir_entry[entry].name; /* First compute the new name of the entry. */ new_name = xstrdup(name); len = strlen(name); if (upcase) for (n = 0; n < len; n++) new_name[n] = toupper((int)name[n]); else for (n = 0; n < len; n++) new_name[n] = tolower((int)name[n]); /* If the name has not been changed, skip this entry. */ if (strcmp(name, new_name) == 0) goto done; msg = xmalloc(32 + len + 1); sprintf(msg, "(CASE) Renaming %s", name); status(msg, STATUS_WARNING, STATUS_LEFT); tty_update(); xfree(msg); if (this->dir_entry[entry].type == DIR_ENTRY) { if (access(new_name, F_OK) == 0) { int result; char *command; /* The destination name (new_name) exists. Ask permission to overwrite. */ if (this->chkdest == ON) error = panel_warning(this, new_name); else error = WARN_OVERWRITE; if (error) return error; command = xmalloc(32 + strlen(new_name) + 1); sprintf(command, "rm -r -f \"%s\"", new_name); result = start(command, 1); xfree(command); tty_update_title(this->path); if (WIFSIGNALED(result)) { return ON_INTERRUPTED; } if(WIFEXITED(result)) { if(WEXITSTATUS(result) != 0) { display_errors("rm"); return N_RMERR; } } else { return N_RMERR; } } if (rename(name, new_name) == 0) goto done; else return ON_RENERR; } /* Files only. */ retry: if (link(name, new_name) == 0) { if (unlink(name) == 0) goto done; else return O_RMERR; } else { int safe_errno = errno; status_default(); tty_update(); if (safe_errno == EPERM || safe_errno == EACCES) return ON_RENERR; if (!first_time) return ON_RENERR; if (this->chkdest == ON) error = panel_warning(this, new_name); else error = WARN_OVERWRITE; if (error) return error; if (unlink(new_name) != 0) return N_RMERR; if (first_time) { first_time = 0; goto retry; } } done: this->dir_entry[entry].selected = 0; this->selected_entries--; return ON_OK; } void panel_act_CASE(this, other, upcase) panel_t *this; panel_t *other; int upcase; { int entry, error; il_message(PANEL_RENAME_FILES_MSG); tty_update(); this->chkdest = ON; panel_init_iterator(this); while ((entry = panel_get_next(this)) != -1) { service_pending_signals(); error = panel_case_rename(this, entry, upcase); if (error != ON_OK) { if (error == ON_CANCEL) break; if (error == ON_SKIP) continue; if (error != ON_OK && error != ON_CANCEL) panel_3s_message("%s: Rename failed, %s.", this->dir_entry[entry].name, renerr[error - 1], (char *)NULL, IL_MOVE | IL_BEEP | IL_SAVE | IL_ERROR); } else this->dir_entry[entry].selected = 0; } status_default(); tty_update(); panel_action(this, act_REGET, (panel_t *)NULL, (void *)NULL, 1); panel_update(this); if (strcmp(this->path, other->path) == 0) { panel_action(other, act_REGET, (panel_t *)NULL, (void *)NULL, 1); panel_update(other); } } /* * Only regular files are considered. The other files are ignored. */ static int pack_compare_fn(first, second) const void *first; const void *second; { return (*(const dir_entry_t * const *)second)->size - (*(const dir_entry_t * const *)first)->size; } /* * Select the files that would go into the first bin according to the * "First Fit Decreasing" aproximation for the bin packing algorithm. * This algorithm is just a poor aproximation, first because the * problem of finding an optimal solution for bin-packing is * NP-complete (with ((11 / 9) * OPTIMAL + 4) being the best known * aproximation guarantee, and second because we don't actually know * how big a file system block actually is. Therefore we don't know * if we should round up file sizes to 512 bytes, 1Kb, 2Kb, 4Kb, etc. * We will assume 1Kb, but it might not necessary be true... */ void panel_act_BIN_PACKING(this, other, bin_size) panel_t *this; panel_t *other; off64_t bin_size; { char msg[160]; off64_t file_size; long free_blocks; off64_t *bins = NULL; dir_entry_t **buffer; char *fn = "BIN PACKING"; int max_bins = 0, used_bins = 0; int entry, candidates = 0, big_files = 0; if (bin_size == 0) { struct fs_usage fsu; fsu.fsu_blocks = (uintmax_t) -1; /* get_fs_usage will fail on SVR2 (needs disk instead of NULL) */ if (get_fs_usage(other->path, NULL, &fsu) >= 0 && fsu.fsu_blocks != (uintmax_t) -1) { /* Make bin_size equal the file system free space in the other panel. */ free_blocks = ((geteuid() == 0) ? fsu.fsu_bfree : fsu.fsu_bavail); bin_size = (free_blocks * fsu.fsu_blocksize) / 1024; } } /* First unselect all the files in the current panel. */ panel_unselect_all(this); /* Create a vector of dir_entry_t pointers and fill it with pointers to the directory entries that are regular files. Note that we skip the regular files whose size is bigger than the bin size. */ buffer = (dir_entry_t **)xmalloc(this->entries * sizeof(dir_entry_t *)); for (entry = 0; entry < this->entries; entry++) if (S_ISREG(this->dir_entry[entry].mode)) { file_size = this->dir_entry[entry].size; if (file_size % 1024) file_size += 1024 - file_size % 1024; file_size /= 1024; if (file_size <= bin_size) buffer[candidates++] = &this->dir_entry[entry]; else big_files++; } /* Then sort the pointers in decreasing order, based on the sizes of the corresponding directory entries. */ qsort(buffer, candidates, sizeof(dir_entry_t *), pack_compare_fn); /* Now start filling the bins. Assume an infinite number of bins. */ for (entry = 0; entry < candidates; entry++) { int current_bin; file_size = buffer[entry]->size; if (file_size % 1024) file_size += 1024 - file_size % 1024; file_size /= 1024; /* Look for a suitable bin. */ for (current_bin = 0; current_bin < used_bins; current_bin++) if (bins[current_bin] >= file_size) { bins[current_bin] -= file_size; /* Select the file if it goes into the first bin. */ if (current_bin == 0) { buffer[entry]->selected = 1; this->selected_entries++; } break; } if (current_bin == used_bins) { /* The file doesn't fit into any of the bins. We have to create a new bin. Put the file into the newly created bin. */ if (used_bins == max_bins) { max_bins += 16; bins = (off64_t *)xrealloc(bins, max_bins * sizeof(off64_t)); } bins[used_bins++] = bin_size - file_size; if (current_bin == 0) { buffer[entry]->selected = 1; this->selected_entries++; } } } panel_update(this); if (bins) xfree(bins); xfree(buffer); if (candidates > 0) { if (big_files > 0) { sprintf(msg, "%s %d file(s): %s %d bin(s). %d file(s) are too big.", fn, candidates, "You need approximately", used_bins, big_files); } else sprintf(msg, "%s %d file(s): You need approximately %d bin(s).", fn, candidates, used_bins); } else { if (big_files > 0) sprintf(msg, "%s: No suitable files found (smaller than %ldKb).", fn, (long)bin_size); else sprintf(msg, "%s: No regular files found.", fn); } panel_1s_message(msg, (char *)NULL, IL_FREEZED | IL_BEEP | IL_SAVE | IL_MOVE | IL_HOME); } /* * Create a vector of pointers to strings, one string for each pattern * in `string'. The patterns in string are separated by spaces. * Spaces can be inserted into patterns by quoting them with a \. The * \ itself can be used if inserted twice. */ char ** panel_parse_patterns(string) char *string; { char c; int i = 0; int index = 0; int escaping = 0; char *pattern = xmalloc(strlen(string) + 1); char **patterns = (char **)xcalloc(2, sizeof(char *)); while (1) switch ((c = *string++)) { case '\0': case ' ': case '\t': if (escaping && c != '\0') pattern[i++] = c; else { if (i > 0) { /* The pattern is not empty. Add it to the list. */ pattern[i++] = '\0'; patterns[index++] = xstrdup(pattern); patterns[index] = NULL; } if (c == '\0') goto done; patterns = (char **)xrealloc(patterns, (index + 2) * sizeof(char *)); i = 0; } break; case '\\': if (escaping) pattern[i++] = c; escaping = !escaping; break; default: if (escaping) pattern[i++] = '\\'; pattern[i++] = c; escaping = 0; break; } done: xfree(pattern); return patterns; } void panel_deallocate_patterns(patterns) char **patterns; { char **safe_patterns = patterns; while (*patterns) xfree(*patterns++); xfree(safe_patterns); } int panel_action(this, action, other, aux_info, repeat_count) panel_t *this; int action; panel_t *other; void *aux_info; int repeat_count; { char *ptr; size_t len; char *previous; char *extension; isearch_aux_t *iai; int new_scroll_step; char **patterns, **safe_patterns; int entry, result, max_offset; int need_update, need_update_all, old_current_entry; switch (action) { case act_ENTER: return panel_act_ENTER(this, other); case act_COPY: panel_act_COPY(this, other); break; case act_DELETE: panel_act_DELETE(this, other); break; case act_SELECT: /* In the root directory there is no '..' entry, so the first entry can be selected. Avoid selecting the '..' directory entry in a normal directory. */ if (rootdir() || this->current_entry != 0) { this->dir_entry[this->current_entry].selected = !this->dir_entry[this->current_entry].selected; this->selected_entries += this->dir_entry[this->current_entry].selected ? 1 : -1; panel_update_entry(this, this->current_entry); } panel_action(this, act_DOWN, other, (void *)NULL, repeat_count); break; case act_SELECT_ALL: panel_select_all(this); panel_update_entries(this); panel_update_info(this); break; case act_UNSELECT_ALL: panel_unselect_all(this); panel_update_entries(this); panel_update_info(this); break; case act_TOGGLE: this->selected_entries = 0; for (entry = 0; entry < this->entries; entry++) if (this->dir_entry[entry].type != DIR_ENTRY) { this->dir_entry[entry].selected = !this->dir_entry[entry].selected; this->selected_entries += this->dir_entry[entry].selected; } panel_update_entries(this); panel_update_info(this); break; case act_MKDIR: panel_act_MKDIR(this, other); break; case act_MOVE: panel_act_MOVE(this, other); break; case act_UP: need_update_all = need_update = 0; while (repeat_count--) { if (this->current_entry != 0) this->current_entry--; else break; if (this->current_entry + 1 == this->first_on_screen) { this->first_on_screen = max(0, this->first_on_screen - this->scroll_step); need_update_all = 1; } else { if (!need_update) panel_update_entry(this, this->current_entry + 1); need_update = 1; } } if (need_update_all) panel_update_entries(this); else if (need_update) panel_update_entry(this, this->current_entry); panel_update_info(this); break; case act_DOWN: need_update_all = need_update = 0; while (repeat_count--) { if (this->current_entry < this->entries - 1) this->current_entry++; else break; if (this->current_entry - this->first_on_screen >= this->lines - 2) { this->first_on_screen = min(this->first_on_screen + this->scroll_step, this->entries - 1 - (this->lines - 2) + 1); need_update_all = 1; continue; } if (!need_update) panel_update_entry(this, this->current_entry - 1); need_update = 1; } if (need_update_all) panel_update_entries(this); else if (need_update) panel_update_entry(this, this->current_entry); panel_update_info(this); break; case act_PGUP: if (this->current_entry == 0) break; old_current_entry = this->current_entry; if (this->current_entry < this->lines - 2) panel_set_current_entry(this, 0); else panel_set_current_entry(this, this->current_entry-(this->lines-2)); if (this->entries > this->lines - 2) panel_update_entries(this); else { panel_update_entry(this, old_current_entry); panel_update_entry(this, this->current_entry); } panel_update_info(this); break; case act_PGDOWN: if (this->current_entry == this->entries - 1) break; old_current_entry = this->current_entry; if (this->entries - 1 - this->first_on_screen < this->lines - 2) panel_set_current_entry(this, this->entries - 1); else if (this->entries - 1 - this->current_entry < this->lines - 2) panel_set_current_entry(this, this->entries - 1); else panel_set_current_entry(this, this->current_entry+this->lines-2); if (this->entries > this->lines - 2) panel_update_entries(this); else { panel_update_entry(this, old_current_entry); panel_update_entry(this, this->current_entry); } panel_update_info(this); break; case act_UP_ONE_DIR: /* Go up one directory only if not already in `/'. */ if (rootdir()) break; if (this->current_entry != 0) panel_set_current_entry(this, 0); return panel_act_ENTER(this, other); case act_HOME: if (this->current_entry != 0) { panel_set_current_entry(this, 0); panel_update_entries(this); panel_update_info(this); } break; case act_END: if (this->current_entry != this->entries - 1) { panel_set_current_entry(this, this->entries - 1); panel_update_entries(this); panel_update_info(this); } break; case act_CHDIR: panel_act_CHDIR(this, other, (char *)aux_info); break; case act_ENABLE_NEXT_MODE: this->display_mode = (this->display_mode + 1) % FILE_DISPLAY_MODES; goto all_display_modes; case act_ENABLE_OWNER_GROUP: case act_ENABLE_DATE_TIME: case act_ENABLE_SIZE: case act_ENABLE_MODE: case act_ENABLE_FULL_NAME: case act_ENABLE_ALL: this->display_mode = action - act_ENABLE_OWNER_GROUP; all_display_modes: /* Avoid displaying the ENABLE_ALL mode when the number of columns is not big enough (we are in two panel mode). */ if (this->columns < 80 && this->display_mode == ENABLE_ALL) this->display_mode = ENABLE_OWNER_GROUP; panel_update_entries(this); break; case act_SORT_NEXT_METHOD: this->sort_method = (this->sort_method + 1) % FILE_SORT_METHODS; goto all_sort_methodes; case act_SORT_BY_NAME: case act_SORT_BY_EXTENSION: case act_SORT_BY_SIZE: case act_SORT_BY_DATE: case act_SORT_BY_MODE: case act_SORT_BY_OWNER_ID: case act_SORT_BY_GROUP_ID: case act_SORT_BY_OWNER_NAME: case act_SORT_BY_GROUP_NAME: this->sort_method = action - act_SORT_BY_NAME; all_sort_methodes: CurrentSortMethod = this->sort_method; previous = this->dir_entry[this->current_entry].name; /* Check if this is the root directory and sort without the ".." entry if it is. */ if (rootdir()) qsort(this->dir_entry, this->entries, sizeof(dir_entry_t), sort_compare_fn); else qsort(this->dir_entry + 1, this->entries - 1, sizeof(dir_entry_t), sort_compare_fn); for (entry = 0; entry < this->entries; entry++) if (previous == this->dir_entry[entry].name) break; panel_set_current_entry(this, entry); panel_update_entries(this); break; case act_SWITCH: xchg(&this->lines, &other->lines); xchg(&this->columns, &other->columns); xchg(&this->x, &other->x); xchg(&this->y, &other->y); panel_resize(this, this->x, this->y, this->lines, this->columns); panel_resize(other, other->x, other->y, other->lines, other->columns); break; case act_PATTERN_SELECT: case act_PATTERN_UNSELECT: /* Create a list with all the shell patterns. */ safe_patterns = panel_parse_patterns((char *)aux_info); for (patterns = safe_patterns; *patterns; patterns++) for (entry = 0; entry < this->entries; entry++) if (this->dir_entry[entry].type != DIR_ENTRY) { int fnm_flags = FNM_PATHNAME; if (LeadingDotMatch == OFF) fnm_flags |= FNM_PERIOD; if (fnmatch(*patterns, this->dir_entry[entry].name, fnm_flags) == 0) { if (action == act_PATTERN_SELECT) { if (!this->dir_entry[entry].selected) { this->dir_entry[entry].selected = 1; this->selected_entries++; } } else { if (this->dir_entry[entry].selected) { this->dir_entry[entry].selected = 0; this->selected_entries--; } } } } /* Deallocate the list of shell patterns. */ panel_deallocate_patterns(safe_patterns); panel_update_entries(this); panel_update_info(this); break; case act_REGET: panel_act_REGET(this, aux_info); break; case act_SET_SCROLL_STEP: new_scroll_step = atoi((char *)aux_info); if (new_scroll_step > 0 && new_scroll_step < this->lines - 1) this->scroll_step = other->scroll_step = new_scroll_step; break; case act_ISEARCH_BEGIN: this->isearch_stack = xstack_init(sizeof(isearch_t)); STACK_PUSH(this->current_entry, 0); this->isearch_length = 0; this->wrapped_isearch = 0; break; case act_ISEARCH_BACKWARD: iai = (isearch_aux_t *)aux_info; len = strlen(iai->string); switch (iai->action) { case IL_ISEARCH_ACTION_NONE: break; case IL_ISEARCH_ACTION_DECREASE: goto isearch_action_decrease; case IL_ISEARCH_ACTION_RETRY: if (!this->wrapped_isearch) STACK_PUSH(this->current_entry, len); /* Search backward. */ result = panel_isearch_backward(this, iai->string, len, this->wrapped_isearch ? this->entries - 1 : this->current_entry - 1); goto isearch_backward_action_increase; case IL_ISEARCH_ACTION_INCREASE: STACK_PUSH(this->current_entry, len); /* Search backward. */ result = panel_isearch_backward(this, iai->string, len, this->current_entry); isearch_backward_action_increase: if (result == -1) { iai->action = IL_ISEARCH_ACTION_FAILED; break; } else this->isearch_length = len; if (this->wrapped_isearch) { panel_set_current_entry(this, result); panel_update_entries(this); this->wrapped_isearch = 0; } else panel_action(this, act_UP, other, (void *)NULL, this->current_entry - result); break; default: break; } iai->length = this->isearch_length; break; case act_ISEARCH_FORWARD: iai = (isearch_aux_t *)aux_info; len = strlen(iai->string); switch (iai->action) { case IL_ISEARCH_ACTION_NONE: break; case IL_ISEARCH_ACTION_DECREASE: isearch_action_decrease: { int prev_entry; size_t prev_length; /* Undo the last step of isearch-forward. */ STACK_POP(prev_entry, prev_length); if (this->isearch_length != len) break; if (this->current_entry < prev_entry) panel_action(this, act_DOWN, other, (void *)NULL, prev_entry - this->current_entry); else if (this->current_entry > prev_entry) panel_action(this, act_UP, other, (void *)NULL, this->current_entry - prev_entry); STACK_PREVIEW(prev_entry, prev_length); this->isearch_length = prev_length; } break; case IL_ISEARCH_ACTION_RETRY: if (!this->wrapped_isearch) STACK_PUSH(this->current_entry, len); /* Search forward. */ result = panel_isearch_forward(this, iai->string, len, this->wrapped_isearch ? 0 : this->current_entry + 1); goto isearch_forward_action_increase; case IL_ISEARCH_ACTION_INCREASE: STACK_PUSH(this->current_entry, len); /* Search forward. */ result = panel_isearch_forward(this, iai->string, len, this->current_entry); isearch_forward_action_increase: if (result == -1) { iai->action = IL_ISEARCH_ACTION_FAILED; break; } else this->isearch_length = len; if (this->wrapped_isearch) { panel_set_current_entry(this, result); panel_update_entries(this); this->wrapped_isearch = 0; } else panel_action(this, act_DOWN, other, (void *)NULL, result - this->current_entry); break; default: break; } iai->length = this->isearch_length; break; case act_ISEARCH_END: xstack_end(this->isearch_stack); this->isearch_stack = NULL; break; case act_CMPDIR: panel_act_CMPDIR(this, other, *(int *)aux_info); break; case act_CASE: panel_act_CASE(this, other, *(int *)aux_info); break; case act_COMPARE: panel_act_COMPARE(this, other); break; case act_BIN_PACKING: panel_act_BIN_PACKING( this, other, (off64_t)atoi((char *)aux_info)); break; case act_HORIZONTAL_SCROLL_LEFT: this->horizontal_offset -= repeat_count; if (this->horizontal_offset < 0) this->horizontal_offset = 0; panel_update(this); break; case act_HORIZONTAL_SCROLL_RIGHT: this->horizontal_offset += repeat_count; /* The +1 accounts for the type character (/, *, |, @, etc). */ max_offset = (this->maxname + 1) - (this->columns - panel_get_reserved_characters(this)); if (max_offset < 0) max_offset = 0; if (this->horizontal_offset >= max_offset) this->horizontal_offset = max_offset; panel_update(this); break; case act_SELECT_EXTENSION: case act_UNSELECT_EXTENSION: ptr = strrchr(this->dir_entry[this->current_entry].name, '.'); /* If there is no dot in the name, or the dot is on the first position, quit. */ if (ptr == this->dir_entry[this->current_entry].name || ptr == NULL) break; extension = (char *)malloc(1 + strlen(ptr) + 1); sprintf(extension, "*%s", ptr); /* Select all the files that have the same extension as the current one. */ for (entry = 0; entry < this->entries; entry++) if (this->dir_entry[entry].type != DIR_ENTRY) { int fnm_flags = FNM_PATHNAME; if (LeadingDotMatch == OFF) fnm_flags |= FNM_PERIOD; if (fnmatch(extension, this->dir_entry[entry].name, fnm_flags) == 0) { if (action == act_SELECT_EXTENSION) { if (!this->dir_entry[entry].selected) { this->dir_entry[entry].selected = 1; this->selected_entries++; } } else { if (this->dir_entry[entry].selected) { this->dir_entry[entry].selected = 0; this->selected_entries--; } } } } panel_update_entries(this); panel_update_info(this); break; default: fatal("no action"); } return 0; } gnuit-4.9.5/src/xstack.c0000644000175000017500000000544011146671376012047 00000000000000/* xstack.c -- Simple stacks management file. */ /* Copyright (C) 1993-1999, 2006-2007 Free Software Foundation, Inc. This file is part of gnuit. gnuit 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 3 of the License, or (at your option) any later version. gnuit 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, see http://www.gnu.org/licenses/. */ /* Written by Tudor Hulubei and Andrei Pitis. */ #ifdef HAVE_CONFIG_H #include #endif #include #ifdef HAVE_STDLIB_H #include #else /* !HAVE_STDLIB_H */ #include "ansi_stdlib.h" #endif /* !HAVE_STDLIB_H */ #include #include "xmalloc.h" #include "xstring.h" #include "xstack.h" /* * Create a new stack. */ xstack_t * xstack_init(esize) int esize; { xstack_t *s = (xstack_t *)xcalloc(1, sizeof(xstack_t)); s->esize = esize; return s; } /* * Destroy a stack. */ void xstack_end(stack) xstack_t *stack; { if (stack == NULL) return; if (stack->data) xfree(stack->data); xfree(stack); } /* * Push one element to a stack. */ void xstack_push(stack, data) xstack_t *stack; void *data; { stack->data = (void *)xrealloc(stack->data, ++stack->point * stack->esize); memcpy(((char *)stack->data) + (stack->point - 1) * stack->esize, data, stack->esize); } /* * Pop one element from a stack. */ void * xstack_pop(stack, data) xstack_t *stack; void *data; { if (stack->point == 0) return NULL; memcpy(data, ((char *)stack->data) + --stack->point * stack->esize, stack->esize); stack->data = (void *)xrealloc(stack->data, stack->point * stack->esize); return data; } /* * Preview the stack element located at 'offset' elements from the stack * point. The stack point is located at offset = 0. */ void * xstack_preview(stack, data, offset) xstack_t *stack; void *data; int offset; { if (stack->point == 0 || offset > stack->point) return NULL; memcpy(data, ((char *)stack->data) + (stack->point - offset) * stack->esize, stack->esize); return data; } /* * Truncate a stack to 'point' elements. */ void xstack_truncate(stack, point) xstack_t *stack; int point; { stack->point = point; stack->data = (void *)xrealloc(stack->data, stack->point * stack->esize); } /* * Return the stack point. */ int xstack_point(stack) xstack_t *stack; { return stack->point; } gnuit-4.9.5/src/inputline.c0000644000175000017500000005303611146671376012565 00000000000000/* inputline.c -- Input line management functions. */ /* Copyright (C) 1993-2000, 2006-2007 Free Software Foundation, Inc. This file is part of gnuit. gnuit 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 3 of the License, or (at your option) any later version. gnuit 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, see http://www.gnu.org/licenses/. */ /* Written by Tudor Hulubei and Andrei Pitis. */ #ifdef HAVE_CONFIG_H #include #endif #include #include #ifdef HAVE_STDDEF_H #include #endif #ifdef HAVE_STDLIB_H #include #else /* !HAVE_STDLIB_H */ #include "ansi_stdlib.h" #endif /* !HAVE_STDLIB_H */ #include #include #include "xstring.h" #include "xmalloc.h" #include "configure.h" #include "history.h" #include "tty.h" #include "window.h" #include "inputline.h" #include "tilde.h" #include "misc.h" extern int AnsiColors; #define MAX_INPUT_HISTORY 512 /* big enough I suppose ... */ #define INPUTLINE_FIELDS 6 static char *InputLineFields[INPUTLINE_FIELDS] = { "InputLineForeground", "InputLineBackground", "InputLineBrightness", "InputLineErrorForeground", "InputLineErrorBackground", "InputLineErrorBrightness", }; #ifdef HAVE_LINUX static int InputLineColors[INPUTLINE_FIELDS] = { WHITE, BLACK, ON, RED, BLACK, ON }; #else /* !HAVE_LINUX */ static int InputLineColors[INPUTLINE_FIELDS] = { WHITE, BLACK, ON, WHITE, BLACK, ON }; #endif /* !HAVE_LINUX */ #define InputLineForeground InputLineColors[0] #define InputLineBackground InputLineColors[1] #define InputLineBrightness InputLineColors[2] #define InputLineErrorForeground InputLineColors[3] #define InputLineErrorBackground InputLineColors[4] #define InputLineErrorBrightness InputLineColors[5] /* Basic input line operations. */ #define IL_NO_OPERATION 0 #define IL_BACKWARD_CHAR 1 #define IL_FORWARD_CHAR 2 #define IL_BACKWARD_WORD 3 #define IL_FORWARD_WORD 4 #define IL_BEGINNING_OF_LINE 5 #define IL_END_OF_LINE 6 #define IL_INSERT_CHAR 7 #define IL_DELETE_CHAR 8 #define IL_BACKWARD_DELETE_CHAR 9 #define IL_KILL_WORD 10 #define IL_BACKWARD_KILL_WORD 11 #define IL_RESET_LINE 12 #define IL_KILL_LINE 13 #define IL_KILL_TO_BEGINNING_OF_LINE 14 #define IL_KILL_TO_END_OF_LINE 15 #define IL_JUST_ONE_SPACE 16 #define IL_DELETE_HORIZONTAL_SPACE 17 #define IL_DOWNCASE_WORD 18 #define IL_UPCASE_WORD 19 #define IL_CAPITALIZE_WORD 20 #define IL_SET_STATIC_TEXT 21 #define IL_INSERT_TEXT 22 #define IL_SET_MARK 23 #define IL_KILL_REGION 24 #define IL_KILL_RING_SAVE 25 #define IL_YANK 26 #define IL_EXCHANGE_POINT_AND_MARK 27 #define IL_RESIZE(il_new_buffer_size) \ { \ il->size = il_new_buffer_size; \ il->buffer = xrealloc(il->buffer, il->size); \ } /* The input line. */ input_line_t *il = NULL; /* * Check if 'c' is a separator. */ static int il_separator(c) char c; { if ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || (c >= '0' && c <= '9') || (c == '$') || (c == '%')) return 0; else return 1; } /* * Store the text between the mark and the point into the kill_ring if * flags & IL_STORE. Kill it if flags & IL_KILL. */ static void il_region_command(flags) int flags; { size_t region_start; size_t region_end; size_t region_size; /* If the region is empty, preserve the previous kill_ring. */ if (il->mark == il->point) return; /* Get the region limits. */ if (il->mark > il->point) { region_start = il->point; region_end = il->mark; } else { region_start = il->mark; region_end = il->point; } region_size = region_end - region_start; if (flags & IL_STORE) { if (il->kill_ring) xfree(il->kill_ring); il->kill_ring = xmalloc(region_size + 1); memcpy(il->kill_ring, il->buffer + region_start, region_size); il->kill_ring[region_size] = '\0'; } if (flags & IL_KILL) { il->dynamic_length -= region_size; il->length -= region_size; il->point = region_start; il->mark = region_start; strcpy(il->buffer + region_start, il->buffer + region_end); IL_RESIZE(il->length + 1); } } /* * Free an input line structure. */ void il_free(some_il) input_line_t *some_il; { if (some_il == NULL) return; if (some_il->buffer) xfree(some_il->buffer); if (some_il->kill_ring) xfree(some_il->kill_ring); xfree(some_il); } /* * Compute the amount of scrolling when the point is at the end of the * input line. It should be about 25% of the dynamic part of the * input line, but if the input line shrinks (as a result of a * SIGWINCH) it should not become less than 1. */ static size_t il_compute_scroll() { return max((il->columns - il->static_length) / 4, 1); } /* * The input_line constructor. */ void il_init() { char *data; il = (input_line_t *)xmalloc(sizeof(input_line_t)); il->echo = 1; il->error = 0; il->buffer = NULL; il->kill_ring = NULL; il->columns = 0; il->line = 0; il_reset_line(); il->window = window_init(); use_section("[GITFM-Setup]"); configuration_getvarinfo("HistoryFile", &data, 1, DO_SEEK); il->history_file = tilde_expand(data ? data : "~/.githistory"); use_section(AnsiColors ? color_section : monochrome_section); get_colorset_var(InputLineColors, InputLineFields, INPUTLINE_FIELDS); /* Initialize the history library stuff... */ using_history(); read_history(il->history_file); while (next_history()); stifle_history(MAX_INPUT_HISTORY); } /* * Input line destructor. */ void il_end() { write_history(il->history_file); window_end(il->window); il_free(il); il = NULL; } /* * Resize the input line. */ void il_resize(_columns, _line) int _columns, _line; { il->columns = _columns; il->line = _line; window_resize(il->window, 0, _line, 1, _columns); } /* * Save the entire input_line structure. Returns a pointer to the saved * structure. */ input_line_t * il_save() { input_line_t *saved_il = (input_line_t *)xmalloc(sizeof(input_line_t)); *saved_il = *il; if (saved_il->buffer) { il->buffer = xmalloc(saved_il->size); memcpy(il->buffer, saved_il->buffer, saved_il->size); } if (saved_il->kill_ring) il->kill_ring = xstrdup(saved_il->kill_ring); return saved_il; } /* * Restore the input_line. */ void il_restore(saved_il) input_line_t *saved_il; { size_t columns = il->columns; size_t line = il->line; if (saved_il == NULL) return; il_free(il); il = saved_il; /* We need this in case we got a SIGWINCH. */ il_resize(columns, line); } /* * Return the position of the point (relative to the beginning of the * dynamic section. */ size_t il_point() { return il->point - il->static_length; } /* * Set the echo state. Returns the previous state of the echo flag. */ int il_echo(echo) int echo; { int old_echo_flag = il->echo; il->echo = echo; return old_echo_flag; } /* * Check if the input line is empty. */ int il_is_empty() { return il->dynamic_length == 0; } /* * Set mark where point is. */ void il_set_mark() { il->mark = il->point; } /* * Kill between point and mark. The text is deleted but saved in the * kill ring. */ void il_kill_region() { il_region_command(IL_STORE | IL_KILL); il->last_operation = IL_KILL_REGION; } /* * Save the region as if killed, but don't kill it. */ void il_kill_ring_save() { il_region_command(IL_STORE); il->last_operation = IL_KILL_RING_SAVE; } /* * Reinsert the last stretch of killed text. */ void il_yank() { if (il->kill_ring) { il_insert_text(il->kill_ring); il->last_operation = IL_YANK; } } /* * Exchange point and mark. */ void il_exchange_point_and_mark() { int point = il->point; il->point = il->mark; il->mark = point; } /* * Move the point backward one character. */ void il_backward_char() { if (il->point > il->static_length) { il->point--; il->last_operation = IL_BACKWARD_CHAR; } } /* * Move the point forward one character. */ void il_forward_char() { if (il->point < il->length) { il->point++; il->last_operation = IL_FORWARD_CHAR; } } /* * Move the point backward one word. */ void il_backward_word() { if (il->point > il->static_length) { while (il->point > il->static_length && il_separator(il->buffer[il->point - 1])) il_backward_char(); while (il->point > il->static_length && !il_separator(il->buffer[il->point - 1])) il_backward_char(); il->last_operation = IL_BACKWARD_WORD; } } /* * Move the point forward one word. */ void il_forward_word() { if (il->point < il->length) { while (il->point < il->length && il_separator(il->buffer[il->point])) il_forward_char(); while (il->point < il->length && !il_separator(il->buffer[il->point])) il_forward_char(); il->last_operation = IL_FORWARD_WORD; } } /* * Move the point at the beginning of the line. */ void il_beginning_of_line() { il->point = il->static_length; il->last_operation = IL_BEGINNING_OF_LINE; } /* * Move the point at the end of the line. */ void il_end_of_line() { il->point = il->length; il->last_operation = IL_END_OF_LINE; } /* * Insert 'c' at the point position. */ void il_insert_char(c) int c; { if (!isprint(c)) return; if (il->length + 1 >= il->size) IL_RESIZE(il->length + 1 + 32); memmove(il->buffer + il->point + 1, il->buffer + il->point, il->length - il->point + 1); il->buffer[il->point] = c; il->point++; il->length++; il->dynamic_length++; il->last_operation = IL_INSERT_CHAR; } /* * Delete the character at the point. */ void il_delete_char() { if (il->point < il->length) { memcpy(il->buffer + il->point, il->buffer + il->point + 1, il->length - il->point + 1); il->length--; il->dynamic_length--; if (il->length % 16 == 0) IL_RESIZE(il->length + 1); il->last_operation = IL_DELETE_CHAR; } } /* * Delete the character before the point. */ void il_backward_delete_char() { if (il->point > il->static_length) { memcpy(il->buffer + il->point - 1, il->buffer + il->point, il->length - il->point + 1); il->point--; il->length--; il->dynamic_length--; if (il->length % 16 == 0) IL_RESIZE(il->length + 1); il->last_operation = IL_BACKWARD_DELETE_CHAR; } } /* * Kill characters forward until encountering the end of a word. */ void il_kill_word() { size_t end_of_word; size_t old_mark = il->mark; il_set_mark(); il_forward_word(); end_of_word = il->point; il_region_command(IL_STORE | IL_KILL); if (old_mark <= il->point) il->mark = old_mark; else if (old_mark >= end_of_word) il->mark = old_mark - (end_of_word - il->point); else il->mark = il->point; il->last_operation = IL_KILL_WORD; } /* * Kill characters backward until encountering the end of a word. */ void il_backward_kill_word() { size_t old_mark = il->mark; size_t old_point = il->point; il_set_mark(); il_backward_word(); il_region_command(IL_STORE | IL_KILL); if (old_mark <= il->point) il->mark = old_mark; else if (old_mark >= old_point) il->mark = old_mark - (old_point - il->point); else il->mark = il->point; il->last_operation = IL_BACKWARD_KILL_WORD; } /* * Delete the entire line (both the static & dynamic parts). */ void il_reset_line() { il->point = 0; il->mark = 0; il->length = 0; il->static_length = 0; il->dynamic_length = 0; IL_RESIZE(1); il->buffer[0] = '\0'; il->last_operation = IL_RESET_LINE; } /* * Delete the entire dynamic part of the line. */ void il_kill_line(store) int store; { il_beginning_of_line(); il_set_mark(); il_end_of_line(); il_region_command(store | IL_KILL); il->mark = il->point; il->last_operation = IL_KILL_LINE; } /* * Delete the text between the beginning of the line and the point. */ void il_kill_to_beginning_of_line() { size_t old_mark = (il->mark <= il->point) ? il->static_length : il->mark - il->point; il_set_mark(); il_beginning_of_line(); il_region_command(IL_STORE | IL_KILL); il->mark = min(old_mark, il->length); il->last_operation = IL_KILL_TO_BEGINNING_OF_LINE; } /* * Delete the text between the point and the end of line. */ void il_kill_to_end_of_line() { size_t old_mark = il->mark; il_set_mark(); il_end_of_line(); il_region_command(IL_STORE | IL_KILL); il->mark = min(old_mark, il->length); il->last_operation = IL_KILL_TO_END_OF_LINE; } /* * Remove all the tabs and spaces arround the point, leaving just one * space. */ void il_just_one_space() { if (il->buffer[il->point] == ' ') { il_delete_horizontal_space(); il_insert_char(' '); il->last_operation = IL_JUST_ONE_SPACE; } } /* * Remove all the tabs and spaces arround the point. */ void il_delete_horizontal_space() { if (il->buffer[il->point] == ' ') { while (il->buffer[il->point] == ' ') il_delete_char(); while (il->dynamic_length && il->buffer[il->point - 1] == ' ') il_backward_delete_char(); il->last_operation = IL_DELETE_HORIZONTAL_SPACE; } } /* * Convert the following word to lower case, moving over. */ void il_downcase_word() { if (il->point < il->length) { size_t i; size_t previous_point = il->point; /* Move to the end of the word. */ il_forward_word(); for (i = previous_point; i < il->point; i++) il->buffer[i] = tolower((int)il->buffer[i]); il->last_operation = IL_DOWNCASE_WORD; } } /* * Convert the following word to upper case, moving over. */ void il_upcase_word() { if (il->point < il->length) { size_t i; size_t previous_point = il->point; /* Move to the end of the word. */ il_forward_word(); for (i = previous_point; i < il->point; i++) il->buffer[i] = toupper((int)il->buffer[i]); il->last_operation = IL_UPCASE_WORD; } } /* * Capitalize the following word, moving over. This gives the word * a first character in upper case and the rest lower case. */ void il_capitalize_word() { if (il->point < il->length) { size_t i; int first = 1; size_t previous_point = il->point; /* Move to the end of the word. */ il_forward_word(); for (i = previous_point; i < il->point; i++) if (isalnum((int)il->buffer[i])) { if (first) { il->buffer[i] = toupper((int)il->buffer[i]); first = 0; } else il->buffer[i] = tolower((int)il->buffer[i]); } il->last_operation = IL_CAPITALIZE_WORD; } } /* * Set up the static text at the beginning of the input line. This * text cannot be modified by normal editing commands. */ void il_set_static_text(static_text) char *static_text; { size_t len; assert(static_text); len = strlen(static_text); il->point += len - il->static_length; il->mark += len - il->static_length; if (len + il->dynamic_length + 1 > il->size) IL_RESIZE(len + il->dynamic_length + 1); memmove(il->buffer + len, il->buffer + il->static_length, il->dynamic_length + 1); memcpy(il->buffer, static_text, len); toprintable(il->buffer, len); il->length = (il->static_length = len) + il->dynamic_length; il->last_operation = IL_SET_STATIC_TEXT; } /* * Insert 'text' at the point position. */ void il_insert_text(text) char *text; { size_t len; if (text == NULL) return; len = strlen(text); if (il->length + len + 1 > il->size) IL_RESIZE(il->size + len + 1 + 32); memmove(il->buffer + il->point + len, il->buffer + il->point, il->length - il->point + 1); memcpy(il->buffer + il->point, text, len); toprintable(il->buffer + il->point, len); il->point += len; il->length += len; il->dynamic_length += len; il->last_operation = IL_INSERT_TEXT; } /* * Temporary hide the static part of the input line. This is only used * when the visible part of the input line becomes smaller than the * static size. */ static int il_hide_static() { int normal_static_length = il->static_length; il->buffer += il->static_length; il->length -= il->static_length; il->point -= il->static_length; il->mark -= il->static_length; il->static_length = 0; return normal_static_length; } /* * Restore the static part of the input line. */ static void il_restore_static(normal_static_length) int normal_static_length; { il->static_length = normal_static_length; il->buffer -= il->static_length; il->length += il->static_length; il->point += il->static_length; il->mark += il->static_length; } /* * Update the point. */ void il_update_point() { int scroll; size_t len; size_t normal_static_length = 0; int il_too_small = il->columns < il->static_length + 3; tty_colors(il->error ? InputLineErrorBrightness : InputLineBrightness, il->error ? InputLineErrorForeground : InputLineForeground, il->error ? InputLineErrorBackground : InputLineBackground); if (il_too_small) normal_static_length = il_hide_static(); scroll = il_compute_scroll(); len = ((il->point >= il->columns) ? il->point - il->columns + 1 + (scroll - 1) - ((il->point - il->columns) % scroll) : 0); window_goto(il->window, 0, il->point - len); if (il_too_small) il_restore_static(normal_static_length); } /* * Update the entire input line. */ void il_update() { int scroll; char *temp; unsigned len; tty_status_t status; size_t normal_static_length = 0; int il_too_small = il->columns < il->static_length + 3; tty_save(&status); tty_colors(il->error ? InputLineErrorBrightness : InputLineBrightness, il->error ? InputLineErrorForeground : InputLineForeground, il->error ? InputLineErrorBackground : InputLineBackground); if (il_too_small) normal_static_length = il_hide_static(); scroll = il_compute_scroll(); len = ((il->point >= il->columns) ? il->point - il->columns + 1 + (scroll - 1) - ((il->point - il->columns) % scroll) : 0); temp = xmalloc(il->columns); memset(temp, ' ', il->columns); if (il->echo) memcpy(temp, il->buffer + il->static_length + len, min(il->length - il->static_length - len, il->columns - il->static_length)); else memset(temp, '*', min(il->length - il->static_length - len, il->columns - il->static_length)); window_goto(il->window, 0, 0); if (!il_too_small) window_puts(il->window, il->buffer, il->static_length); window_puts(il->window, temp, il->columns - il->static_length); /* If we don't do this, the screen cursor will annoyingly jump to the left margin of the command line. */ window_goto(il->window, 0, il->point - len); if (il_too_small) il_restore_static(normal_static_length); xfree(temp); tty_restore(&status); } /* * Get the input line contents (only the dynamic part). * dest is a pointer to a NULL pointer or a pointer to a pointer allocated * with xmalloc(). */ int il_get_contents(dest) char **dest; { *dest = xrealloc(*dest, il->dynamic_length + 1); memcpy(*dest, il->buffer + il->static_length, il->dynamic_length + 1); return il->dynamic_length; } /* * Display a message into the input line. */ void il_message(message) char *message; { il_reset_line(); il_set_static_text(message ? message : "Wait...."); il_update(); il_update_point(); } void il_set_error_flag(flag) int flag; { il->error = flag; } /* * inputline's interface to the history library. */ void il_history(dir) int dir; { static int browsing = 0; static int last_history_position; HIST_ENTRY *hist; switch (dir) { case IL_PREVIOUS: if (!browsing) { browsing = 1; last_history_position = where_history(); } if ((hist = previous_history())) { il->dynamic_length = strlen(hist->line); il->length = il->static_length + il->dynamic_length; il->point = il->length; if (il->length + 1 > il->size) IL_RESIZE(il->length + 1); strcpy(il->buffer + il->static_length, hist->line); il_update(); } break; case IL_NEXT: if (!browsing) { browsing = 1; last_history_position = where_history(); } if ((hist = next_history())) { il->dynamic_length = strlen(hist->line); il->length = il->static_length + il->dynamic_length; il->point = il->length; if (il->length + 1 > il->size) IL_RESIZE(il->length + 1); strcpy(il->buffer + il->static_length, hist->line); } else il_kill_line(IL_DONT_STORE); il_update(); break; case IL_RECORD: if (browsing) { history_set_pos(last_history_position); browsing = 0; } if ((hist = previous_history())) { if (strcmp(il->buffer + il->static_length, hist->line) != 0) { add_history(il->buffer + il->static_length); next_history(); } } else add_history(il->buffer + il->static_length); next_history(); break; default: break; } } gnuit-4.9.5/src/gitmkdirs0000755000175000017500000000122111146671376012322 00000000000000#! /bin/sh # mkinstalldirs --- make directory hierarchy # Author: Noah Friedman # Created: 1993-05-16 # Last modified: 1994-03-25 # Public domain # Note: this is not supposed to be used as a stand alone program. errstatus=0 for file in ${1+"$@"} ; do set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'` shift pathcomp= for d in ${1+"$@"} ; do pathcomp="$pathcomp$d" case "$pathcomp" in -* ) pathcomp=./$pathcomp ;; esac if test ! -d "$pathcomp"; then mkdir "$pathcomp" || errstatus=$? fi pathcomp="$pathcomp/" done done exit $errstatus # mkinstalldirs ends here gnuit-4.9.5/src/gitwipe.c0000644000175000017500000000631211146671376012221 00000000000000/* gitwipe.c -- An utility that deletes the contents of a file in order to make it impossible for someone to recover it. */ /* Copyright (C) 1993-2000, 2006-2007 Free Software Foundation, Inc. This file is part of gnuit. gnuit 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 3 of the License, or (at your option) any later version. gnuit 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, see http://www.gnu.org/licenses/. */ /* Written by Tudor Hulubei and Andrei Pitis. */ #ifdef HAVE_CONFIG_H #include #endif #include #ifdef HAVE_STDLIB_H #include #else /* !HAVE_STDLIB_H */ #include "ansi_stdlib.h" #endif /* !HAVE_STDLIB_H */ #ifdef HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ #include "xtime.h" #include #ifdef HAVE_STDDEF_H #include #endif #include "file.h" #include #include #define WIPE_BUFFER_SIZE 64*1024 #undef min #define min(a, b) ((a) <= (b) ? (a) : (b)) char *g_program; void usage() { fprintf(stderr, "%s file1 [file2 [...]]\n", g_program); exit(1); } off64_t file_length(fd) int fd; { off64_t current, length; current = lseek64(fd, 0, SEEK_CUR); length = lseek64(fd, 0, SEEK_END); lseek64(fd, current, SEEK_SET); return length; } int wipe(file) char *file; { int fd; unsigned char *buf; off64_t len, i; ssize_t j, bytes_to_write; fd = open64(file, O_RDWR | O_BINARY); if (fd == -1) { fprintf(stderr, "%s: can't open file '%s'.\n", g_program, file); return 1; } len = file_length(fd); if (len == 0) return 0; buf = (unsigned char *)malloc(WIPE_BUFFER_SIZE); if (buf == NULL) { fprintf(stderr, "%s: virtual memory exhausted.\n", g_program); return 1; } for (i = 0; i < len; i += WIPE_BUFFER_SIZE) { bytes_to_write = min(len - i, WIPE_BUFFER_SIZE); for (j = 0; j < bytes_to_write; j++) buf[j] = rand() % 0xFF; if (write(fd, buf, bytes_to_write) != bytes_to_write) { fprintf(stderr, "%s: can't write to file %s.\n", g_program, file); return 1; } } close(fd); sync(); /* Don't delete the file! The file system might notice that the blocks in this file are no longer used and never write them back to disk. And there is more: sync() may return before the actual writing is done. See the Linux sync(2) & sync(8) manual pages for more detail. If you want to be sure, REBOOT NOW ! :-)))))))))))))) */ return 0; } /* * argv[1...] = files * return value = no of errors (unprocessed files) */ int main(argc, argv) int argc; char *argv[]; { int i, errors = 0; g_program = argv[0]; if (argc < 2) usage(); srand(time(NULL)); for (i = 1; i < argc; i++) errors += wipe(argv[i]); return (errors != 0); } gnuit-4.9.5/src/history.h0000644000175000017500000001513711146671376012264 00000000000000/* history.h -- The names of functions that you can call in history. */ /* Copyright (C) 1989, 1992 Free Software Foundation, Inc. This file is part of gnuit. gnuit 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 3 of the License, or (at your option) any later version. gnuit 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, see http://www.gnu.org/licenses/. */ /* The structure used to store a history entry. */ typedef struct { char *line; char *data; } HIST_ENTRY; /* A structure used to pass the current state of the history stuff around. */ typedef struct _hist_entry { HIST_ENTRY **entries; /* Pointer to the entries themselves. */ int offset; /* The location pointer within this array. */ int length; /* Number of elements within this array. */ int size; /* Number of slots allocated to this array. */ } HISTORY_STATE; /* For convenience only. You set this when interpreting history commands. It is the logical offset of the first history element. */ extern int history_base; /* Begin a session in which the history functions might be used. This just initializes the interactive variables. */ extern void using_history (); /* Return the current HISTORY_STATE of the history. */ extern HISTORY_STATE *history_get_history_state (); /* Set the state of the current history array to STATE. */ extern void history_set_history_state (); /* Place STRING at the end of the history list. The associated data field (if any) is set to NULL. */ extern void add_history (); /* Returns the number which says what history element we are now looking at. */ extern int where_history (); /* Set the position in the history list to POS. */ int history_set_pos (); /* Search for STRING in the history list, starting at POS, an absolute index into the list. DIR, if negative, says to search backwards from POS, else forwards. Returns the absolute index of the history element where STRING was found, or -1 otherwise. */ extern int history_search_pos (); /* A reasonably useless function, only here for completeness. WHICH is the magic number that tells us which element to delete. The elements are numbered from 0. */ extern HIST_ENTRY *remove_history (); /* Stifle the history list, remembering only MAX number of entries. */ extern void stifle_history (); /* Stop stifling the history. This returns the previous amount the history was stifled by. The value is positive if the history was stifled, negative if it wasn't. */ extern int unstifle_history (); /* Add the contents of FILENAME to the history list, a line at a time. If FILENAME is NULL, then read from ~/.history. Returns 0 if successful, or errno if not. */ extern int read_history (); /* Read a range of lines from FILENAME, adding them to the history list. Start reading at the FROM'th line and end at the TO'th. If FROM is zero, start at the beginning. If TO is less than FROM, read until the end of the file. If FILENAME is NULL, then read from ~/.history. Returns 0 if successful, or errno if not. */ extern int read_history_range (); /* Append the current history to FILENAME. If FILENAME is NULL, then append the history list to ~/.history. Values returned are as in read_history (). */ extern int write_history (); /* Append NELEMENT entries to FILENAME. The entries appended are from the end of the list minus NELEMENTs up to the end of the list. */ int append_history (); /* Make the history entry at WHICH have LINE and DATA. This returns the old entry so you can dispose of the data. In the case of an invalid WHICH, a NULL pointer is returned. */ extern HIST_ENTRY *replace_history_entry (); /* Return the history entry at the current position, as determined by history_offset. If there is no entry there, return a NULL pointer. */ HIST_ENTRY *current_history (); /* Back up history_offset to the previous history entry, and return a pointer to that entry. If there is no previous entry, return a NULL pointer. */ extern HIST_ENTRY *previous_history (); /* Move history_offset forward to the next item in the input_history, and return the a pointer to that entry. If there is no next entry, return a NULL pointer. */ extern HIST_ENTRY *next_history (); /* Return a NULL terminated array of HIST_ENTRY which is the current input history. Element 0 of this list is the beginning of time. If there is no history, return NULL. */ extern HIST_ENTRY **history_list (); /* Return the history entry which is logically at OFFSET in the history array. OFFSET is relative to history_base. */ extern HIST_ENTRY *history_get (); /* Search the history for STRING, starting at history_offset. If DIRECTION < 0, then the search is through previous entries, else through subsequent. If the string is found, then current_history () is the history entry, and the value of this function is the offset in the line of that history entry that the string was found in. Otherwise, nothing is changed, and a -1 is returned. */ extern int history_search (); /* Expand the string STRING, placing the result into OUTPUT, a pointer to a string. Returns: 0) If no expansions took place (or, if the only change in the text was the de-slashifying of the history expansion character) 1) If expansions did take place -1) If there was an error in expansion. If an error ocurred in expansion, then OUTPUT contains a descriptive error message. */ extern int history_expand (); /* Return an array of tokens, much as the shell might. The tokens are parsed out of STRING. */ extern char **history_tokenize (); /* Extract a string segment consisting of the FIRST through LAST arguments present in STRING. Arguments are broken up as in the shell. */ extern char *history_arg_extract (); /* Return the number of bytes that the primary history entries are using. This just adds up the lengths of the_history->lines. */ extern int history_total_bytes (); /* Exported history variables. */ extern int history_stifled; extern int history_length; extern int max_input_history; extern char history_expansion_char; extern char history_subst_char; extern char history_comment_char; extern char *history_no_expand_chars; extern int history_base; gnuit-4.9.5/src/xtime.h0000644000175000017500000000202511146671376011701 00000000000000/* xtime.h -- Front end to & . */ /* Copyright (C) 1993-1999, 2006-2007 Free Software Foundation, Inc. This file is part of gnuit. gnuit 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 3 of the License, or (at your option) any later version. gnuit 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, see http://www.gnu.org/licenses/. */ /* Written by Tudor Hulubei and Andrei Pitis. */ #ifndef _GIT_XTIME_H #define _GIT_XTIME_H #ifdef TIME_WITH_SYS_TIME #include #include #else #ifdef HAVE_SYS_TIME_H #include #else #include #endif #endif #endif /* _GIT_XTIME_H */ gnuit-4.9.5/src/gitaction0000755000175000017500000004625511146671376012326 00000000000000#! /bin/sh ############################################################################### ### ### ### GNU Interactive Tools per file type action script ### ### Global version ### ### Copyright (C) 1994-2000, 2006-2007 Free Software Foundation, Inc. ### ### ### ### This file is part of gnuit. ### ### ### ### gnuit 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 3 of the ### ### License, or (at your option) any later version. ### ### ### ### gnuit 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, see ### ### http://www.gnu.org/licenses/. ### ### ### ### Written by Tudor Hulubei and Andrei Pitis. ### ### Enhanced by Verdoolaege Sven ### ### and Ian Beckwith. ### ### ### ############################################################################### ### ### This script executes a different action for each file type ### specified. It tries to match the second parameter against the ### patterns specified in the 'case' statement (see below). ### ### If you want to add new file types & actions to this script, just ### add a new entry to the 'case' statement *before* the last one ### ( *) ... ) ### ### For greater flexibility, gitaction's first parameter is the name ### of the directory where the file resides. The complete file name ### is obtained by appending the file base name to the file path: ### "$1/$2". ### ### If you enhance this script, please send me a patch at ### gnuit-dev@gnu.org. I'll include it in the next release. ### ### ### Instead of hardcoding `more' or `less' here, we can use GNUIT_PAGER, ### a shell environment variable that is bound on one of them, depending ### on your environment. The default is to call `more', but you can ### change GNUIT_PAGER to point to your favorite pager... ### ### ### Thanks to John Stump for suggesting me to get rid of gitmatch. ### Thanks to Juhapekka Tolvanen for the new ### mikmod-related entries. ### ### ### Note: Not all the programs called here are able to handle the -- ### command line switch. These are: ### emacs lynx elinks ar btshowmetainfo html2text lha pstotext tar w3m ### xli xloadimage zoo jar avifile-player xchm iceweasel firefox gv ### sensible-browser kfax xdvi ted unrtf dotty fbgs gm xcfview sqlite ### gm xfmedia uncompress djview djview3 javap lyx vrweb metamail ### programs with multiple implementations that we can't rely on supporting --: ### file last more ldd nroff cpio uudecode objdump tar ar uncompress ### There are some that I couldn't test. ### ### When these programs will be fixed, we should add -- to them... ### Until then, we will fail to run commands like `xfig -P -P' to ### process a file called `-P'. ### name=`basename "$0"` msg="Press ENTER to continue..." GIT_PAGER=${GIT_PAGER:-more} GNUIT_PAGER=${GNUIT_PAGER:-$GIT_PAGER} GIT_BROWSER=${GIT_BROWSER:-lynx} GNUIT_BROWSER=${GNUIT_BROWSER:-$GIT_BROWSER} export GNUIT_PAGER GNUIT_BROWSER #################### helper functions #################### cleanup() { if test -n "$tempfile" && test -f "$tempfile"; then rm -f "$tempfile" fi } doexit() { ret=$1 echo "$msg"; read key; cleanup exit $ret } exitifdone() { if test $? -eq 0; then doexit fi } whichlist() { while test $# -gt 0 do gitwhich "$1" if test $? -ne 0; then return 1 fi shift done return 0 } TRY_NORMAL=0 TRY_PAGED=1 TRY_X=2 dotry() { type=$1 cmd="$2" shift shift if whichlist "$cmd"; then case $type in $TRY_NORMAL) "$cmd" "$@" ;; $TRY_PAGED) "$cmd" "$@" 2>&1 | "$GNUIT_PAGER" ;; $TRY_X) ("$cmd" "$@" >/dev/null 2>&1 ; cleanup ) & exit $? ;; *) echo "$name: INTERNAL ERROR: unknown type ($type)" ;; esac doexit fi } try() { dotry $TRY_NORMAL "$@" } trypaged() { dotry $TRY_PAGED "$@" } tryx() { if test -n "$DISPLAY"; then dotry $TRY_X "$@" fi } trymac() { # like tryx but don't check $DISPLAY dotry $TRY_X "$@" } totempfile() { tmpfile="${TMPDIR:-/tmp}/gitaction.$$" if whichlist "$1"; then "$@" > "$tmpfile" if test $? -eq 0; then echo "$tmpfile" else rm -f "$tmpfile" fi fi } tryvideo() { for prog in gmplayer gxine xine vlc totem totem-xine mplayer; do tryx "$prog" -- "$1" done tryx xfmedia "$1" tryx xanim "$1" tryx aktion "$1" try mplayer -vo svga -- "$1" try vlc -I rc -V caca -- "$1" try aaxine -- "$1" } tryaudio() { for prog in audacious xmms rhythmbox bmp-play-files-2.0 \ bmp-play-files esdplay herrie kwave; do tryx "$prog" -- "$1" done tryx x11amp -- "$1" tryx bmpx -f -- "$1" tryx bmp2 -f -- "$1" tryx bmp -f -- "$1" tryx noatun --nofork -- "$1" try alsaplayer -- "$1" try play -- "$1" try amp "$1" } trybrowse() { if test "$GNUIT_BROWSER"; then try "$GNUIT_BROWSER" "$1" fi try lynx "$1" try w3m "$1" try elinks "$1" tryx firefox "$1" tryx iceweasel "$1" tryx seamonkey "$1" tryx iceape -- "$1" tryx galeon -- "$1" tryx kfmclient openURL -- "$1" tryx konqueror -- "$1" try sensible-browser "$1" try safari "$1" } trypgp() { try pgp -- "$1" try pgp5 -- "$1" try pgp5i -- "$1" try gpgv -- "$1" } tryoffice() { tryx openoffice -- "$1" tryx soffice -- "$1" tryx abiword -- "$1" tryx AbiWord -- "$1" tryx kword -- "$1" } #################### Main logic #################### if test "$#" -ne 2; then echo "$name: GIT internal script" >&2 doexit 1 fi if test ! -d "$1"; then echo "$name: $1 is not a directory" doexit 1 fi if test ! -f "$1/$2"; then echo "$name: file $1/$2 does not exist" doexit 1 fi if test -f .gitaction; then ./.gitaction "$1" "$2" exitifdone fi if test -f $HOME/.gitaction; then $HOME/.gitaction "$1" "$2" exitifdone fi file="$1/$2" istext=0 if whichlist file; then file "$file" |grep -q '.*:.*text' if test $? -eq 0; then istext=1 fi fi lcfile="$(echo "$file"|tr [:upper:] [:lower:])" # Handle listing compressed archives first, to avoid decompressing # them to disk just to list them case "$lcfile" in *.tar.gz|*.pkg|*.t[arg]z) if whichlist gunzip tar; then gunzip -c -- "$file" | tar tvf - | "$GNUIT_PAGER" doexit fi ;; *.tar.bz2|*.tbz) if whichlist bunzip2 tar; then bunzip2 -c -- "$file" | tar tvf - | "$GNUIT_PAGER" doexit fi ;; *.cpio.gz) if whichlist gunzip cpio; then gunzip -c -- "$file" | cpio -t 2>&1 | "$GNUIT_PAGER" doexit fi ;; *.cpio.bz2) if whichlist bunzip2 cpio; then bunzip2 -c -- "$file" | cpio -t 2>&1 | "$GNUIT_PAGER" doexit fi ;; esac lcbase="$(echo $lcfile |sed -e 's/\(.*\)\..*/\1/')" tempfile="" case "$lcfile" in *.gz) tempfile="$(totempfile gunzip -c -- "$file")" ;; *.bz) tempfile="$(totempfile bunzip -c "$file")" ;; *.bz2) tempfile="$(totempfile bzcat -- "$file")" ;; *.z) tempfile="$(totempfile uncompress -c "$file")" ;; *.uu|*.uue) tempfile="$(totempfile uudecode -o /dev/stdout "$file")" ;; esac if test -n "$tempfile"; then file="$tempfile" lcfile="$lcbase" fi # don't run open(1) on text files if test $istext -eq 0 ; then if test `uname -s` = "Darwin"; then # Macos: don't run open(1) on archives, it uncompresses them case "$lcfile" in *.7z|*.arj|*.cpio|*.rar|*.tar|*.zip|*.zoo) ;; *) dotry $TRY_X open "$file" ;; esac elif whichlist xdg-open; then tryx xdg-open "$file" elif [ -n "$GNOME_DESKTOP_SESSION_ID" ]; then tryx gnome-open "$file" elif [ "$KDE_FULL_SESSION" = true ]; then tryx kfmclient exec "$file" elif whichlist xprop; then # xfce if xprop -root _DT_SAVE_MODE | grep ' = \"xfce4\"$' >/dev/null 2>&1; then tryx exo-open "$file" fi fi fi case "$lcfile" in *.info) try info --file -- "$file" ;; *.aiff|*.aifc) tryaudio "$file" ;; *.a|*.sa) trypaged ar -tv "$file" ;; *.cpio) trypaged cpio -t -F "$file" ;; *.db) trypaged db_dump -- "$file" ;; *.dia) tryx dia -- "$file" ;; *.dot) tryx dotty "$file" ;; *.dxf) tryx qcad -- "$file" ;; *.fig) tryx xfig "$file" ;; *.gl) tryx xgrasp "$file" ;; *.gnumeric) tryx gnumeric -- "$file" ;; *.jar) trypaged jar tvf "$file" ;; *.lha|*.lzh) trypaged lha -v "$file" ;; *.mgp) tryx mgp -S -- "$file" ;; *.mov) tryvideo "$file" ;; *.ms) trypaged nroff -ms "$file" ;; *.oleo) try oleo -- "$file" ;; *.po) tryx kbabel -- "$file" ;; *.pod) trypaged pod2text -- "$file" ;; *.rpm) trypaged rpm -qilRsp -- "$file" ;; *.sqlite) trypaged sqlite "$file" .dump ;; *.tar|*.cbt) trypaged tar tvf "$file" ;; *.torrent) trypaged btshowmetainfo "$file" ;; *.wma | *.gsm) tryaudio "$file" ;; *.wrl) tryx vrweb "$file" ;; *.zoo) trypaged zoo -list "$file" ;; inbox|outbox) try xemacs -- "$file" ;; *.voc) (vplay "$file" > /dev/null 2>&1 ; cleanup ) & exit 0 ;; *.au) (cat "$file" > /dev/audio 2> /dev/null ; cleanup ) & exit 0 ;; *.class) trypaged javap -c -s -l -verbose "$(basename "$file" .class)" ;; *.rar|*.cbr) trypaged unrar l -- "$file" trypaged rar l -- "$file" ;; *.url) url="$(grep '^URL=' "$file" |tr -d '\015'|sed -e 's/^URL=//')" if test -n "$url"; then trybrowse "$url" fi ;; *.html|*.htm) trybrowse "$file" trypaged html2text "$file" ;; *.pdf) tryx evince -- "$file" tryx epdfview -- "$file" tryx gv "$file" tryx kpdf -- "$file" tryx acroread "$file" tryx xpdf -- "$file" trypaged pstotext "$file" ;; *.ps | *.eps) tryx evince -- "$file" tryx gv "$file" tryx kghostview -- "$file" tryx ggv -- "$file" tryx ghostview "$file" tryx karbon -- "$file" try fbgs "$file" try gs -- "$file" trypaged pstotext "$file" ;; *.dvi) tryx evince -- "$file" tryx kdvi -- "$file" tryx xdvi "$file" ;; *.dbf) tryoffice "$file" trypaged dbview -- "$file" ;; *.123 | *.602 | *.doc |\ *.wri | *.ot | *.mml | *.ppt |\ *.wb2 | *.wp | *.wps | *.xls |\ *.xl[sct] | *.wp[5ds] | *.doc[mx] |\ *.dot[mx] | *.od[bcfgmpst] | *.ot[ghpst] |\ *.pot[mx] | *.pps[mx] | *.ppt[mx] |\ *.sd[abcdfsw] | *.sg[lk] | *.st[cdiw] |\ *.sx[cdgimw] | *.xls[mx] |\ *.xlt[mx]) tryoffice "$file" ;; *.rtf) tryoffice "$file" tryx Ted "$file" trypaged unrtf --text "$file" ;; *.lyx) tryx klyx "$file" tryx lyx "$file" ;; *.gif | *.jpg | *.jpeg |\ *.tga | *.bmp | *.ppm |\ *.pnm | *.pgm | *.pbm |\ *.tif | *.tiff | *.bm |\ *.xbm | *.xpm | *.ras |\ *.rgb | *.png | *.fts |\ *.pam | *.ico) for prog in xzgv kview display gimv feh krita qiv gpe-gallery; do tryx "$prog" -- "$file" done tryx xli "$file" tryx xloadimage "$file" tryx gimp -- "$file" tryx xv "$file" tryx gm display "$file" try zgv -- "$file" try fbi "$file" tryx ee "$file" try cacaview -- "$file" ;; *.mp[23]) tryaudio "$file" tryx mp3blaster -- "$file" try mpg123 -v -- "$file" try mpg321 -v -- "$file" ;; *.ogg) tryaudio "$file" try ogg123 -v -- "$file" ;; *.flac) tryaudio "$file" try flac123 -- "$file" ;; *.asx | *.m3u |\ *.pls) tryaudio "$file" try mplayer -playlist -- "$file" ;; *.r[avm]|*.ram) tryx realplay -- "$file" tryx rvplayer "$file" tryx raplayer "$file" tryvideo "$file" ;; *.wav) for prog in audacious xmms kwave; do tryx "$prog" -- "$file" done try wavplay -- "$file" try play -- "$file" ;; *.rmd) if whichlist rmdtopvf pvftobasic; then (rmdtopvf -8 "$file" 2> /dev/null | pvftobasic > /dev/audio 2> /dev/null ; cleanup ) & exit 0 fi;; *.pvf) if whichlist pvftobasic; then (pvftobasic > /dev/audio 2> /dev/null ; cleaup ) & exit 0 fi;; *.midi |*.mid) tryx timidity -ia -- "$file" try timidity -id -- "$file" ;; *.sf2 | *.sfx | *.sbk) tryx swami -- "$file" ;; *.mod | *.mod.lha | *.mod.lzh | *.mod.zip |\ *.nst | *.nst.lha | *.nst.lzh | *.nst.zip |\ *.stx | *.stx.lha | *.stx.lzh | *.stx.zip |\ *.ptm | *.ptm.lha | *.ptm.lzh | *.ptm.zip |\ *.okt | *.okt.lha | *.okt.lzh | *.okt.zip |\ *.wow | *.wow.lha | *.wow.lzh | *.wow.zip |\ *.mdl | *.mdl.lha | *.mdl.lzh | *.mdl.zip |\ *.alm | *.alm.lha | *.alm.lzh | *.alm.zip |\ *.669 | *.669.lha | *.669.lzh | *.669.zip |\ *.dsm | *.dsm.lha | *.dsm.lzh | *.dsm.zip |\ *.far | *.far.lha | *.far.lzh | *.far.zip |\ *.med | *.med.lha | *.med.lzh | *.med.zip |\ *.mtm | *.mtm.lha | *.mtm.lzh | *.mtm.zip |\ *.ult | *.ult.lha | *.ult.lzh | *.ult.zip |\ *.it | *.it.lha | *.it.lzh | *.it.zip |\ *.xm | *.xm.lha | *.xm.lzh | *.xm.zip |\ *.s[3t]m | *.s[3t]m.lha| *.s[3t]m.lzh| *.s[3t]m.zip) tryx soundtracker -- "$file" try mikmod -t -- "$file" try xmp -- "$file" ;; *.zip|*.cbz) trypaged unzip -l -- "$file" ;; *.asf | *.wm[vf] |\ *.avi) tryvideo "$file" tryx aviplay "$file" ;; *.mp[4g]|*.mpeg) tryvideo "$file" tryx gtv -- "$file" tryx plaympeg -- "$file" try mpeg_vga "$file" ;; *.djvu) tryx djview4 -- "$file" tryx djview3 "$file" tryx djview "$file" ;; *.chm) tryx gnochm -- "$file" tryx kchmviewer -- "$file" tryx chmsee -- "$file" tryx xchm "$file" ;; utmp) trypaged w ;; wtmp | wtmp.[0-9]*) trypaged last -f "$file" ;; *.afm | *.bdf | *.cff | *.cid |\ *.mmm | *.ocf | *.ofm | *.otf |\ *.pcf | *.pfa | *.pfb | *.pfm |\ *.ttf | *.font) tryx gfontview -- "$file" ;; *.xcf | *.fit) tryx gimp -- "$file" tryx xcfview "$file" ;; *.fl[icv]) tryvideo "$file" try flip "$file" ;; *.swf) tryx swfdec-player -- "$file" tryx gnash -- "$file" tryx swfplayer -- "$file" tryx firefox "$file" tryx iceweasel "$file" try safari "$file" ;; *.svg) tryx gthumb -- "$file" tryx svgdisplay -- "$file" tryx display -- "$file" tryx gm display "$file" tryx firefox "$file" tryx iceweasel "$file" tryx inkscape -- "$file" tryx sodipodi -- "$file" tryx gimp -- "$file" ;; *.g3) tryx kfax "$file" tryx viewfax -- "$file" tryx xli "$file" try cacaview -- "$file" ;; *.so | *.so.[0-9]* |\ *.o | *.lo) trypaged objdump --syms --all-headers -- "$file" ;; [sr]mail) try emacs "$file" try xemacs -- "$file" ;; *.arj |\ *.a[0-9][1-9]) trypaged unarj l -- "$file" ;; *.7z) trypaged 7z l -- "$file" trypaged 7za l -- "$file" ;; *.deb) if whichlist dpkg; then (echo "$file"; dpkg --info -- "$file"; echo; dpkg --contents -- "$file") | "$GNUIT_PAGER" doexit fi;; *.tnef) tryx ktnef -- "$file" trypaged tnef -t -f -- "$file" ;; *ring.gpg) try gpg --list-keys --no-default-keyring --keyring "$file" try gpgv -- "$file" ;; *gpg) try gpg --verify -- "$file" try gpgv -- "$file" ;; *ring.pgp) trypaged pgpk -- "$file" trypaged pgp -kv -- "$file" trypgp "$file" ;; *pgp) try pgpv -- "$file" trypgp "$file" ;; *.[1-9n] | *.[1-9n][xm] | *.[1357]ssl | *.[137]posix |\ *.[1-9]fun | *.[1-9n]freebsd | *.1emacs[0-9][0-9] |\ *.1[aelmpqx] | *.3[ow] | *.5[ag] | *.8[aclp] |\ *.[78]cdebconf | *.[158]cn | *.[35]el | *.[135]gv |\ *.[135]nas | *.[13]pvm | *.[35]snmp | *.[1357]wn | \ *.[37]tcl | *.[1-9]x | *.1gmt | *.1grass | *.1olvwm | \ *.1sr | *.1viewos | *.3abz | *.3alleg | *.3aolserver |\ *.3ber | *.3blt | *.3bobcat | *.3caca | *.3curses |\ *.3debug | *.3diet | *.3el | *.3erl | *.3f90 |\ *.3form | *.3gdbm | *.3gle | *.3itcl | *.3itk |\ *.3iv | *.3iwidget | *.3iwidgets | *.3kaya |\ *.3m17n | *.3menu | *.3ncp | *.3ncurses | *.3ossp |\ *.3perl | *.3plplot | *.3pm | *.3pub | *.3qt |\ *.3readline | *.3ruby | *.3tclx | *.3tiff | *.3tix |\ *.3tk | *.3trf | *.3xp | *.5el | *.5heimdal | *.7cdebconf |\ *.7g | *.7wn | *.8cdebconf | *.8mailutils | *.8postfix |\ *.8tp | *.man) trypaged nroff -man "$file" ;; esac if test -x "$file"; then if test `uname` = "Linux"; then FILE_OPTIONS="-L" fi file $FILE_OPTIONS "$file" | grep "ELF" > /dev/null 2>&1 if test $? -eq 0; then file $FILE_OPTIONS "$file" ldd "$file" doexit fi fi FILEOUT="$(file --mime "$file" 2>/dev/null)" if test $? -eq 0; then MIMETYPE="$(echo "$FILEOUT" | sed 's/.*: *\([-a-zA-Z0-9/]*\).*/\1/;')" fi if test -n "$MIMETYPE" && \ test "$MIMETYPE" != "application/octet-stream" && \ test $istext -ne 1; then try see -- "${MIMETYPE}:${file}" try metamail -d -b -c "$MIMETYPE" "$file" fi try "$GNUIT_PAGER" "$file" try less -- "$file" try more "$file" try cat "$file" cleanup exit 1 gnuit-4.9.5/src/configure.c0000644000175000017500000000774511146671376012545 00000000000000/* configure.c -- Configuration files management functions. */ /* Copyright (C) 1993-2000, 2006-2007 Free Software Foundation, Inc. This file is part of gnuit. gnuit 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 3 of the License, or (at your option) any later version. gnuit 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, see http://www.gnu.org/licenses/. */ /* Written by Tudor Hulubei and Andrei Pitis. */ #ifdef HAVE_CONFIG_H #include #endif #ifdef HAVE_STDLIB_H #include #else /* !HAVE_STDLIB_H */ #include "ansi_stdlib.h" #endif /* !HAVE_STDLIB_H */ #include #include #include #include "file.h" #include #ifdef HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ #include "xstring.h" #include "tty.h" #include "configure.h" #include "misc.h" static FILE *fileptr; static int sectionptr; static char line[MAXLINE]; int configuration_init(file_name) char *file_name; { if (file_name == NULL) return 0; fileptr = fopen(file_name, "r"); if (fileptr == NULL) return 0; sectionptr = -1; return 1; } void configuration_end() { if (fileptr) fclose(fileptr); } static int configuration_getline() { int c; size_t len; char *comment; /* loop until we get a line that isn't a comment */ for(;;) { comment=NULL; if (fgets(line, MAXLINE, fileptr) == NULL) return 0; if ((len = strlen(line)) == MAXLINE - 1) { fprintf(stderr, "%s: configuration: line too long. Truncated.\n", g_program); /* Search the end of this big line. */ for (;;) { c = fgetc(fileptr); if (c == '\n' || c == EOF) break; } } if ((comment = strchr(line, ICS))) { char *ptr; int isws=1; *comment = 0; /* handle lines with whitespace before comment */ for(ptr=line;*ptr;ptr++) { if(!isspace((int)*ptr)) { isws=0; break; } } if(isws) comment=line; /* make whitespace part of comment */ } else if (line[len - 1] == '\n') line[len - 1] = 0; if(comment != line) return 1; } } int configuration_section(section_name) char *section_name; { fseek(fileptr, 0, SEEK_SET); while (configuration_getline()) if (strcmp(section_name, line) == 0) return sectionptr = ftell(fileptr); return sectionptr = -1; } void configuration_getvarinfo(var_name, dest, fields, seek) char *var_name, **dest; int fields, seek; { int fld; char buf[MAXLINE], *ptr, *tmp; if (seek) fseek(fileptr, sectionptr, SEEK_SET); if (fields == 1) *dest = 0; else memset((char *)dest, 0, fields * sizeof(char *)); while (configuration_getline() && *line) { *buf = 0; sscanf(line, "%s", buf); if (seek == NO_SEEK) buf[32] = 0; /* Just in case... */ if (!isprint((int)*buf)) return; if (seek == NO_SEEK || strcmp(var_name, buf) == 0) { if ((ptr = strchr(line, IAS)) && *++ptr) { for (dest[0] = ptr, fld = 1; *ptr && fld < fields; ptr++) if (*ptr == IFS) { *ptr = 0; if (*(ptr + 1) && *(ptr + 1) != IFS) dest[fld] = ptr + 1; fld++; } if ((ptr = strchr(ptr, IFS))) *ptr = 0; } for (fld = 0; fld < fields; fld++) if (dest[fld]) { while (isspace((int)*dest[fld])) dest[fld]++; tmp = dest[fld] + strlen(dest[fld]) - 1; while (isspace((int)*tmp) && tmp >= dest[fld]) tmp--; *(tmp + 1) = 0; if (dest[fld][0] == 0) dest[fld] = NULL; } if (seek == NO_SEEK) strcpy(var_name, buf); return; } } if (seek == NO_SEEK) *var_name = 0; } gnuit-4.9.5/src/gitmount0000755000175000017500000000764611146671376012214 00000000000000#! /bin/sh ############################################################################### ### ### ### GNU Interactive Tools auto-mount script ### ### Copyright (C) 1994-2000, 2006-2007 Free Software Foundation, Inc. ### ### ### ### This file is part of gnuit. ### ### ### ### gnuit 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 3 of the ### ### License, or (at your option) any later version. ### ### ### ### gnuit 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, see ### ### http://www.gnu.org/licenses/. ### ### ### ### Written by Tudor Hulubei and Andrei Pitis. ### ### ### ############################################################################### ### ### The ideea of this script is quite general but the script needs ### some changes in order to run on other UNIX systems. ### The major change is in the file system types list. ### ### If you enhance this script, please send me a patch at ### gnuit-dev@gnu.org and I'll include it in the next release. ### exit_code=0 name=`basename "$0"` mp="/mnt" if test "$#" -lt 1; then echo "usage: $name devices... (ex: gitmount fd0)" exit 1 fi while true; do device="$1" # Remove the `/dev/' prefix, if present. if test `echo "$device" | cut -c1-5` = "/dev/"; then device=`echo "$device" | cut -c6-` fi device_alias="$device" # Handle aliases: RedHat uses /mnt/floppy as a mount point. if test "/dev/$device" = "/dev/floppy"; then device="fd0" fi if test ! -b /dev/"$device"; then echo "$0: /dev/$device: no such device" >&2 exit_code=1 else success=1 if test ! -d "$mp/$device_alias"; then gitmkdirs "$mp/$device_alias" if test $? -ne 0; then success=0 exit_code=1 fi fi if test $success -eq 1; then success=0 for fstype in ext3 ext2 iso9660 reiserfs xfs vfat msdos\ ntfs minix ext xiafs jfs hpfs xenix sysv\ coherent ufs umsdos affs; do mount -t "$fstype" "/dev/$device" "$mp/$device_alias"\ > /dev/null 2>&1 if test $? = 0; then success=1 break fi done # No luck so far. Try without specifying the fs type. if test $success -eq 1; then echo "$device_alias: $fstype" else mount "/dev/$device" "$mp/$device_alias" > /dev/null 2>&1 if test $? = 0; then echo "$device_alias: default" else # As a last resort try without specifying the fs # type and mounting directory. Hopefully this # will allow regular users to mount cdroms, # floppies, and zip drives under Linux. mount /dev/"$device" > /dev/null 2>&1 if test $? = 0; then echo "$device_alias: default" else echo "$device_alias: could not mount file system" >&2 exit_code=1 fi fi fi fi fi shift if test $# -eq 0; then exit $exit_code fi done gnuit-4.9.5/src/gitview.c0000644000175000017500000005070511146671376012234 00000000000000/* gitview.c -- A hex/ascii file viewer. */ /* Copyright (C) 1993-2000, 2006-2007 Free Software Foundation, Inc. This file is part of gnuit. gnuit 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 3 of the License, or (at your option) any later version. gnuit 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, see http://www.gnu.org/licenses/. */ /* Written by Tudor Hulubei and Andrei Pitis. */ /* Patched by Gregory Gerard to display on the entire screen. */ #ifdef HAVE_CONFIG_H #include #endif #include #ifdef HAVE_STDLIB_H #include #else /* !HAVE_STDLIB_H */ #include "ansi_stdlib.h" #endif /* !HAVE_STDLIB_H */ #include #ifdef HAVE_STDDEF_H #include #endif #ifdef HAVE_LOCALE_H #include #endif #include #include "file.h" #include #include #ifdef HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ #include #include "stdc.h" #include "xstring.h" #include "xmalloc.h" #include "getopt.h" #include "xio.h" #include "window.h" #include "signals.h" #include "configure.h" #include "tty.h" #include "misc.h" #include "tilde.h" #define MAX_KEYS 2048 #define BUILTIN_OPERATIONS 11 #define BUILTIN_previous_line -1 #define BUILTIN_next_line -2 #define BUILTIN_scroll_down -3 #define BUILTIN_scroll_up -4 #define BUILTIN_beginning_of_file -5 #define BUILTIN_end_of_file -6 #define BUILTIN_refresh -7 #define BUILTIN_exit -8 #define BUILTIN_hard_refresh -9 #define BUILTIN_backspace -10 #define BUILTIN_action -11 #define MAX_BUILTIN_NAME 20 char built_in[BUILTIN_OPERATIONS][MAX_BUILTIN_NAME] = { "previous-line", "next-line", "scroll-down", "scroll-up", "beginning-of-file", "end-of-file", "refresh", "exit", "hard-refresh", "backspace", "action", }; #define VIEWER_FIELDS 12 static char *ViewerFields[VIEWER_FIELDS] = { "TitleForeground", "TitleBackground", "TitleBrightness", "HeaderForeground", "HeaderBackground", "HeaderBrightness", "ScreenForeground", "ScreenBackground", "ScreenBrightness", "StatusForeground", "StatusBackground", "StatusBrightness" }; #ifdef HAVE_LINUX static int ViewerColors[VIEWER_FIELDS] = { CYAN, BLUE, ON, CYAN, RED, ON, BLACK, CYAN, OFF, CYAN, BLUE, ON }; #else /* !HAVE_LINUX */ static int ViewerColors[VIEWER_FIELDS] = { BLACK, WHITE, OFF, WHITE, BLACK, ON, WHITE, BLACK, OFF, BLACK, WHITE, OFF }; #endif /* !HAVE_LINUX */ #define TitleForeground ViewerColors[0] #define TitleBackground ViewerColors[1] #define TitleBrightness ViewerColors[2] #define HeaderForeground ViewerColors[3] #define HeaderBackground ViewerColors[4] #define HeaderBrightness ViewerColors[5] #define ScreenForeground ViewerColors[6] #define ScreenBackground ViewerColors[7] #define ScreenBrightness ViewerColors[8] #define StatusForeground ViewerColors[9] #define StatusBackground ViewerColors[10] #define StatusBrightness ViewerColors[11] #ifdef HAVE_LINUX extern int LinuxConsole; #endif /* HAVE_LINUX */ #ifdef HAVE_LINUX int AnsiColors = ON; #else /* !HAVE_LINUX */ int AnsiColors = OFF; #endif /* !HAVE_LINUX */ #define VIEW_LINES (tty_lines - 9) #define SEEK_LINE (tty_lines - 5) #ifdef STAT_MACROS_BROKEN #ifdef S_IFREG #undef S_IFREG #endif #ifdef S_IFBLK #undef S_IFBLK #endif #endif /* STAT_MACROS_BROKEN */ #ifndef S_IFREG #define S_IFREG 0100000 #endif #ifndef S_IFBLK #define S_IFBLK 0060000 #endif #ifndef S_ISREG #define S_ISREG(m) (((m) & S_IFMT) == S_IFREG) #endif #ifndef S_ISBLK #define S_ISBLK(m) (((m) & S_IFMT) == S_IFBLK) #endif /* Finally ... :-( */ char *g_home; char *g_program; /* for gnulib lib/error.c */ char *program_name; char *screen; char *filename; int count; off64_t g_size; char g_offset[16]; char *header_text; int UseLastScreenChar; char *global_buf; char color_section[] = "[GITVIEW-Color]"; char monochrome_section[] = "[GITVIEW-Monochrome]"; int fd, regular_file; long long g_current_line, g_lines; window_t *title_window, *header_window, *file_window, *status_window; static char *title_text; static char *g_help; static char info_txt[] = " Offset 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F \ Ascii "; static char line_txt[] = "---------------------------------------------------------------------\ ----------- "; static char seek_txt[] = " Seek at: "; off64_t file_length() { off64_t current, length; if (!regular_file) return 0x7FFFFFFF; current = lseek64(fd, 0, SEEK_CUR); length = lseek64(fd, 0, SEEK_END); lseek64(fd, current, SEEK_SET); return length; } void cursor_update() { if (tty_lines >= 9) window_goto(file_window, SEEK_LINE, strlen(seek_txt) + count); else window_goto(file_window, tty_lines - 1, tty_columns - 1); } void set_title() { memset(global_buf, ' ', tty_columns); memcpy(global_buf, title_text, min(tty_columns, (int)strlen(title_text))); tty_colors(TitleBrightness, TitleForeground, TitleBackground); window_goto(title_window, 0, 0); window_puts(title_window, global_buf, tty_columns); } void set_header() { memset(global_buf, ' ', tty_columns); memcpy(global_buf, header_text, min(tty_columns, (int)strlen(header_text))); tty_colors(HeaderBrightness, HeaderForeground, HeaderBackground); window_goto(header_window, 0, 0); window_puts(header_window, global_buf, tty_columns); } void set_status() { memset(global_buf, ' ', tty_columns); memcpy(global_buf, g_help, min(tty_columns, (int)strlen(g_help))); tty_colors(StatusBrightness, StatusForeground, StatusBackground); window_goto(status_window, 0, 0); window_puts(status_window, global_buf, tty_columns); } void report_undefined_key() { char *prev = tty_get_previous_key_seq(); size_t length = strlen(prev); if (length && (prev[length - 1] != key_INTERRUPT)) { char *str = (char *)tty_key_machine2human(tty_get_previous_key_seq()); char *buf = xmalloc(128 + strlen(str)); sprintf(buf, "%s: not defined.", str); memset(global_buf, ' ', tty_columns); memcpy(global_buf, buf, min(tty_columns, (int)strlen(buf))); xfree(buf); tty_colors(ON, WHITE, RED); window_goto(status_window, 0, 0); window_puts(status_window, global_buf, tty_columns); tty_beep(); tty_update(); sleep(1); } else tty_beep(); set_status(); cursor_update(); tty_update(); } char char_to_print(c, index, total) char c; int index; int total; { if (index < total) return isprint((int)c) ? c : '.'; return ' '; } void update_line(line) long long line; { ssize_t r; unsigned char buf[16]; char *line_string = xmalloc(max(tty_columns, 80 + 1)); memset(line_string, ' ', tty_columns); memset(buf, '\0', sizeof(buf)); lseek64(fd, (off64_t)line * sizeof(buf), SEEK_SET); if ((r = read(fd, buf, sizeof(buf)))) { sprintf(line_string, "%011X0 %02X %02X %02X %02X %02X %02X %02X\ %02X %02X %02X %02X %02X %02X %02X %02X %02X \ %c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c ", (unsigned int)(line & 0xFFFFFFFF), buf[0], buf[1], buf[2], buf[3], buf[4], buf[5], buf[6], buf[7], buf[8], buf[9], buf[10], buf[11], buf[12], buf[13], buf[14], buf[15], char_to_print(buf[0], 0, r), char_to_print(buf[1], 1, r), char_to_print(buf[2], 2, r), char_to_print(buf[3], 3, r), char_to_print(buf[4], 4, r), char_to_print(buf[5], 5, r), char_to_print(buf[6], 6, r), char_to_print(buf[7], 7, r), char_to_print(buf[8], 8, r), char_to_print(buf[9], 9, r), char_to_print(buf[10], 10, r), char_to_print(buf[11], 11, r), char_to_print(buf[12], 12, r), char_to_print(buf[13], 13, r), char_to_print(buf[14], 14, r), char_to_print(buf[15], 15, r)); } else { r = 0; *line_string = '\0'; } if (r < 8) memset(line_string + 12 + r * 3, ' ', (16 - r) * 3 + 1); else if (r >= 8 && r < 16) memset(line_string + 12 + r * 3 + 1, ' ', (16 - r) * 3); line_string[strlen(line_string)] = ' '; window_puts(file_window, line_string, tty_columns); xfree(line_string); } void update_all() { long long i; tty_colors(ScreenBrightness, ScreenForeground, ScreenBackground); for (i = g_current_line; i < g_current_line + VIEW_LINES; i++) { window_goto(file_window, 3 + i - g_current_line, 0); update_line(i); } } void clean_up() { tty_end(NULL); } void fatal(postmsg) char *postmsg; { clean_up(); fprintf(stderr, "%s: fatal error: %s.\n", g_program, postmsg); exit(1); } int read_keys(keys) int keys; { char *contents; char key_seq[80]; int i, j, need_conversion; for (i = keys; i < MAX_KEYS; i++) { configuration_getvarinfo(key_seq, &contents, 1, NO_SEEK); if (*key_seq == 0) break; if (*key_seq != '^') { char *key_seq_ptr = tty_get_symbol_key_seq(key_seq); if (key_seq_ptr) { /* Ignore empty/invalid key sequences. */ if (*key_seq_ptr == '\0') continue; /* We got the key sequence in the correct form, as returned by tgetstr, so there is no need for further conversion. */ strcpy(key_seq, key_seq_ptr); need_conversion = 0; } else { /* This is not a TERMCAP symbol, it is a key sequence that we will have to convert it with tty_key_human2machine() into a machine usable form before using it. */ need_conversion = 1; } } else need_conversion = 1; if (contents == NULL) continue; for (j = 0; j < BUILTIN_OPERATIONS; j++) if (strcmp(contents, built_in[j]) == 0) break; if (j < BUILTIN_OPERATIONS) { if (!need_conversion || tty_key_human2machine((unsigned char *)key_seq)) tty_key_list_insert((unsigned char *)key_seq, built_in[-j-1]); } else fprintf(stderr, "%s: invalid built-in operation: %s.\n", g_program, contents); } return i; } void resize(resize_required) int resize_required; { int display_status = OFF; int display_header = OFF; int display_file = OFF; int old_tty_lines = tty_lines; int old_tty_columns = tty_columns; tty_resize(); /* Don't resize, unless absolutely necessary. */ if (!resize_required) if (tty_lines == old_tty_lines && tty_columns == old_tty_columns) return; #ifdef HAVE_LINUX if (LinuxConsole) screen = xrealloc(screen, 4 + tty_columns * tty_lines * 2); #endif /* HAVE_LINUX */ /* Watch out for special cases (tty_lines < 7) because some * components will no longer fit. * * The title needs one line. The panels need four. There is one * more line for the input line and one for the status. * * Cases (lines available): * 1 line: title * 2 lines: title + status * 3 lines: title + header + status * >= 4 lines: everything * * FIXME: we need to handle the tty_columns case. */ global_buf = xrealloc(global_buf, tty_columns + 1); header_text = xrealloc(header_text, strlen(filename) + 10); window_resize(title_window, 0, 0, 1, tty_columns); if (tty_lines >= 2) display_status = ON; if (tty_lines >= 3) display_header = ON; if (tty_lines >= 4) display_file = ON; window_resize(status_window, 0, tty_lines - 1, display_status ? 1 : 0, tty_columns); window_resize(header_window, 0, 1, display_header ? 1 : 0, tty_columns); window_resize(file_window, 0, 2, display_file ? (tty_lines - 2) : 0, tty_columns); } /* * Resize (if necessary) and then refresh all gitview's components. */ void refresh(signum) int signum; { resize(0); if (signum == SIGCONT) { /* We were suspended. Switch back to noncanonical mode. */ tty_set_mode(TTY_NONCANONIC); tty_defaults(); } tty_colors(ScreenBrightness, ScreenForeground, ScreenBackground); tty_fill(); g_size = file_length(); g_lines = g_size / 16 + (g_size % 16 ? 1 : 0); if (tty_lines >= 5) { window_goto(file_window, 1, 0); window_puts(file_window, info_txt, sizeof(info_txt) - 1); } if (tty_lines >= 6) { window_goto(file_window, 2, 0); window_puts(file_window, line_txt, sizeof(line_txt) - 1); } if (tty_lines >= 9) { if (VIEW_LINES == 0) g_current_line = 0; else g_current_line = min(g_current_line, (g_lines / VIEW_LINES) * VIEW_LINES); window_goto(file_window, SEEK_LINE, 0); window_puts(file_window, seek_txt, sizeof(seek_txt) - 1); window_goto(file_window, SEEK_LINE, sizeof(seek_txt) - 1); window_puts(file_window, g_offset, count); } else g_current_line = 0; set_title(); set_status(); set_header(); update_all(); if (tty_lines >= 9) window_goto(file_window, SEEK_LINE, sizeof(seek_txt) - 1 + count); else window_goto(file_window, tty_lines - 1, tty_columns - 1); tty_update(); if (signum == SIGCONT) tty_update_title(header_text); } void hide() { tty_set_mode(TTY_CANONIC); tty_defaults(); tty_put_screen(screen); } void clock_refresh() { } void usage() { printf("usage: %s [-hvicbl] file\n", g_program); printf(" -h print this help message\n"); printf(" -v print the version number\n"); printf(" -c use ANSI colors\n"); printf(" -b don't use ANSI colors\n"); printf(" -l don't use the last screen character\n"); } int main(argc, argv) int argc; char *argv[]; { int key = 0; struct stat s; tty_key_t *ks; int keys, repeat_count, need_update; int c, ansi_colors = -1, use_last_screen_character = ON; #ifdef HAVE_SETLOCALE setlocale(LC_ALL,""); #endif /* Make sure we don't get signals before we are ready to handle them. */ signals_init(); program_name = g_program = argv[0]; g_home = getenv("HOME"); if (g_home == NULL) g_home = "."; compute_directories(); get_login_name(); if (getenv("COLORTERM") != NULL) ansi_colors = ON; /* Parse the command line. */ while ((c = getopt(argc, argv, "hvcblp")) != -1) switch (c) { case 'h': /* Help request. */ usage(); return 0; case 'v': /* Version number request. */ printf("%s %s\n", PRODUCT, VERSION); return 0; case 'c': /* Force git to use ANSI color sequences. */ ansi_colors = ON; break; case 'b': /* Prevent git from using ANSI color sequences. */ ansi_colors = OFF; break; case 'l': /* Prevent git from using the last character on the screen. */ use_last_screen_character = OFF; break; case '?': return 1; default: fprintf(stderr, "%s: unknown error\n", g_program); return 1; } if (optind < argc) filename = xstrdup(argv[optind++]); else { usage(); return 1; } if (optind < argc) fprintf(stderr, "%s: warning: invalid extra options ignored\n", g_program); title_text = xmalloc(strlen(PRODUCT) + strlen(VERSION) + 64); sprintf(title_text, " %s %s - Hex/Ascii File Viewer", PRODUCT, VERSION); tty_init(TTY_RESTRICTED_INPUT); xstat(filename, &s); /* if (!(S_ISREG(s.st_mode) || S_ISBLK(s.st_mode))) { fprintf(stderr, "%s: %s is neither regular file nor block device.\n", g_program, filename); return 1; } */ fd = open64(filename, O_RDONLY | O_BINARY); if (fd == -1) { fprintf(stderr, "%s: cannot open file %s.\n", g_program, filename); return 1; } regular_file = S_ISREG(s.st_mode); common_configuration_init(); use_section("[GITVIEW-Keys]"); keys = read_keys(0); configuration_end(); specific_configuration_init(); use_section("[Setup]"); if (ansi_colors == -1) AnsiColors = get_flag_var("AnsiColors", OFF); else AnsiColors = ansi_colors; if (use_last_screen_character) UseLastScreenChar = get_flag_var("UseLastScreenChar", OFF); else UseLastScreenChar = OFF; tty_set_last_char_flag(UseLastScreenChar); use_section("[GITVIEW-Setup]"); g_help = get_string_var("Help", ""); use_section(AnsiColors ? color_section : monochrome_section); get_colorset_var(ViewerColors, ViewerFields, VIEWER_FIELDS); use_section("[GITVIEW-Keys]"); keys = read_keys(keys); if (keys == MAX_KEYS) fprintf(stderr, "%s: too many key sequences; only %d are allowed.\n", g_program, MAX_KEYS); configuration_end(); tty_start_cursorapp(); title_window = window_init(); header_window = window_init(); file_window = window_init(); status_window = window_init(); resize(0); tty_get_screen(screen); tty_set_mode(TTY_NONCANONIC); tty_defaults(); signal_handlers(ON); g_offset[count] = 0; g_current_line = 0; sprintf(header_text, " File: %s", filename); tty_update_title(header_text); restart: refresh(0); while (1) { while ((ks = tty_get_key(&repeat_count)) == NULL) report_undefined_key(); set_status(); if (ks->aux_data == NULL) key = ks->key_seq[0]; else key = ((char *)ks->aux_data - (char *)built_in) / MAX_BUILTIN_NAME; g_size = file_length(); g_lines = g_size / 16 + (g_size % 16 ? 1 : 0); switch (key) { case BUILTIN_previous_line: need_update = 0; while (repeat_count--) { if (g_current_line == 0) break; g_current_line--, need_update = 1; } if (need_update) update_all(); break; case BUILTIN_next_line: need_update = 0; while (repeat_count--) { if (g_current_line >= g_lines - VIEW_LINES) break; g_current_line++, need_update = 1; } if (need_update) update_all(); break; case BUILTIN_backspace: if (count) { count--; if (tty_lines >= 9) { tty_colors(ScreenBrightness, ScreenForeground, ScreenBackground); window_goto(file_window, SEEK_LINE, strlen(seek_txt) + count); window_putc(file_window, ' '); } else window_goto(file_window, tty_lines - 1, tty_columns - 1); break; } case BUILTIN_scroll_down: if (g_current_line == 0) break; g_current_line = max(0, g_current_line - VIEW_LINES); update_all(); break; case ' ': case BUILTIN_scroll_up: if (g_current_line >= g_lines - VIEW_LINES) break; g_current_line = min(g_lines - 1, g_current_line + VIEW_LINES); update_all(); break; case BUILTIN_beginning_of_file: if (g_current_line) { g_current_line = 0; update_all(); } break; case BUILTIN_end_of_file: if (regular_file && g_current_line < g_lines - VIEW_LINES) { g_current_line = g_lines - VIEW_LINES; update_all(); } break; case BUILTIN_hard_refresh: case BUILTIN_refresh: goto restart; case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': if (count < 8) { if (tty_lines >= 9) { char tmp; tty_colors(ScreenBrightness, ScreenForeground, ScreenBackground); window_goto(file_window, SEEK_LINE, strlen(seek_txt) + count); tmp = (char)key; window_putc(file_window, tmp); g_offset[count++] = tmp; } } else tty_beep(); break; case BUILTIN_action: if (count == 0) tty_beep(); else { if (tty_lines >= 9) { g_offset[count] = 0; sscanf(g_offset, "%x", &count); tty_colors(ScreenBrightness, ScreenForeground, ScreenBackground); window_goto(file_window, SEEK_LINE, strlen(seek_txt)); window_puts(file_window, " ", 8); if (count < 0) count = 0; if (count > g_size) count = g_size; g_current_line = count >> 4; update_all(); count = 0; } } break; case 'q': case BUILTIN_exit: goto end; default: report_undefined_key(); break; } cursor_update(); } end: tty_set_mode(TTY_CANONIC); tty_end_cursorapp(); tty_end(screen); return 0; } gnuit-4.9.5/src/signals.c0000644000175000017500000001757111146671376012222 00000000000000/* signal.c -- Signals management for git*. */ /* Copyright (C) 1993-1999, 2006-2007 Free Software Foundation, Inc. This file is part of gnuit. gnuit 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 3 of the License, or (at your option) any later version. gnuit 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, see http://www.gnu.org/licenses/. */ /* Written by Tudor Hulubei and Andrei Pitis. */ #ifdef HAVE_CONFIG_H #include #endif #include #ifdef HAVE_STDLIB_H #include #else /* !HAVE_STDLIB_H */ #include "ansi_stdlib.h" #endif /* !HAVE_STDLIB_H */ #ifdef HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ #include #include "signals.h" #include "tty.h" #include "misc.h" /* Set on SIGINT. Should be reset when detected. */ int user_heart_attack; /* Set if there are pending suspend/window change signals. */ static int suspend_requested; static int refresh_requested; static int alarm_requested; static int refresh_at_SIGCONT; static int signals_allowed = OFF; static int job_control = ON; static void install_handler PROTO ((int)); extern void hide PROTO (()); extern void refresh PROTO ((int)); extern void clock_refresh PROTO ((int)); /* * Service pending signals (signals that can modify git at specific * times - in our case SIGTSTP (suspend) and SIGWINCH (window change)). */ void service_pending_signals() { #ifdef SIGSTOP if (suspend_requested) { hide(); kill(getpid(), SIGSTOP); suspend_requested = 0; refresh_requested = 0; alarm_requested = 0; return; } #endif /* SIGSTOP */ #ifdef SIGWINCH if (refresh_requested) { tty_defaults(); tty_io_clear(); refresh(SIGWINCH); refresh_requested = 0; alarm_requested = 0; return; } #endif /* SIGWINCH */ if (alarm_requested) { /* FIXME: do something. */ /* clock_refresh(SIGALRM); ??? */ alarm_requested = 0; return; } /* Add here as needed... */ } /* * Activate/deactivate suspend/resize signals. */ void signals(mode) int mode; { signals_allowed = mode; if (signals_allowed) service_pending_signals(); } #ifdef SIGSTOP static RETSIGTYPE suspend(signum) int signum; { if (signals_allowed) { refresh_at_SIGCONT = (tty_get_mode() == TTY_NONCANONIC); hide(); kill(getpid(), SIGSTOP); suspend_requested = 0; } else suspend_requested = 1; /* Do this last, to avoid trouble on old Unix systems. On newer systems it doesn't matter, and on older ones I rather quit because hide() is not reentrant. */ install_handler(signum); } #endif /* SIGSTOP */ #ifdef SIGWINCH static RETSIGTYPE window_change(signum) int signum; { if (signals_allowed) { tty_defaults(); tty_io_clear(); refresh(signum); refresh_requested = 0; } else refresh_requested = 1; /* Do this last, to avoid trouble on old Unix systems. On newer systems it doesn't matter, and on older ones I rather quit because refresh() is not reentrant. */ install_handler(signum); } #endif /* SIGWINCH */ static RETSIGTYPE resume(signum) int signum; { if (refresh_at_SIGCONT) { refresh(signum); refresh_requested = 0; } /* Do this last, to avoid trouble on old Unix systems. On newer systems it doesn't matter, and on older ones I would rather quit because refresh() is not reentrant. */ install_handler(signum); } static RETSIGTYPE time_change(signum) int signum; { if (signals_allowed) { if (get_local_time()->tm_sec == 0) clock_refresh(signum); tty_key_print_async(); alarm_requested = 0; } else alarm_requested = 1; /* Do this last, to avoid trouble on old Unix systems. On newer systems it doesn't matter, and on older ones I rather quit because clock_refresh() is not reentrant. */ install_handler(signum); /* Schedule the next alarm. */ alarm(60 - get_local_time()->tm_sec); } static RETSIGTYPE panic(signum) int signum; { signal(signum, panic); user_heart_attack = 1; } static void install_handler(signum) int signum; { #ifdef HAVE_POSIX_SIGNALS sigset_t mask; struct sigaction action; sigemptyset(&mask); /* Block other terminal-generated signals while handler runs. */ sigaddset(&mask, SIGINT); action.sa_mask = mask; action.sa_flags = 0; switch (signum) { #if defined(SIGTSTP) && defined (SIGCONT) case SIGTSTP: #ifdef SIGWINCH sigaddset(&mask, SIGWINCH); #endif /* SIGWINCH */ sigaddset(&mask, SIGCONT); sigaddset(&mask, SIGALRM); action.sa_handler = suspend; break; case SIGCONT: #ifdef SIGWINCH sigaddset(&mask, SIGWINCH); #endif /* SIGWINCH */ sigaddset(&mask, SIGTSTP); sigaddset(&mask, SIGALRM); action.sa_handler = resume; break; #endif /* SIGTSTP && SIGCONT */ #ifdef SIGWINCH case SIGWINCH: #if defined(SIGTSTP) && defined (SIGCONT) sigaddset(&mask, SIGTSTP); sigaddset(&mask, SIGCONT); #endif /* SIGTSTP && SIGCONT */ sigaddset(&mask, SIGALRM); action.sa_handler = window_change; break; #endif /* SIGWINCH */ case SIGALRM: #if defined(SIGTSTP) && defined (SIGCONT) sigaddset(&mask, SIGTSTP); sigaddset(&mask, SIGCONT); #endif /* SIGTSTP && SIGCONT */ #ifdef SIGWINCH sigaddset(&mask, SIGWINCH); #endif /* SIGWINCH */ action.sa_handler = time_change; break; default: assert(0); } sigaction(signum, &action, NULL); #else /* ! HAVE_POSIX_SIGNALS */ /* No POSIX signals. That's bad, we have no way of blocking signals during the execution of the signal handlers. Theoretically, it is possible for a signal to be delivered during the execution of another handler, potentially leading to disastrous results. */ switch (signum) { #if defined(SIGTSTP) && defined (SIGCONT) case SIGTSTP: signal(SIGTSTP, suspend); break; case SIGCONT: signal(SIGCONT, resume); break; #endif /* SIGTSTP && SIGCONT */ #ifdef SIGWINCH case SIGWINCH: signal(SIGWINCH, window_change); break; #endif /* SIGWINCH */ case SIGALRM: signal(SIGALRM, time_change); break; default: assert(0); } #endif /* HAVE_POSIX_SIGNALS */ } void signal_handlers(status) int status; { if (status == ON) { #if defined(SIGTSTP) && defined(SIGCONT) /* Job control stuff. */ if (job_control) { install_handler(SIGTSTP); install_handler(SIGCONT); } #endif /* SIGTSTP && SIGCONT */ #ifdef SIGWINCH /* Handle window changes. */ install_handler(SIGWINCH); #endif /* SIGWINCH */ install_handler(SIGALRM); } else { #if defined(SIGTSTP) && defined(SIGCONT) /* Job control stuff. */ if (job_control) { signal(SIGTSTP, SIG_IGN); signal(SIGCONT, SIG_IGN); } #endif /* SIGTSTP && SIGCONT */ #ifdef SIGWINCH /* Ignore window changes. */ signal(SIGWINCH, SIG_IGN); #endif /* SIGWINCH */ signal(SIGALRM, SIG_IGN); } } /* * Call this at the very beginning to avoid receiving signals before * being able to handle them. */ void signals_init() { #if defined(SIGTSTP) && defined(SIGCONT) /* Job control stuff. */ job_control = (signal(SIGTSTP, SIG_IGN) != SIG_IGN); signal(SIGCONT, SIG_IGN); #endif /* SIGTSTP && SIGCONT */ #ifdef SIGWINCH /* Ignore window changes for now. */ signal(SIGWINCH, SIG_IGN); #endif /* SIGWINCH */ /* Miscelaneous signals that we want to handle. */ signal(SIGSEGV, fatal_signal); signal(SIGHUP, fatal_signal); signal(SIGTERM, fatal_signal); signal(SIGQUIT, SIG_IGN); signal(SIGINT, panic); } gnuit-4.9.5/src/stat.h0000644000175000017500000000516211146671376011533 00000000000000/* stat.h -- Safely defined stat constants. */ /* Copyright (C) 1993-1999, 2006-2007 Free Software Foundation, Inc. This file is part of gnuit. gnuit 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 3 of the License, or (at your option) any later version. gnuit 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, see http://www.gnu.org/licenses/. */ /* Written by Tudor Hulubei and Andrei Pitis. */ #ifndef _GIT_STAT_H #define _GIT_STAT_H #include #include /* Ugly ... */ /* * If the macros defined in sys/stat.h do not work properly, undefine them. * We will define them later ... * - Tektronix UTekV * - Amdahl UTS * - Motorola System V/88 */ #ifndef S_IFMT #define S_IFMT 00170000 #endif #ifndef S_IFSOCK #define S_IFSOCK 0140000 #endif #ifndef S_IFLNK #define S_IFLNK 0120000 #endif #ifndef S_IFREG #define S_IFREG 0100000 #endif #ifndef S_IFBLK #define S_IFBLK 0060000 #endif #ifndef S_IFDIR #define S_IFDIR 0040000 #endif #ifndef S_IFCHR #define S_IFCHR 0020000 #endif #ifndef S_IFIFO #define S_IFIFO 0010000 #endif #ifndef S_ISUID #define S_ISUID 0004000 #endif #ifndef S_ISGID #define S_ISGID 0002000 #endif #ifndef S_ISVTX #define S_ISVTX 0001000 #endif #ifdef STAT_MACROS_BROKEN #undef S_ISBLK #undef S_ISCHR #undef S_ISDIR #undef S_ISFIFO #undef S_ISLNK #undef S_ISMPB #undef S_ISMPC #undef S_ISNWK #undef S_ISREG #undef S_ISSOCK #endif /* STAT_MACROS_BROKEN */ #ifndef S_ISLNK #define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK) #endif #ifndef S_ISREG #define S_ISREG(m) (((m) & S_IFMT) == S_IFREG) #endif #ifndef S_ISDIR #define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR) #endif #ifndef S_ISCHR #define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR) #endif #ifndef S_ISBLK #define S_ISBLK(m) (((m) & S_IFMT) == S_IFBLK) #endif #ifndef S_ISFIFO #define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO) #endif #ifndef S_ISSOCK #define S_ISSOCK(m) (((m) & S_IFMT) == S_IFSOCK) #endif #ifndef S_IRWXU #define S_IRWXU 0000700 #endif #ifndef S_IRWXG #define S_IRWXG 0000070 #endif #ifndef S_IRWXO #define S_IRWXO 0000007 #endif /* Finally ... :-( */ #endif /* _GIT_STAT_H */ gnuit-4.9.5/src/gitdpkgname0000755000175000017500000000377611146671376012640 00000000000000#!/bin/sh ############################################################################### ### ### ### GNU Interactive Tools dpkg helper ### ### Copyright (c) 2007 Free Software Foundation, Inc. ### ### ### ### This file is part of gnuit. ### ### ### ### gnuit 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 3 of the ### ### License, or (at your option) any later version. ### ### ### ### gnuit 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, see ### ### http://www.gnu.org/licenses/. ### ### ### ### Written by Ian Beckwith ### ### ### ############################################################################### if [ $# -lt 1 ] then echo "usage: gitdpkgname file|package..." echo " see gitdpkgname(1)." exit 1 fi while [ $# -gt 0 ] do file="$1" shift if [ "`echo "$file"|sed -e 's/.*\(\..*\)/\L\1/'`" = ".deb" ] then pkg="`dpkg-deb -f "$file" Package`" else pkg="`basename "$file"`" fi echo -n "$pkg " done echo gnuit-4.9.5/src/gitxgrep0000755000175000017500000000011211146671376012154 00000000000000#! /bin/sh cd "$1" echo `pwd`'/:' "$2" $3 $4 $5 $6 $7 $8 $9 2> /dev/null gnuit-4.9.5/src/inputline.h0000644000175000017500000001021311146671376012560 00000000000000/* inputline.h -- Prototypes for the functions in inputline.c. */ /* Copyright (C) 1993-1999, 2006-2007 Free Software Foundation, Inc. This file is part of gnuit. gnuit 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 3 of the License, or (at your option) any later version. gnuit 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, see http://www.gnu.org/licenses/. */ /* Written by Tudor Hulubei and Andrei Pitis. */ #ifndef _GIT_INPUTLINE_H #define _GIT_INPUTLINE_H #include #ifdef HAVE_STDDEF_H #include #endif #include "stdc.h" #include "window.h" #define IL_RECORD 0 #define IL_PREVIOUS 1 #define IL_NEXT 2 #define IL_DONT_STORE 0 #define IL_DONT_KILL 0 #define IL_STORE 1 #define IL_KILL 2 /* Some #defines used in external input line interfaces. */ #define IL_FREEZED 0 #define IL_EDIT 1 #define IL_MOVE 2 #define IL_BEEP 4 #define IL_ERROR 8 #define IL_SAVE 16 #define IL_HOME 32 #define IL_ISEARCH_ACTION_FAILED -1 #define IL_ISEARCH_ACTION_NONE 0 #define IL_ISEARCH_ACTION_DECREASE 1 #define IL_ISEARCH_ACTION_RETRY 2 #define IL_ISEARCH_ACTION_INCREASE 3 #define IL_UPDATE 1 typedef struct { window_t *window; /* The input line window. */ int echo; /* The echo flag. */ int error; /* Use error-like output. */ int last_operation; /* The last basic edit operation performed. */ size_t point; /* The point position. */ size_t mark; /* The mark position. */ size_t columns; /* The number of columns. */ size_t line; /* The input line's location. */ size_t length; /* The total length of the input line. */ size_t static_length; /* The static text length. */ size_t dynamic_length; /* The dynamic text length. */ size_t size; /* The current buffer size. */ char *buffer; /* The data buffer. */ char *kill_ring; /* The kill ring. */ char *history_file; /* The name of the history file. */ } input_line_t; extern input_line_t *il; extern void il_init PROTO (()); extern void il_end PROTO (()); extern void il_free PROTO ((input_line_t *)); extern void il_resize PROTO ((int, int)); extern input_line_t *il_save PROTO (()); extern void il_restore PROTO ((input_line_t *)); extern size_t il_point PROTO (()); extern int il_echo PROTO ((int)); extern int il_is_empty PROTO (()); extern void il_set_mark PROTO (()); extern void il_kill_region PROTO (()); extern void il_kill_ring_save PROTO (()); extern void il_yank PROTO (()); extern void il_exchange_point_and_mark PROTO (()); extern void il_backward_char PROTO (()); extern void il_forward_char PROTO (()); extern void il_backward_word PROTO (()); extern void il_forward_word PROTO (()); extern void il_beginning_of_line PROTO (()); extern void il_end_of_line PROTO (()); extern void il_insert_char PROTO ((int)); extern void il_delete_char PROTO (()); extern void il_backward_delete_char PROTO (()); extern void il_kill_word PROTO (()); extern void il_backward_kill_word PROTO (()); extern void il_reset_line PROTO (()); extern void il_kill_line PROTO ((int)); extern void il_kill_to_beginning_of_line PROTO (()); extern void il_kill_to_end_of_line PROTO (()); extern void il_just_one_space PROTO (()); extern void il_delete_horizontal_space PROTO (()); extern void il_downcase_word PROTO (()); extern void il_upcase_word PROTO (()); extern void il_capitalize_word PROTO (()); extern void il_set_static_text PROTO ((char *)); extern void il_insert_text PROTO ((char *)); extern void il_update_point PROTO (()); extern void il_update PROTO (()); extern int il_get_contents PROTO ((char **)); extern void il_message PROTO ((char *)); extern void il_set_error_flag PROTO ((int)); extern void il_history PROTO ((int)); #endif /* _GIT_INPUTLINE_H */ gnuit-4.9.5/src/system.c0000644000175000017500000001322011146671376012071 00000000000000/* system.c -- The code needed in order to start child processes. */ /* Copyright (C) 1993-1999, 2006-2007 Free Software Foundation, Inc. This file is part of gnuit. gnuit 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 3 of the License, or (at your option) any later version. gnuit 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, see http://www.gnu.org/licenses/. */ /* Written by Tudor Hulubei and Andrei Pitis. */ #ifdef HAVE_CONFIG_H #include #endif #include #ifdef HAVE_STDLIB_H #include #else /* !HAVE_STDLIB_H */ #include "ansi_stdlib.h" #endif /* !HAVE_STDLIB_H */ #include #ifdef HAVE_STDDEF_H #include #endif #ifdef HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ #include #include /* Not all systems declare ERRNO in errno.h... and some systems #define it! */ #if !defined (errno) extern int errno; #endif /* !errno */ #include "xmalloc.h" #include "xstring.h" #include "xio.h" #include "tty.h" #include "signals.h" #include "inputline.h" #include "system.h" #include "misc.h" extern char **environ; extern char *screen; extern char il_read_char PROTO ((char *, char *, int)); char *stdout_log_template = NULL; char *stderr_log_template = NULL; char *stdout_log_name = NULL; char *stderr_log_name = NULL; /* * A modified (and incompatible) version of system(). */ int my_system(command, hide) const char *command; int hide; { pid_t pid; int status; FILE *stdout_log=NULL; FILE *stderr_log=NULL; int stdout_log_fd, stderr_log_fd; int old_stdout=-1, old_stderr=-1; /* Preserve the system() semantics. UNIX always has a command processor. */ if (command == NULL) return 1; remove_log(); if(hide) { /* We have to call mkstemp here, so the parent knows the values of std{out,err}_log_name, then clean up in the parent code below */ old_stdout = dup(1); old_stderr = dup(2); close(1); close(2); strcpy(stdout_log_name,stdout_log_template); stdout_log_fd = mkstemp(stdout_log_name); if(stdout_log_fd != -1) stdout_log = fdopen(stdout_log_fd, "w"); strcpy(stderr_log_name,stderr_log_template); stderr_log_fd = mkstemp(stderr_log_name); if(stderr_log_fd != -1) stderr_log = fdopen(stderr_log_fd, "w"); if(!stdout_log || !stderr_log) { if(stdout_log) fclose(stdout_log); if(stderr_log) fclose(stderr_log); remove_log(); dup(old_stdout); dup(old_stderr); close(old_stdout); close(old_stderr); return -1; } } /* POSIX.2 says that we should ignore SIGINT & SIGQUIT. It actually makes sense :-), but we won't bother to do it, as we ignore them anyway. */ pid = fork(); if (pid < 0) status = -1; else if (pid == 0) { /* This is the child code. */ signal(SIGINT, SIG_DFL); signal(SIGQUIT, SIG_DFL); if (hide) { /* The reason we want stdin closed is that some programs (like gunzip) try to ask the user what to do in certain situations. If stdin is closed, they default to a reasonable action. */ /* FIXME: rpm has an obscure bug that prevents it from working if standard input is closed. Until that is fixed, we need this kludge here (i.e. don't close 0 for `rpm'). */ if (strncmp(command, "rpm ", 4) != 0) close(0); } execle("/bin/sh", "sh", "-c", command, (char *)NULL, environ); /* Make sure we exit if exec() fails. Call _exit() instead of exit() to avoid flushing file descriptors twice (in the parent and in the child). */ _exit(127); } else { /* This is the parent code. */ if(hide) { if(stdout_log) fclose(stdout_log); if(stderr_log) fclose(stderr_log); dup(old_stdout); dup(old_stderr); close(old_stdout); close(old_stderr); } while (wait(&status) != pid); } /* Don't extract exit code, return full status so caller can see if child died */ return status; } extern void resize PROTO ((int)); int start(command, hide) char *command; int hide; { int child_exit_code; if (hide) { signals(ON); child_exit_code = my_system(command, hide); signals(OFF); } else { tty_set_mode(TTY_CANONIC); tty_defaults(); tty_put_screen(screen); signal_handlers(OFF); child_exit_code = my_system(command, hide); signal_handlers(ON); xwrite(1, "\n\n", 2); tty_set_mode(TTY_NONCANONIC); tty_defaults(); resize(0); } return child_exit_code; } void remove_log() { if (stdout_log_name) unlink(stdout_log_name); if (stderr_log_name) unlink(stderr_log_name); } void display_errors(command) char *command; { FILE *stderr_log = fopen(stderr_log_name, "r"); if (stderr_log == NULL) { size_t buf_len = strlen(command) + 32 + strlen(stderr_log_name); char *buf = xmalloc(buf_len); sprintf(buf, "%s: cannot open log file %s", command, stderr_log_name); il_read_char(buf, NULL, IL_MOVE | IL_BEEP | IL_SAVE | IL_ERROR); xfree(buf); } else { char *buf = xmalloc(2048 + 1); while (fgets(buf, 2048 + 1, stderr_log)) { int len = strlen(buf); if (buf[len - 1] == '\n') buf[len - 1] = '\0'; if (il_read_char(buf, NULL, IL_MOVE | IL_ERROR) == 0) break; } xfree(buf); fclose(stderr_log); } } gnuit-4.9.5/src/configure.h0000644000175000017500000000254211146671376012540 00000000000000/* configure.h -- The prototypes of functions used in config.c. */ /* Copyright (C) 1993-2000, 2006-2007 Free Software Foundation, Inc. This file is part of gnuit. gnuit 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 3 of the License, or (at your option) any later version. gnuit 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, see http://www.gnu.org/licenses/. */ /* Written by Tudor Hulubei and Andrei Pitis. */ #ifndef _GIT_CONFIGURE_H #define _GIT_CONFIGURE_H #include "stdc.h" #define MAXLINE 1024 #define NO_SEEK 0 #define DO_SEEK 1 #define IFS ';' /* Internal field separator. */ #define ICS '#' /* Internal comment separator. */ #define IAS '=' /* Internal assignment operator. */ extern int configuration_init PROTO ((char *)); extern void configuration_end PROTO (()); extern int configuration_section PROTO ((char *)); extern void configuration_getvarinfo PROTO ((char *, char **, int, int)); #endif /* _GIT_CONFIGURE_H */ gnuit-4.9.5/src/gitps.c0000644000175000017500000010117611146671376011703 00000000000000/* gitps.c -- A process viewer/killer utility. */ /* Copyright (C) 1993-2000, 2006-2007 Free Software Foundation, Inc. This file is part of gnuit. gnuit 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 3 of the License, or (at your option) any later version. gnuit 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, see http://www.gnu.org/licenses/. */ /* Written by Tudor Hulubei and Andrei Pitis. */ #ifdef HAVE_CONFIG_H #include #endif #include #ifdef HAVE_STDLIB_H #include #else /* !HAVE_STDLIB_H */ #include "ansi_stdlib.h" #endif /* !HAVE_STDLIB_H */ #include #ifdef HAVE_STDDEF_H #include #endif #ifdef HAVE_LOCALE_H #include #endif #include #include #include "file.h" #include #include #include /* SVR2/SVR3. */ #if !(defined(SIGCHLD)) && defined(SIGCLD) #define SIGCHLD SIGCLD #endif #ifdef HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ #include /* Not all systems declare ERRNO in errno.h... and some systems #define it! */ #if !defined (errno) extern int errno; #endif /* !errno */ #include #include "stdc.h" #include "xstring.h" #include "xmalloc.h" #include "getopt.h" #include "tty.h" #include "window.h" #include "configure.h" #include "tilde.h" #include "signals.h" #include "misc.h" #define MAX_KEYS 2048 #define MAX_LINE 2048 #define PS_FIELDS 12 static char *PSFields[PS_FIELDS] = { "TitleForeground", "TitleBackground", "TitleBrightness", "HeaderForeground", "HeaderBackground", "HeaderBrightness", "ScreenForeground", "ScreenBackground", "ScreenBrightness", "StatusForeground", "StatusBackground", "StatusBrightness" }; #ifdef HAVE_LINUX static int PSColors[PS_FIELDS] = { CYAN, BLUE, ON, CYAN, RED, ON, BLACK, CYAN, OFF, CYAN, BLUE, ON }; #else /* !HAVE_LINUX */ static int PSColors[PS_FIELDS] = { BLACK, WHITE, OFF, WHITE, BLACK, ON, WHITE, BLACK, OFF, BLACK, WHITE, OFF }; #endif /* !HAVE_LINUX */ #define TitleForeground PSColors[0] #define TitleBackground PSColors[1] #define TitleBrightness PSColors[2] #define HeaderForeground PSColors[3] #define HeaderBackground PSColors[4] #define HeaderBrightness PSColors[5] #define ScreenForeground PSColors[6] #define ScreenBackground PSColors[7] #define ScreenBrightness PSColors[8] #define StatusForeground PSColors[9] #define StatusBackground PSColors[10] #define StatusBrightness PSColors[11] #ifdef HAVE_LINUX extern int LinuxConsole; #endif /* HAVE_LINUX */ #ifdef HAVE_LINUX int AnsiColors = ON; #else /* !HAVE_LINUX */ int AnsiColors = OFF; #endif /* !HAVE_LINUX */ char color_section[] = "[GITPS-Color]"; char monochrome_section[] = "[GITPS-Monochrome]"; int processes; int PID_index; char *g_home; char *g_program; /* for gnulib lib/error.c */ char *program_name; char *ps_cmd; char *temporary_directory; char header_text[MAX_LINE]; int UseLastScreenChar; int StartupScrollStep; int RefreshAfterKill; char *stdout_log_name; char *stderr_log_name; char *stdout_log_template; char *stderr_log_template; char **ps_vect; char *screen; char *global_buf; int first_on_screen, current_process, scroll_step; static int horizontal_offset=0; window_t *title_window, *header_window, *processes_window, *status_window; static char *title_text; static char *help; static char no_perm[] = "not owner !"; static char no_proc[] = "no such process ! (REFRESH recommended)"; typedef struct { char signame[10]; int signal; } xsignal_t; int signal_type = 0; static xsignal_t sigdesc[] = { { "SIGALRM ", SIGALRM }, { "SIGABRT ", SIGABRT }, #ifdef SIGBUS { "SIGBUS ", SIGBUS }, #endif #ifdef SIGCHLD { "SIGCHLD ", SIGCHLD }, #endif #ifdef SIGCLD { "SIGCLD ", SIGCLD }, #endif #ifdef SIGCONT { "SIGCONT ", SIGCONT }, #endif #ifdef SIGEMT { "SIGEMT ", SIGEMT }, #endif #ifdef SIGFPE { "SIGFPE ", SIGFPE }, #endif { "SIGHUP ", SIGHUP }, #ifdef SIGILL { "SIGILL ", SIGILL }, #endif #ifdef SIGINFO { "SIGINFO ", SIGINFO }, #endif { "SIGINT ", SIGINT }, #ifdef SIGIO { "SIGIO ", SIGIO }, #endif #ifdef SIGIOT { "SIGIOT ", SIGIOT }, #endif { "SIGKILL ", SIGKILL }, { "SIGPIPE ", SIGPIPE }, #ifdef SIGPOLL { "SIGPOLL ", SIGPOLL }, #endif #ifdef SIGPROF { "SIGPROF ", SIGPROF }, #endif #ifdef SIGPWR { "SIGPWR ", SIGPWR }, #endif { "SIGQUIT ", SIGQUIT }, { "SIGSEGV ", SIGSEGV }, #ifdef SIGSTOP { "SIGSTOP ", SIGSTOP }, #endif #ifdef SIGSYS { "SIGSYS ", SIGSYS }, #endif { "SIGTERM ", SIGTERM }, #ifdef SIGSTKFLT { "SIGSTKFLT", SIGSTKFLT }, #endif #ifdef SIGTRAP { "SIGTRAP ", SIGTRAP }, #endif #ifdef SIGTSTP { "SIGTSTP ", SIGTSTP }, #endif #ifdef SIGTTIN { "SIGTTIN ", SIGTTIN }, #endif #ifdef SIGTTOU { "SIGTTOU ", SIGTTOU }, #endif #ifdef SIGURG { "SIGURG ", SIGURG }, #endif { "SIGUSR1 ", SIGUSR1 }, { "SIGUSR2 ", SIGUSR2 }, #ifdef SIGVTALRM { "SIGVTALRM", SIGVTALRM }, #endif #ifdef SIGWINCH { "SIGWINCH ", SIGWINCH }, #endif #ifdef SIGXCPU { "SIGXCPU ", SIGXCPU }, #endif #ifdef SIGXFSZ { "SIGXFSZ ", SIGXFSZ }, #endif }; #define BUILTIN_OPERATIONS 49 #define BUILTIN_previous_line 0 #define BUILTIN_next_line 1 #define BUILTIN_scroll_down 2 #define BUILTIN_scroll_up 3 #define BUILTIN_beginning_of_list 4 #define BUILTIN_end_of_list 5 #define BUILTIN_next_signal 6 #define BUILTIN_SIGALRM 7 #define BUILTIN_SIGABRT 8 #define BUILTIN_SIGBUS 9 #define BUILTIN_SIGCHLD 10 #define BUILTIN_SIGCLD 11 #define BUILTIN_SIGCONT 12 #define BUILTIN_SIGEMT 13 #define BUILTIN_SIGFPE 14 #define BUILTIN_SIGHUP 15 #define BUILTIN_SIGILL 16 #define BUILTIN_SIGINFO 17 #define BUILTIN_SIGINT 18 #define BUILTIN_SIGIO 19 #define BUILTIN_SIGIOT 20 #define BUILTIN_SIGKILL 21 #define BUILTIN_SIGPIPE 22 #define BUILTIN_SIGPOLL 23 #define BUILTIN_SIGPROF 24 #define BUILTIN_SIGPWR 25 #define BUILTIN_SIGQUIT 26 #define BUILTIN_SIGSEGV 27 #define BUILTIN_SIGSTOP 28 #define BUILTIN_SIGSYS 29 #define BUILTIN_SIGTERM 30 #define BUILTIN_SIGTRAP 31 #define BUILTIN_SIGTSTP 32 #define BUILTIN_SIGTTIN 33 #define BUILTIN_SIGTTOU 34 #define BUILTIN_SIGURG 35 #define BUILTIN_SIGUSR1 36 #define BUILTIN_SIGUSR2 37 #define BUILTIN_SIGVTALRM 38 #define BUILTIN_SIGWINCH 39 #define BUILTIN_SIGXCPU 40 #define BUILTIN_SIGXFSZ 41 #define BUILTIN_kill_process 42 #define BUILTIN_refresh 43 #define BUILTIN_exit 44 #define BUILTIN_hard_refresh 45 #define BUILTIN_SIGSTKFLT 46 #define BUILTIN_horizontal_scroll_left 47 #define BUILTIN_horizontal_scroll_right 48 #define MAX_BUILTIN_NAME 30 char built_in[BUILTIN_OPERATIONS][MAX_BUILTIN_NAME] = { "previous-line", "next-line", "scroll-down", "scroll-up", "beginning-of-list", "end-of-list", "next-signal", "SIGALRM", "SIGABRT", "SIGBUS", "SIGCHLD", "SIGCLD", "SIGCONT", "SIGEMT", "SIGFPE", "SIGHUP", "SIGILL", "SIGINFO", "SIGINT", "SIGIO", "SIGIOT", "SIGKILL", "SIGPIPE", "SIGPOLL", "SIGPROF", "SIGPWR", "SIGQUIT", "SIGSEGV", "SIGSTOP", "SIGSYS", "SIGTERM", "SIGTRAP", "SIGTSTP", "SIGTTIN", "SIGTTOU", "SIGURG", "SIGUSR1", "SIGUSR2", "SIGVTALRM", "SIGWINCH", "SIGXCPU", "SIGXFSZ", "kill-process", "refresh", "exit", "hard-refresh", "SIGSTKFLT", "horizontal-scroll-left", "horizontal-scroll-right", }; void remove_log() { if (stdout_log_name) unlink(stdout_log_name); if (stderr_log_name) unlink(stderr_log_name); } void set_title() { memset(global_buf, ' ', tty_columns); memcpy(global_buf, title_text, min(tty_columns, (int)strlen(title_text))); tty_colors(TitleBrightness, TitleForeground, TitleBackground); window_goto(title_window, 0, 0); window_puts(title_window, global_buf, tty_columns); } void set_header() { memset(global_buf, ' ', tty_columns); memcpy(global_buf + 2, header_text, min(tty_columns - 2, (int)strlen(header_text))); tty_colors(HeaderBrightness, HeaderForeground, HeaderBackground); window_goto(header_window, 0, 0); window_puts(header_window, global_buf, tty_columns); } void set_status(what) char *what; { memset(global_buf, ' ', tty_columns); if (what) memcpy(global_buf, what, min(tty_columns, (int)strlen(what))); else memcpy(global_buf, help, min(tty_columns, (int)strlen(help))); tty_colors(StatusBrightness, StatusForeground, StatusBackground); window_goto(status_window, 0, 0); if (tty_columns < (int)((sizeof(sigdesc[0].signame) - 1) + 1)) window_puts(status_window, global_buf, tty_columns); else { global_buf[tty_columns - 1 - (sizeof(sigdesc[0].signame)-1) - 1] = ' '; window_puts(status_window, global_buf, tty_columns - (sizeof(sigdesc[0].signame) - 1) - 1); } } void set_signal(index) int index; { int i, len = sizeof(sigdesc[0].signame) - 1; if (index >= 0) for (i = 0; i < (int)(sizeof(sigdesc) / sizeof(xsignal_t)); i++) if (sigdesc[i].signal == index) { signal_type = i; break; } if (tty_columns > len) { tty_colors(StatusBrightness, WHITE, StatusBackground); window_goto(status_window, 0, tty_columns - len - 1); window_puts(status_window, sigdesc[signal_type].signame, len); window_putc(status_window, ' '); } window_goto(status_window, 0, tty_columns - 1); } void report_undefined_key() { char *prev = tty_get_previous_key_seq(); size_t length = strlen(prev); if (length && (prev[length - 1] != key_INTERRUPT)) { char *str = (char *)tty_key_machine2human(tty_get_previous_key_seq()); char *buf = xmalloc(128 + strlen(str)); sprintf(buf, "%s: not defined.", str); memset(global_buf, ' ', tty_columns); memcpy(global_buf, buf, min(tty_columns, (int)strlen(buf))); xfree(buf); tty_colors(ON, WHITE, RED); window_goto(status_window, 0, 0); window_puts(status_window, global_buf, tty_columns); tty_beep(); tty_update(); sleep(1); } else tty_beep(); set_status((char *)NULL); set_signal(-1); tty_update(); } void free_ps_list() { int i; for (i = 0; i < processes; i++) { xfree(ps_vect[i]); ps_vect[i] = NULL; } } char * read_ps_line(ps_output, line) FILE *ps_output; char *line; { int c; char *ok; size_t lastchar; ok = fgets(line, MAX_LINE - 1, ps_output); if (ok == NULL) return NULL; if (line[lastchar = strlen(line) - 1] == '\n') line[lastchar] = 0; else while ((c = fgetc(ps_output)) != '\n' && c != EOF) ; return ok; } int get_PID_index(ps_output) FILE *ps_output; { int i; char *h = header_text; if (read_ps_line(ps_output, header_text) == NULL) return -1; if (strstr(header_text, "PID") == NULL) return -1; for (i = 0; ; i++) { while (isspace((int)*h)) h++; if (memcmp(h, "PID", 3) == 0) return i; while (!isspace((int)*h)) h++; } } int kill_process(process_index) int process_index; { int i; char *p; char pidstr[128]; int pidnum; assert(process_index < processes); p = ps_vect[process_index]; assert(p); #ifdef __CYGWIN32__ /* skip possible leading status char on cygwin ps */ if((!isspace((int)*p)) && (!isdigit((int)*p))) p++; #endif for (i=0; i < PID_index; i++) { while (isspace((int)*p)) p++; while (!isspace((int)*p)) p++; } i = 0; while (isspace((int)*p)) p++; while (!isspace((int)*p)) pidstr[i++] = *p++; pidstr[i] = 0; pidnum=atoi(pidstr); if(pidnum) return !kill(atoi(pidstr), sigdesc[signal_type].signal); else return -1; } void build_ps_list(ps_output) FILE *ps_output; { int i; char line[MAX_LINE]; for (i = 0; read_ps_line(ps_output, line); i++) { ps_vect = (char **)xrealloc(ps_vect, (i + 1) * sizeof(char *)); ps_vect[i] = xstrdup(line); } processes = i; } void update_process(process, update_color) int process, update_color; { assert(process < processes); int ps_length,visible_length,offset; ps_length=(int)strlen(ps_vect[process]); visible_length=(tty_columns-2); if(visible_length >= ps_length) offset=0; else offset=min(horizontal_offset, (ps_length-visible_length)); memset(global_buf, ' ', tty_columns); memcpy(global_buf + 2, (ps_vect[process]+offset), min(visible_length,strlen(ps_vect[process]+offset))); global_buf[0] = (process == current_process) ? '>' : ' '; global_buf[1] = ' '; if (update_color) { tty_brightness(ScreenBrightness); if (process == current_process) { tty_foreground(ScreenBackground); tty_background(ScreenForeground); } else { tty_foreground(ScreenForeground); tty_background(ScreenBackground); } } window_goto(processes_window, process - first_on_screen, 0); window_puts(processes_window, global_buf, tty_columns); window_goto(status_window, 0, tty_columns - 1); } void update_all() { int i; tty_colors(ScreenBrightness, ScreenForeground, ScreenBackground); if (tty_lines <= 4) return; window_goto(processes_window, 0, 0); for (i = first_on_screen; i < processes && (i - first_on_screen < tty_lines - 3); i++) if (i != current_process) update_process(i, OFF); else window_goto(processes_window, i - first_on_screen, 0); update_process(current_process, ON); tty_colors(ScreenBrightness, ScreenForeground, ScreenBackground); memset(global_buf, ' ', tty_columns); for (; i - first_on_screen < tty_lines - 3; i++) { window_goto(processes_window, i - first_on_screen, 0); window_puts(processes_window, global_buf, tty_columns); } window_goto(status_window, 0, tty_columns - 1); } void clean_up() { tty_end_cursorapp(); tty_end(NULL); remove_log(); } void fatal(postmsg) char *postmsg; { clean_up(); fprintf(stderr, "%s: fatal error: %s.\n", g_program, postmsg); exit(1); } int ps(args) char **args; { FILE *stdout_log=NULL, *stderr_log=NULL; int stdout_log_fd, stderr_log_fd; remove_log(); /* See the comment in system.c on closing tty descriptors. */ int old_stdout = dup(1); int old_stderr = dup(2); close(1); close(2); strcpy(stdout_log_name,stdout_log_template); stdout_log_fd = mkstemp(stdout_log_name); if(stdout_log_fd != -1) stdout_log = fdopen(stdout_log_fd, "w"); strcpy(stderr_log_name,stderr_log_template); stderr_log_fd = mkstemp(stderr_log_name); if(stderr_log_fd != -1) stderr_log = fdopen(stderr_log_fd, "w"); if(!stdout_log || !stderr_log) { if(stdout_log) fclose(stdout_log); if(stderr_log) fclose(stderr_log); remove_log(); dup(old_stdout); dup(old_stderr); close(old_stdout); close(old_stderr); fprintf(stderr, "%s: cannot write temp file: %s.\n", g_program, ((stdout_log==NULL) ? stdout_log_name : stderr_log_name)); return 0; } if (ps_cmd) xfree(ps_cmd); if (args) { int i, bytes = 0; for (i = 0; args[i]; i++) bytes += 1 + strlen(args[i]); ps_cmd = xmalloc(16 + bytes + 1); strcpy(ps_cmd, "ps"); for (i = 0; args[i]; i++) { strcat(ps_cmd, " "); strcat(ps_cmd, args[i]); } } else ps_cmd = xstrdup("ps"); if (system(ps_cmd) != 0) { fclose(stdout_log); fclose(stderr_log); remove_log(); dup(old_stdout); dup(old_stderr); close(old_stdout); close(old_stderr); fprintf(stderr, "%s: invalid command line for ps(1).\n", g_program); fprintf(stderr, "%s: the command was: `%s'.\n", g_program, ps_cmd); fprintf(stderr, "%s: see the ps(1) man page for details.\n", g_program); return 0; } fclose(stdout_log); fclose(stderr_log); dup(old_stdout); dup(old_stderr); close(old_stdout); close(old_stderr); return 1; } int read_keys(keys) int keys; { char *contents; char key_seq[80]; int i, j, need_conversion; for (i = keys; i < MAX_KEYS; i++) { configuration_getvarinfo(key_seq, &contents, 1, NO_SEEK); if (*key_seq == 0) break; if (*key_seq != '^') { char *key_seq_ptr = tty_get_symbol_key_seq(key_seq); if (key_seq_ptr) { /* Ignore empty/invalid key sequences. */ if (*key_seq_ptr == '\0') continue; /* We got the key sequence in the correct form, as returned by tgetstr, so there is no need for further conversion. */ strcpy(key_seq, key_seq_ptr); need_conversion = 0; } else { /* This is not a TERMCAP symbol, it is a key sequence that we will have to convert it with tty_key_human2machine() into a machine usable form before using it. */ need_conversion = 1; } } else need_conversion = 1; if (contents == NULL) continue; for (j = 0; j < BUILTIN_OPERATIONS; j++) if (strcmp(contents, built_in[j]) == 0) break; if (j < BUILTIN_OPERATIONS) { if (!need_conversion || tty_key_human2machine((unsigned char *)key_seq)) tty_key_list_insert((unsigned char *)key_seq, built_in[j]); } else fprintf(stderr, "%s: invalid built-in operation: %s.\n", g_program, contents); } return i; } void resize(resize_required) int resize_required; { int display_title = OFF; int display_header = OFF; int display_processes = OFF; int old_tty_lines = tty_lines; int old_tty_columns = tty_columns; tty_resize(); /* Don't resize, unless absolutely necessary. */ if (!resize_required) if (tty_lines == old_tty_lines && tty_columns == old_tty_columns) return; #ifdef HAVE_LINUX if (LinuxConsole) screen = xrealloc(screen, 4 + tty_columns * tty_lines * 2); #endif /* HAVE_LINUX */ /* Watch out for special cases (tty_lines < 7) because some * components will no longer fit. * * The title needs one line. The panels need four. There is one * more line for the input line and one for the status. * * Cases (lines available): * 1 line: the status * 2 lines: title + status * 3-4 lines: title + header + status * >= 5 lines: everything */ global_buf = xrealloc(global_buf, tty_columns + 1); current_process = min(current_process, processes - 1); first_on_screen = max(0, current_process - (tty_lines - 3) + 1); assert(first_on_screen >= 0); window_resize(status_window, 0, tty_lines - 1, 1, tty_columns); if (tty_lines >= 2) display_title = ON; if (tty_lines >= 3) display_header = ON; if (tty_lines >= 5) { display_processes = ON; if (StartupScrollStep <= 0 || StartupScrollStep >= (tty_lines - 3) - 1) scroll_step = (tty_lines - 3) / 2; else scroll_step = StartupScrollStep; } window_resize(title_window, 0, 0, display_title ? 1 : 0, tty_columns); window_resize(header_window, 0, 1, display_header ? 1 : 0, tty_columns); window_resize(processes_window, 0, 2, display_processes ? (tty_lines - 3) : 0, tty_columns); } /* * Resize (if necessary) and then refresh all gitps' components. */ void refresh(signum) int signum; { current_process = min(current_process, processes - 1); resize(0); if (signum == SIGCONT) { /* We were suspended. Switch back to noncanonical mode. */ tty_set_mode(TTY_NONCANONIC); tty_defaults(); } if (tty_lines == 4) { /* We know that when this is the case, the processes will not be displayed and there will be an empty line that potentially can contain some junk. */ tty_defaults(); tty_clear(); } set_title(); set_header(); set_status((char *)NULL); set_signal(-1); update_all(); tty_update(); if (signum == SIGCONT) tty_update_title(ps_cmd); } void hide() { tty_set_mode(TTY_CANONIC); tty_defaults(); tty_put_screen(screen); } void clock_refresh() { } void usage() { printf("usage: %s [-hvilcbp]\n", g_program); printf(" -h print this help message\n"); printf(" -v print the version number\n"); printf(" -c use ANSI colors\n"); printf(" -b don't use ANSI colors\n"); printf(" -l don't use the last screen character\n"); printf(" -p pass the remaining arguments to ps(1)\n"); } int main(argc, argv) int argc; char *argv[]; { char *tmp; int key, keys; tty_key_t *ks; FILE *stdout_log; int repeat_count; char **arguments; int i, no_of_arguments, exit_code = 0; int need_update, need_update_all, old_current_process; int c, ansi_colors = -1, use_last_screen_character = ON; #ifdef HAVE_SETLOCALE setlocale(LC_ALL,""); #endif /* Make sure we don't get signals before we are ready to handle them. */ signals_init(); program_name = g_program = argv[0]; g_home = getenv("HOME"); if (g_home == NULL) g_home = "."; compute_directories(); get_login_name(); if (getenv("COLORTERM") != NULL) ansi_colors = ON; /* Parse the command line. */ while ((c = getopt(argc, argv, "hvcblp")) != -1) switch (c) { case 'h': /* Help request. */ usage(); return 0; case 'v': /* Version number request. */ printf("%s %s\n", PRODUCT, VERSION); return 0; case 'c': /* Force git to use ANSI color sequences. */ ansi_colors = ON; break; case 'b': /* Prevent git from using ANSI color sequences. */ ansi_colors = OFF; break; case 'l': /* Prevent git from using the last character on the screen. */ use_last_screen_character = OFF; break; case 'p': /* End the list of gitps arguments. If this option is given, the following arguments are to be passed to `ps(1)'. */ goto done; case '?': return 1; default: fprintf(stderr, "%s: unknown error\n", g_program); return 1; } done: if (optind < argc) { no_of_arguments = argc - optind; arguments = (char **)xmalloc(sizeof(char *) * (no_of_arguments + 1)); for (i = 0; i < no_of_arguments; i++) arguments[i] = argv[optind++]; arguments[i] = NULL; } else arguments = NULL; title_text = xmalloc(strlen(PRODUCT) + strlen(VERSION) + 64); sprintf(title_text, " %s %s - Process Viewer/Killer", PRODUCT, VERSION); tty_init(TTY_FULL_INPUT); common_configuration_init(); use_section("[GITPS-Keys]"); keys = read_keys(0); configuration_end(); specific_configuration_init(); use_section("[Setup]"); temporary_directory = getenv("TMPDIR"); if (temporary_directory == NULL) temporary_directory = "/tmp"; if (ansi_colors == -1) AnsiColors = get_flag_var("AnsiColors", OFF); else AnsiColors = ansi_colors; if (use_last_screen_character) UseLastScreenChar = get_flag_var("UseLastScreenChar", OFF); else UseLastScreenChar = OFF; tty_set_last_char_flag(UseLastScreenChar); StartupScrollStep = get_int_var("StartupScrollStep", (tty_lines - 3) / 2); use_section("[GITPS-Setup]"); help = get_string_var("Help", ""); RefreshAfterKill = get_flag_var("RefreshAfterKill", ON); use_section(AnsiColors ? color_section : monochrome_section); get_colorset_var(PSColors, PSFields, PS_FIELDS); use_section("[GITPS-Keys]"); keys = read_keys(keys); if (keys == MAX_KEYS) fprintf(stderr, "%s: too many key sequences; only %d are allowed.\n", g_program, MAX_KEYS); configuration_end(); #ifndef HAVE_LONG_FILE_NAMES fprintf(stderr, "%s: warning: your system doesn't support long file names.", g_program); #endif /* !HAVE_LONG_FILE_NAMES */ stdout_log_template = xmalloc(32 + strlen(temporary_directory) + 1); stderr_log_template = xmalloc(32 + strlen(temporary_directory) + 1); stdout_log_name = xmalloc(32 + strlen(temporary_directory) + 1); stderr_log_name = xmalloc(32 + strlen(temporary_directory) + 1); sprintf(stdout_log_template, "%s/gitps.1.XXXXXX", temporary_directory); sprintf(stderr_log_template, "%s/gitps.2.XXXXXX", temporary_directory); if (ps(arguments) == 0) return 1; tty_start_cursorapp(); title_window = window_init(); header_window = window_init(); processes_window = window_init(); status_window = window_init(); resize(0); tty_get_screen(screen); tty_set_mode(TTY_NONCANONIC); tty_defaults(); signal_handlers(ON); first_on_screen = current_process = 0; tty_update_title(ps_cmd); set_signal(SIGTERM); restart: stdout_log = fopen(stdout_log_name, "r"); remove_log(); if ((PID_index = get_PID_index(stdout_log)) == -1) { exit_code = 1; goto end; } free_ps_list(); build_ps_list(stdout_log); fclose(stdout_log); refresh(0); while (1) { while ((ks = tty_get_key(&repeat_count)) == NULL) report_undefined_key(); set_status((char *)NULL); set_signal(-1); key = ((char *)ks->aux_data - (char *)built_in) / MAX_BUILTIN_NAME; switch (key) { case BUILTIN_previous_line: need_update_all = need_update = 0; while (repeat_count--) { if (current_process != 0) current_process--; else break; if (current_process + 1 == first_on_screen) { first_on_screen = max(0, first_on_screen - scroll_step); need_update_all = 1; } else { if (!need_update) update_process(current_process + 1, ON); need_update = 1; } } if (need_update_all) update_all(); else if (need_update) update_process(current_process, ON); break; case BUILTIN_next_line: need_update_all = need_update = 0; while (repeat_count--) { if (current_process < processes - 1) current_process++; else break; if (current_process - first_on_screen >= tty_lines - 3) { first_on_screen = min(first_on_screen + scroll_step, processes - 1 - (tty_lines - 3) + 1); need_update_all = 1; continue; } if (!need_update) update_process(current_process - 1, ON); need_update = 1; } if (need_update_all) update_all(); else if (need_update) update_process(current_process, ON); break; case BUILTIN_scroll_down: if (current_process == 0) break; old_current_process = current_process; if (current_process < tty_lines - 3) current_process = first_on_screen = 0; else { current_process -= tty_lines - 3; first_on_screen = max(0, first_on_screen - (tty_lines-3)); } if (processes > tty_lines - 3) update_all(); else { update_process(old_current_process, ON); update_process(current_process, ON); } break; case BUILTIN_scroll_up: if (current_process == processes - 1) break; old_current_process = current_process; if (processes - 1 - first_on_screen < tty_lines - 3) current_process = processes - 1; else if (processes - 1 - current_process < tty_lines - 3) { current_process = processes - 1; first_on_screen = processes - 1 - (tty_lines - 3) + 1; } else { current_process += tty_lines - 3; first_on_screen = min(first_on_screen + tty_lines - 3, (processes - 1) - (tty_lines - 3) + 1); } if (processes > tty_lines - 3) update_all(); else { update_process(old_current_process, ON); update_process(current_process, ON); } break; case BUILTIN_horizontal_scroll_left: horizontal_offset--; if(horizontal_offset < 0) horizontal_offset=0; update_all(); break; case BUILTIN_horizontal_scroll_right: horizontal_offset++; update_all(); break; case BUILTIN_beginning_of_list: if (current_process == 0) break; current_process = first_on_screen = 0; update_all(); break; case BUILTIN_end_of_list: if (current_process == processes - 1) break; current_process = processes - 1; first_on_screen = max(0, (processes-1) - (tty_lines-3) + 1); update_all(); break; case BUILTIN_next_signal: signal_type++; signal_type %= sizeof(sigdesc) / sizeof(xsignal_t); set_signal(-1); break; case BUILTIN_SIGALRM: set_signal(SIGALRM); break; case BUILTIN_SIGABRT: set_signal(SIGABRT); break; #ifdef SIGBUS case BUILTIN_SIGBUS: set_signal(SIGBUS); break; #endif #ifdef SIGCHLD case BUILTIN_SIGCHLD: set_signal(SIGCHLD); break; #endif #ifdef SIGCLD case BUILTIN_SIGCLD: set_signal(SIGCLD); break; #endif #ifdef SIGCONT case BUILTIN_SIGCONT: set_signal(SIGCONT); break; #endif #ifdef SIGEMT case BUILTIN_SIGEMT: set_signal(SIGEMT); break; #endif #ifdef SIGFPE case BUILTIN_SIGFPE: set_signal(SIGFPE); break; #endif case BUILTIN_SIGHUP: set_signal(SIGHUP); break; #ifdef SIGILL case BUILTIN_SIGILL: set_signal(SIGILL); break; #endif #ifdef SIGINFO case BUILTIN_SIGINFO: set_signal(SIGINFO); break; #endif case BUILTIN_SIGINT: set_signal(SIGINT); break; #ifdef SIGIO case BUILTIN_SIGIO: set_signal(SIGIO); break; #endif #ifdef SIGIOT case BUILTIN_SIGIOT: set_signal(SIGIOT); break; #endif case BUILTIN_SIGKILL: set_signal(SIGKILL); break; case BUILTIN_SIGPIPE: set_signal(SIGPIPE); break; #ifdef SIGPOLL case BUILTIN_SIGPOLL: set_signal(SIGPOLL); break; #endif #ifdef SIGPROF case BUILTIN_SIGPROF: set_signal(SIGPROF); break; #endif #ifdef SIGPWR case BUILTIN_SIGPWR: set_signal(SIGPWR); break; #endif case BUILTIN_SIGQUIT: set_signal(SIGQUIT); break; case BUILTIN_SIGSEGV: set_signal(SIGSEGV); break; #ifdef SIGSTOP case BUILTIN_SIGSTOP: set_signal(SIGSTOP); break; #endif #ifdef SIGSYS case BUILTIN_SIGSYS: set_signal(SIGSYS); break; #endif case BUILTIN_SIGTERM: set_signal(SIGTERM); break; #ifdef SIGTRAP case BUILTIN_SIGTRAP: set_signal(SIGTRAP); break; #endif #ifdef SIGTSTP case BUILTIN_SIGTSTP: set_signal(SIGTSTP); break; #endif #ifdef SIGTTIN case BUILTIN_SIGTTIN: set_signal(SIGTTIN); break; #endif #ifdef SIGTTOU case BUILTIN_SIGTTOU: set_signal(SIGTTOU); break; #endif #ifdef SIGURG case BUILTIN_SIGURG: set_signal(SIGURG); break; #endif case BUILTIN_SIGUSR1: set_signal(SIGUSR1); break; case BUILTIN_SIGUSR2: set_signal(SIGUSR2); break; #ifdef SIGVTALRM case BUILTIN_SIGVTALRM: set_signal(SIGVTALRM); break; #endif #ifdef SIGWINCH case BUILTIN_SIGWINCH: set_signal(SIGWINCH); break; #endif #ifdef SIGXCPU case BUILTIN_SIGXCPU: set_signal(SIGXCPU); break; #endif #ifdef SIGXFSZ case BUILTIN_SIGXFSZ: set_signal(SIGXFSZ); break; #endif #ifdef SIGSTKFLT case BUILTIN_SIGSTKFLT: set_signal(SIGSTKFLT); break; #endif case BUILTIN_hard_refresh: tty_touch(); case BUILTIN_refresh: ps(arguments); goto restart; case BUILTIN_exit: goto end; case BUILTIN_kill_process: if (kill_process(current_process)) { if(RefreshAfterKill) { struct timespec tv; tv.tv_sec=0; tv.tv_nsec=5 * 1000 * 1000 ; /* half a second */ nanosleep(&tv,NULL); ps(arguments); goto restart; } } else { int e = errno; tty_beep(); memset(global_buf, ' ', tty_columns); tmp = xmalloc(16 + strlen((e == EPERM) ? no_perm:no_proc)); sprintf(tmp, "Error: %s", (e == EPERM) ? no_perm:no_proc); set_status(tmp); tty_update(); xfree(tmp); errno = 0; tty_get_key(NULL); set_status((char *)NULL); set_signal(-1); } break; default: report_undefined_key(); break; } } end: remove_log(); tty_set_mode(TTY_CANONIC); tty_end(screen); return exit_code; } gnuit-4.9.5/src/status.h0000644000175000017500000000243511146671376012103 00000000000000/* status.h -- The #defines and function prototypes used in status.c. */ /* Copyright (C) 1993-1999, 2006-2007 Free Software Foundation, Inc. This file is part of gnuit. gnuit 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 3 of the License, or (at your option) any later version. gnuit 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, see http://www.gnu.org/licenses/. */ /* Written by Tudor Hulubei and Andrei Pitis. */ #ifndef _GIT_STATUS_H #define _GIT_STATUS_H #include "stdc.h" #define STATUS_OK 0 #define STATUS_WARNING 1 #define STATUS_ERROR 2 #define STATUS_CENTERED 0 #define STATUS_LEFT 1 extern void status_init PROTO ((char *)); extern void status_end PROTO (()); extern void status_resize PROTO ((size_t, size_t)); extern void status_update PROTO (()); extern void status PROTO ((char *, int, int)); extern void status_default PROTO (()); #endif /* _GIT_STATUS_H */ gnuit-4.9.5/src/gitkeys.c0000644000175000017500000001730511146671376012234 00000000000000/* gitkeys.c -- An utility designed to help users to find out what is the escape sequences sent by a particular key. Users can use this to set up their configuration files. */ /* Copyright (C) 1993-2000, 2006-2007 Free Software Foundation, Inc. This file is part of gnuit. gnuit 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 3 of the License, or (at your option) any later version. gnuit 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, see http://www.gnu.org/licenses/. */ /* Written by Tudor Hulubei and Andrei Pitis. */ #ifdef HAVE_CONFIG_H #include #endif #include #ifdef HAVE_STDLIB_H #include #else /* !HAVE_STDLIB_H */ #include "ansi_stdlib.h" #endif /* !HAVE_STDLIB_H */ #include #include #ifdef HAVE_POSIX_TTY #include #else #ifdef HAVE_SYSTEMV_TTY #include #else #include #endif #endif #include #ifdef HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ #include "stdc.h" #include "xio.h" /* Stolen from GNU Emacs. */ #ifdef _POSIX_VDISABLE #define CDISABLE _POSIX_VDISABLE #else /* not _POSIX_VDISABLE */ #ifdef CDEL #undef CDISABLE #define CDISABLE CDEL #else /* not CDEL */ #define CDISABLE 255 #endif /* not CDEL */ #endif /* not _POSIX_VDISABLE */ #ifdef HAVE_LINUX speed_t ospeed; #else /* !HAVE_LINUX */ short ospeed; #endif /* !HAVE_LINUX */ #define TTY_OUTPUT 1 #ifdef HAVE_POSIX_TTY static struct termios old_term; static struct termios new_term; #else #ifdef HAVE_SYSTEMV_TTY static struct termio old_term; static struct termio new_term; #else static struct sgttyb old_arg; static struct tchars old_targ; static struct ltchars old_ltarg; static struct sgttyb new_arg; static struct tchars new_targ; static struct ltchars new_ltarg; /* NextStep doesn't define TILDE. */ #ifndef TILDE #define TILDE 0 #endif #endif /* HAVE_SYSTEMV_TTY */ #endif /* HAVE_POSIX_TTY */ char *copyright = "%s %s - Display key sequence utility\n\ GIT is free software; you can redistribute it and/or modify it under the\n\ terms of the GNU General Public License as published by the Free Software\n\ Foundation; either version 2, or (at your option) any later version.\n\ Copyright (C) 1993-1998 Free Software Foundation, Inc.\n\ Written by Tudor Hulubei and Andrei Pitis, students at PUB, Romania\n\ \nPress SPACE when done.\n\n"; extern RETSIGTYPE do_exit PROTO ((int)); void tty_init() { /* This simply doesn't fit into the current scheme. Maybe the tt stuff should be moved into a separate library. This is clearly a self contained function. */ { #ifdef HAVE_POSIX_TTY tcgetattr(TTY_OUTPUT, &old_term); new_term = old_term; new_term.c_iflag &= ~(IXON | ICRNL | IGNCR | INLCR | IGNBRK | BRKINT); new_term.c_oflag &= ~OPOST; new_term.c_lflag |= ISIG | NOFLSH; new_term.c_lflag &= ~(ICANON | ECHO); /* I think we will always have these ones: */ new_term.c_cc[VINTR] = CDISABLE; new_term.c_cc[VQUIT] = CDISABLE; #ifdef VSTART new_term.c_cc[VSTART] = CDISABLE; #endif #ifdef VSTOP new_term.c_cc[VSTOP] = CDISABLE; #endif new_term.c_cc[VMIN] = 1; new_term.c_cc[VTIME] = 0; /* ... but not always these ones: (in fact I am not sure if I really need to overwrite all these, but just in case... */ #ifdef VERASE new_term.c_cc[VERASE] = CDISABLE; #endif #ifdef VKILL new_term.c_cc[VKILL] = CDISABLE; #endif #ifdef VEOL new_term.c_cc[VEOL] = CDISABLE; #endif #ifdef VEOL2 new_term.c_cc[VEOL2] = CDISABLE; #endif #ifdef VSWTCH new_term.c_cc[VSWTCH] = CDISABLE; #endif #ifdef VSUSP new_term.c_cc[VSUSP] = CDISABLE; #endif #ifdef VDSUSP new_term.c_cc[VDSUSP] = CDISABLE; #endif #ifdef VREPRINT new_term.c_cc[VREPRINT] = CDISABLE; #endif #ifdef VDISCARD new_term.c_cc[VDISCARD] = CDISABLE; #endif #ifdef VWERASE new_term.c_cc[VWERASE] = CDISABLE; #endif #ifdef VLNEXT new_term.c_cc[VLNEXT] = CDISABLE; #endif tcsetattr(TTY_OUTPUT, TCSADRAIN, &new_term); ospeed = cfgetospeed(&new_term); #else #ifdef HAVE_SYSTEMV_TTY ioctl(TTY_OUTPUT, TCGETA, &old_term); new_term = old_term; new_term.c_iflag &= ~(IXON | ICRNL | IGNCR | INLCR); new_term.c_oflag = 0; new_term.c_lflag = 0; /* I think we will always have these: */ new_term.c_cc[VINTR] = CDISABLE; new_term.c_cc[VQUIT] = CDISABLE; #ifdef VSTART new_term.c_cc[VSTART] = CDISABLE; #endif #ifdef VSTOP new_term.c_cc[VSTOP] = CDISABLE; #endif new_term.c_cc[VMIN] = 1; new_term.c_cc[VTIME] = 0; /* ... but not always these: (in fact I am not sure if I really need to overwrite all these, but just in case... */ #ifdef VERASE new_term.c_cc[VERASE] = CDISABLE; #endif #ifdef VKILL new_term.c_cc[VKILL] = CDISABLE; #endif #ifdef VEOL new_term.c_cc[VEOL] = CDISABLE; #endif #ifdef VEOL2 new_term.c_cc[VEOL2] = CDISABLE; #endif #ifdef VSWTCH new_term.c_cc[VSWTCH] = CDISABLE; #endif #ifdef VSUSP new_term.c_cc[VSUSP] = CDISABLE; #endif #ifdef VDSUSP new_term.c_cc[VDSUSP] = CDISABLE; #endif #ifdef VREPRINT new_term.c_cc[VREPRINT] = CDISABLE; #endif #ifdef VDISCARD new_term.c_cc[VDISCARD] = CDISABLE; #endif #ifdef VWERASE new_term.c_cc[VWERASE] = CDISABLE; #endif #ifdef VLNEXT new_term.c_cc[VLNEXT] = CDISABLE; #endif ioctl(TTY_OUTPUT, TCSETAW, &new_term); ospeed = new_term.c_cflag & CBAUD; #else ioctl(TTY_OUTPUT, TIOCGETP, &old_arg); ioctl(TTY_OUTPUT, TIOCGETC, &old_targ); ioctl(TTY_OUTPUT, TIOCGLTC, &old_ltarg); new_arg = old_arg; new_targ = old_targ; new_ltarg = old_ltarg; new_arg.sg_flags = ((old_arg.sg_flags & ~(ECHO | CRMOD | XTABS | ALLDELAY | TILDE)) | CBREAK); new_targ.t_intrc = CDISABLE; new_targ.t_quitc = CDISABLE; new_targ.t_stopc = CDISABLE; new_targ.t_startc = CDISABLE; new_targ.t_eofc = CDISABLE; new_targ.t_brkc = CDISABLE; new_ltarg.t_lnextc = CDISABLE; new_ltarg.t_flushc = CDISABLE; new_ltarg.t_werasc = CDISABLE; new_ltarg.t_rprntc = CDISABLE; new_ltarg.t_dsuspc = CDISABLE; /* DSUSPC (delayed SUSPC, ^Y). */ new_ltarg.t_suspc = CDISABLE; ioctl(TTY_OUTPUT, TIOCSETN, &new_arg); ioctl(TTY_OUTPUT, TIOCSETC, &new_targ); ioctl(TTY_OUTPUT, TIOCSLTC, &new_ltarg); ospeed = new_arg.sg_ospeed; #endif /* HAVE_SYSTEMV_TTY */ #endif /* HAVE_POSIX_TTY */ /* Try to make sure the terminal is not locked. */ #ifdef TCXONC #ifdef __QNX__ { int value = 1; ioctl (TTY_OUTPUT, TCXONC, &value); } #else ioctl(TTY_OUTPUT, TCXONC, 1); #endif #endif #ifndef APOLLO #ifdef TIOCSTART ioctl(TTY_OUTPUT, TIOCSTART, 0); #endif #endif #ifdef HAVE_POSIX_TTY #ifdef TCOON tcflow(TTY_OUTPUT, TCOON); #endif #endif } } void tty_end() { #ifdef HAVE_POSIX_TTY tcsetattr(TTY_OUTPUT, TCSADRAIN, &old_term); #else #ifdef HAVE_SYSTEMV_TTY ioctl(TTY_OUTPUT, TCSETAW, &old_term); #else ioctl(TTY_OUTPUT, TIOCSETN, &old_arg); ioctl(TTY_OUTPUT, TIOCSETC, &old_targ); ioctl(TTY_OUTPUT, TIOCSLTC, &old_ltarg); #endif /* HAVE_SYSTEMV_TTY */ #endif /* HAVE_POSIX_TTY */ } RETSIGTYPE do_exit(signum) int signum; { signal(signum, do_exit); tty_end(); exit(1); } int main() { char c; printf(copyright, PRODUCT, VERSION); signal(SIGTERM, do_exit); tty_init(); #ifdef SIGTSTP signal(SIGTSTP, SIG_IGN); #endif #ifdef SIGCONT signal(SIGCONT, SIG_IGN); #endif for (;;) { read(0, &c, 1); if (c == ' ') break; printf("%x ", (unsigned char)c); fflush(stdout); } tty_end(); printf("\n"); return 0; } gnuit-4.9.5/src/status.c0000644000175000017500000001537311146671376012103 00000000000000/* status.c -- A simple status line management file. */ /* Copyright (C) 1993-1999, 2006-2007 Free Software Foundation, Inc. This file is part of gnuit. gnuit 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 3 of the License, or (at your option) any later version. gnuit 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, see http://www.gnu.org/licenses/. */ /* Written by Tudor Hulubei and Andrei Pitis. */ #ifdef HAVE_CONFIG_H #include #endif #include #ifdef HAVE_STDLIB_H #include #else /* !HAVE_STDLIB_H */ #include "ansi_stdlib.h" #endif /* !HAVE_STDLIB_H */ #include #ifdef HAVE_STDDEF_H #include #endif #ifdef HAVE_UTSNAME #include #endif #include #include "xtime.h" #include "xstring.h" #include "xmalloc.h" #include "window.h" #include "status.h" #include "configure.h" #include "tty.h" #include "misc.h" extern int AnsiColors; static window_t *status_window; static char *status_message; static char status_type; static char status_alignment; static char *status_buffer; static char *status_default_message; #ifdef HAVE_UTSNAME static struct utsname u; #endif #define STATUSBAR_FIELDS 9 static char *StatusBarFields[STATUSBAR_FIELDS] = { "StatusBarForeground", "StatusBarBackground", "StatusBarBrightness", "StatusBarWarningForeground", "StatusBarWarningBackground", "StatusBarWarningBrightness", "StatusBarErrorForeground", "StatusBarErrorBackground", "StatusBarErrorBrightness" }; #ifdef HAVE_LINUX static int StatusBarColors[STATUSBAR_FIELDS] = { BLACK, CYAN, OFF, BLACK, WHITE, OFF, WHITE, RED, ON }; #else /* !HAVE_LINUX */ static int StatusBarColors[STATUSBAR_FIELDS] = { BLACK, WHITE, OFF, BLACK, WHITE, OFF, BLACK, WHITE, ON }; #endif /* !HAVE_LINUX */ #define StatusBarForeground StatusBarColors[0] #define StatusBarBackground StatusBarColors[1] #define StatusBarBrightness StatusBarColors[2] #define StatusBarWarningForeground StatusBarColors[3] #define StatusBarWarningBackground StatusBarColors[4] #define StatusBarWarningBrightness StatusBarColors[5] #define StatusBarErrorForeground StatusBarColors[6] #define StatusBarErrorBackground StatusBarColors[7] #define StatusBarErrorBrightness StatusBarColors[8] void status_init(default_message) char *default_message; { use_section(AnsiColors ? color_section : monochrome_section); get_colorset_var(StatusBarColors, StatusBarFields, STATUSBAR_FIELDS); status_default_message = xstrdup(default_message); toprintable(status_default_message, strlen(status_default_message)); status_window = window_init(); #ifdef HAVE_UTSNAME uname(&u); #endif } void status_end() { window_end(status_window); } void status_resize(columns, line) size_t columns, line; { if (status_buffer) xfree(status_buffer); status_buffer = xmalloc(columns * sizeof(char)); window_resize(status_window, 0, line, 1, columns); } static void build_message() { int i, j; struct tm *time; char date_str[32]; char *ptr, *temp_msg; size_t len, temp_msg_len; assert(status_message); memset(status_buffer, ' ', status_window->columns); temp_msg = xmalloc(temp_msg_len = (strlen(status_message) + 1)); for (i = 0, j = 0; status_message[i]; i++) if (status_message[i] == '\\') switch (status_message[i + 1]) { case 'h' : #ifdef HAVE_UTSNAME ptr = u.nodename; #else ptr = ""; #endif goto get_system_info; case 's' : #ifdef HAVE_UTSNAME ptr = u.sysname; #else ptr = ""; #endif goto get_system_info; case 'm' : #ifdef HAVE_UTSNAME ptr = u.machine; #else ptr = ""; #endif get_system_info: if (ptr[0]) { len = strlen(ptr); temp_msg = xrealloc(temp_msg, temp_msg_len += len); memcpy(&temp_msg[j], ptr, len); } else { len = 6; temp_msg = xrealloc(temp_msg, temp_msg_len += len); memcpy(&temp_msg[j], "(none)", len); } j += len; i++; break; case 'd' : time = get_local_time(); sprintf(date_str, "%s %s %02d %d", day_name[time->tm_wday], month_name[time->tm_mon], time->tm_mday, time->tm_year + 1900); len = strlen(date_str); temp_msg = xrealloc(temp_msg, temp_msg_len += len); memcpy(&temp_msg[j], date_str, len); j += len; i++; break; case '\\': temp_msg[j++] = '\\'; i++; break; case '\0': temp_msg[j++] = '\\'; break; default: temp_msg[j++] = '\\'; temp_msg[j++] = status_message[++i]; break; } else { if (status_message[i] == '\t') { temp_msg = xrealloc(temp_msg, temp_msg_len += 8); memcpy(&temp_msg[j], " ", 8); j += 8; } else temp_msg[j++] = status_message[i]; } temp_msg[j] = 0; len = strlen(temp_msg); if (status_alignment == STATUS_CENTERED && (int)len < status_window->columns) memcpy(status_buffer + ((status_window->columns - len) >> 1), temp_msg, len); else memcpy(status_buffer, temp_msg, min((int)len, status_window->columns)); xfree(temp_msg); for (i = 0; i < status_window->columns; i++) if (status_buffer[i] == '\r' || status_buffer[i] == '\n') status_buffer[i] = ' '; } void status_update() { tty_status_t status; tty_save(&status); build_message(); switch (status_type) { case STATUS_WARNING: tty_colors(StatusBarWarningBrightness, StatusBarWarningForeground, StatusBarWarningBackground); break; case STATUS_ERROR: tty_colors(StatusBarErrorBrightness, StatusBarErrorForeground, StatusBarErrorBackground); break; default: tty_colors(StatusBarBrightness, StatusBarForeground, StatusBarBackground); break; } window_goto(status_window, 0, 0); window_puts(status_window, status_buffer, status_window->columns); tty_restore(&status); } void status(message, type, alignment) char *message; int type, alignment; { if (status_message) xfree(status_message); status_message = xstrdup(message); toprintable(status_message, strlen(status_message)); status_type = type; status_alignment = alignment; status_update(); } void status_default() { status(xstrdup(status_default_message), STATUS_OK, STATUS_CENTERED); } gnuit-4.9.5/src/stdc.h0000644000175000017500000000307011146671376011511 00000000000000/* stdc.h -- Macros to make source compile on both ANSI C and K&R C compilers. */ /* Copyright (C) 1993-1999 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. Bash 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 3 of the License, or (at your option) any later version. Bash 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 Bash; see the file COPYING. If not, see http://www.gnu.org/licenses/. */ #if !defined (__STDC_H__) #define __STDC_H__ /* Adapted from BSD /usr/include/sys/cdefs.h. */ /* A function can be defined using prototypes and compile on both ANSI C and traditional C compilers with something like this: extern char *func PROTO ((char *, char *, int)); */ #if defined (__STDC__) # if !defined (NULL) # define NULL ((void *)0) # endif # if !defined (PROTO) # define PROTO(protos) protos # endif # if !defined (__GNUC__) # define inline # endif #else /* ! __STDC__ */ # if !defined (NULL) # define NULL 0x0 # endif # if !defined (PROTO) # define PROTO(protos) () # endif #endif /* ! __STDC__ */ #ifdef HAVE_DUMB_CC #undef PROTO #define PROTO(protos) () #endif #endif /* !__STDC_H__ */ gnuit-4.9.5/src/window.c0000644000175000017500000000523111146671376012057 00000000000000/* window.c -- A *very* simple window management. */ /* Copyright (C) 1993-1999, 2006-2007 Free Software Foundation, Inc. This file is part of gnuit. gnuit 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 3 of the License, or (at your option) any later version. gnuit 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, see http://www.gnu.org/licenses/. */ /* Written by Tudor Hulubei and Andrei Pitis. */ #ifdef HAVE_CONFIG_H #include #endif #include #ifdef HAVE_STDLIB_H #include #else /* !HAVE_STDLIB_H */ #include "ansi_stdlib.h" #endif /* !HAVE_STDLIB_H */ #include #ifdef HAVE_STDDEF_H #include #endif #include #include "window.h" #include "xmalloc.h" #include "tty.h" window_t * window_init() { window_t *window = (window_t *)xmalloc(sizeof(window_t)); window_resize(window, 0, 0, 0, 0); return window; } void window_end(window) window_t *window; { if (window) xfree(window); } void window_resize(window, x, y, lines, columns) window_t *window; int x, y, lines, columns; { window->x = x; window->y = y; window->lines = lines; window->columns = columns; } int window_puts(window, str, length) window_t *window; char *str; int length; { int x = window->cursor_x; window->cursor_x += length; if (x >= window->columns) return 0; if (window->cursor_y >= window->lines) return 0; if (x + length <= window->columns) return tty_puts(str, length); /* Write the visible part of the string. */ return tty_puts(str, window->columns - x); } int window_putc(window, c) window_t *window; int c; { if (++window->cursor_x > window->columns) return 0; if (window->cursor_y >= window->lines) return 0; return tty_putc(c); } void window_goto(window, y, x) window_t *window; int y, x; { window->cursor_x = x; window->cursor_y = y; tty_goto(y + window->y, x + window->x); } int window_x(window) window_t *window; { return window->x; } int window_y(window) window_t *window; { return window->y; } int window_lines(window) window_t *window; { return window->lines; } int window_columns(window) window_t *window; { return window->columns; } gnuit-4.9.5/src/gitwhich.c0000644000175000017500000000402311146671376012354 00000000000000/* gitwhich.c -- A simplified version of `which'. */ /* Copyright (C) 1999, 2006-2007 Free Software Foundation, Inc. This file is part of gnuit. gnuit 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 3 of the License, or (at your option) any later version. gnuit 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, see http://www.gnu.org/licenses/. */ /* Written by Tudor Hulubei, based on the `which' code by Paul Vixie. */ #ifdef HAVE_CONFIG_H #include #endif #include #ifdef HAVE_STDLIB_H #include #else /* !HAVE_STDLIB_H */ #include "ansi_stdlib.h" #endif /* !HAVE_STDLIB_H */ #ifdef HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ #include "xmalloc.h" #include "xstring.h" /* for gnulib lib/error.c */ char *program_name; void fatal(postmsg) char *postmsg; { postmsg = NULL; exit(1); } /* * Return 1 if the executable exists, 0 otherwise. */ int find(name, path) char *name; char *path; { int found = 0; char *pc = path; while (*pc != '\0' && found == 0) { char save; int len = 0; char *tmp; while (*pc != ':' && *pc != '\0') { len++; pc++; } save = *pc; *pc = '\0'; tmp = xmalloc(strlen(pc - len) + 1 + strlen(name) + 1); sprintf(tmp, "%s/%s", pc - len, name); *pc = save; if (*pc) pc++; found = (access(tmp, 1) == 0); xfree(tmp); } return found; } /* * Some systems don't have `which'... */ int main(argc, argv) int argc; char *argv[]; { program_name=argv[0]; char *path = getenv("PATH"); for (argc--, argv++; argc; argc--, argv++) if (find(*argv, path)) return 0; return 1; } gnuit-4.9.5/src/ansi_stdlib.h0000644000175000017500000000244311146671376013052 00000000000000/* ansi_stdlib.h -- An ANSI Standard stdlib.h. A minimal stdlib.h containing extern declarations for those functions that bash uses. */ /* Copyright (C) 1993-1999 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. Bash 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 3 of the License, or (at your option) any later version. Bash 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 Bash; see the file COPYING. If not, see http://www.gnu.org/licenses/. */ #if !defined (_STDLIB_H_) #define _STDLIB_H_ 1 /* String conversion functions. */ extern int atoi (); extern long int atol (); /* Memory allocation functions. */ extern char *malloc (); extern char *calloc (); extern char *realloc (); extern void free (); /* Other miscellaneous functions. */ extern void abort (); extern void exit (); extern char *getenv (); extern void qsort (); #endif /* _STDLIB_H */ gnuit-4.9.5/src/gitunpack0000755000175000017500000001011011146671376012307 00000000000000#! /bin/sh ############################################################################### ### ### ### GNU Interactive Tools unpack script ### ### Copyright (C) 1997-2000, 2006-2007 Free Software Foundation, Inc. ### ### ### ### This file is part of gnuit. ### ### ### ### gnuit 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 3 of the ### ### License, or (at your option) any later version. ### ### ### ### gnuit 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, see ### ### http://www.gnu.org/licenses/. ### ### ### ### Written by Tudor Hulubei and Viorel Anghel. ### ### ### ############################################################################### # We can have one or two arguments. if test "$#" -lt 2; then echo "usage: $0 destdir archives..." exit 1 fi destdir="$1" srcdir=`pwd` cd "$destdir" 2> /dev/null if test "$?" -ne 0; then gitmkdirs "$destdir" if test "$?" -ne 0; then exit 1; fi cd "$destdir" if test "$?" -ne 0; then exit 1; fi fi exit_code=0 while true; do archive=$2 if test -d "$archive"; then echo "$0: $archive: not a regular file" >&2 exit_code=1 else # `ln' will fail if $destdir is the same as $srcdir. ln -s "$srcdir/$archive" "$archive" 2> /dev/null link_created=$? case "$archive" in *.[tT][aA][rR]) tar -xvf "$archive";; *.[tT][aA][rR].[bB][zZ]) bzip -dc "$archive"|tar -xvf -;; *.[tT][aA][rR].[bB][zZ]2) bzip2 -dc "$archive"|tar -xvf -;; *.[tT][aA][rR].[gG][zZ]) gzip -dc -- "$archive"|tar -xvf -;; *.[tT][aA][rR].[zZ]) uncompress -dc "$archive"|tar -xvf -;; *.[cC][pP][iI][oO]) cat "$archive"|cpio -i -d;; *.[cC][pP][iI][oO].[bB][zZ]) bzip -dc "$archive"|cpio -i -d;; *.[cC][pP][iI][oO].[bB][zZ]2) bzip2 -dc "$archive"|cpio -i -d;; *.[cC][pP][iI][oO].[gG][zZ]) gzip -dc -- "$archive"|cpio -i -d;; *.[cC][pP][iI][oO].[zZ]) uncompress -dc "$archive"|cpio -i -d;; *.[tT][gG][zZ]) gzip -dc -- "$archive"|tar -xvf -;; *.[tT][aA][zZ]) uncompress -dc "$archive"|tar -xvf -;; *.[tT][rR][zZ]) uncompress -dc "$archive"|tar -xvf -;; *.[jJ][aA][rR]) jar -xvf "$archive";; *.[zZ][iI][pP]) unzip -o "$archive";; *.[aA][rR][jJ]|*.[aA][0-9][0-9]) unarj x "$archive";; *.[rR][aA][rR]|*.[rR][0-9][0-9]) rar x -y -r -v "$archive";; *.[lL][hH][aA]) lha -xvf "$archive";; *.[lL][zZ][hH]) lha -xvf "$archive";; *.[zZ]) uncompress "$archive";; *.[bB][zZ]) bzip -d "$archive";; *.[bB][zZ]2) bzip2 -d "$archive";; *.[gG][zZ]) gunzip "$archive";; *.[sS][hH][aA][rR]) sh "$archive";; *.[uU][uU]) uudecode "$archive";; *.[rR][pP][mM]) rpm2cpio "$archive"|cpio -v -i -d;; *.[dD][eE][bB]) ar -xv "$archive";; *.[aA]) ar -xv "$archive";; *) echo "$0: $archive: unknown archive type" >&2 exit_code=1 esac if test $? -ne 0; then exit_code=$? fi if test "$link_created" -eq 0; then rm "$archive" fi fi shift if test $# -eq 1; then exit $exit_code fi done gnuit-4.9.5/src/tty.c0000644000175000017500000016302111146671376011372 00000000000000/* tty.c -- The tty management file. */ /* Copyright (C) 1993-2000, 2006-2007 Free Software Foundation, Inc. This file is part of gnuit. gnuit 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 3 of the License, or (at your option) any later version. gnuit 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, see http://www.gnu.org/licenses/. */ /* Written by Tudor Hulubei and Andrei Pitis. */ #ifdef HAVE_CONFIG_H #include #endif #include #ifdef HAVE_STDLIB_H #include #else /* !HAVE_STDLIB_H */ #include "ansi_stdlib.h" #endif /* !HAVE_STDLIB_H */ #include #ifdef HAVE_STDDEF_H #include #endif #include #include "file.h" #include #ifdef HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ #include #include "stdc.h" #include "xstring.h" #include "xmalloc.h" #include "xio.h" #include "tty.h" #include "signals.h" #include "misc.h" /* Stolen from GNU Emacs. */ #ifdef _POSIX_VDISABLE #define CDISABLE _POSIX_VDISABLE #else /* not _POSIX_VDISABLE */ #ifdef CDEL #undef CDISABLE #define CDISABLE CDEL #else /* not CDEL */ #define CDISABLE 255 #endif /* not CDEL */ #endif /* not _POSIX_VDISABLE */ #define MAX_TTY_COLUMNS 1024 #define MAX_TTY_LINES 1024 /* I want to avoid including curses.h or any other header file that defines these. I think it's safer because I couldn't find 2 similar curses.h files in the entire world... */ extern int tputs PROTO ((const char *__string, int __nlines, int (*outfun)())); extern int tgetent PROTO ((void *__buffer, const char *__termtype)); extern char *tgetstr PROTO ((const char *__name, char **__area)); extern int tgetnum PROTO ((const char *__name)); extern int tgetflag PROTO ((const char *__name)); extern char *tgoto PROTO ((const char *__cstring, int __hpos, int __vpos)); #define TTY_INPUT 0 #define TTY_OUTPUT 1 #ifdef HAVE_LINUX #define VCS_READ 1 #define VCS_WRITE 2 #endif #ifdef HAVE_LINUX static int vcs_read_ok; static int vcs_is_monochrome; #endif /* If tty_kbdmode == TTY_FULL_INPUT, single character key sequences are inserted into the linked list. This feature is used by gitps which has no command line. */ static int tty_kbdmode; #ifdef HAVE_POSIX_TTY static struct termios old_term; static struct termios new_term; #else #ifdef HAVE_SYSTEMV_TTY static struct termio old_term; static struct termio new_term; #else static struct sgttyb old_arg; static struct tchars old_targ; static struct ltchars old_ltarg; static struct sgttyb new_arg; static struct tchars new_targ; static struct ltchars new_ltarg; /* NextStep doesn't define TILDE. */ #ifndef TILDE #define TILDE 0 #endif #endif /* HAVE_SYSTEMV_TTY */ #endif /* HAVE_POSIX_TTY */ int tty_lines; int tty_columns; char *tty_device; static unsigned char *tty_key_seq; static int tty_device_length; static int tty_last_char_flag; static int tty_cursor_x; static int tty_cursor_y; /* * tty_*_current_attribute: * bit 7: reverse video * bit 6: brightness * bits 5,4,3: background color * bits 2,1,0: foreground color */ static unsigned char tty_current_attribute; static unsigned char tty_io_current_attribute; /* The current interrupt character. We need to restore when resuming after a suspend. */ static int tty_interrupt_char = key_INTERRUPT; #define INVALID_CACHE 0 #define VALID_CACHE 1 static int fg_cache = INVALID_CACHE; static int bg_cache = INVALID_CACHE; static int br_cache = INVALID_CACHE; static int rv_cache = INVALID_CACHE; /* tty_scr the current status of the screen, while tty_atr is used to keep the current status of the attributes. */ static unsigned char *tty_scr; static unsigned char *tty_atr; /* tty_prev_scr will always contain the copy of the previous screen, while tty_atr will contain the copy of the previous attributes. */ static unsigned char *tty_prev_scr; static unsigned char *tty_prev_atr; /* The ANSI color sequences. */ static char ansi_foreground[] = { 0x1b, '[', '3', '0', 'm' }; static char ansi_background[] = { 0x1b, '[', '4', '0', 'm' }; static char ansi_defaults[] = { 0x1b, '[', '0', 'm' }; /* These variable tells us if we should use standard ANSI color sequences. Its value is taken from the configuration file. */ extern int AnsiColors; #define FOREGROUND_MASK 0x07 #define BACKGROUND_MASK 0x38 #define BRIGHTNESS_MASK 0x40 #define REVERSEVID_MASK 0x80 #define _TTY_FOREGROUND(attributes) ((((int)attributes)&FOREGROUND_MASK) >> 0) #define _TTY_BACKGROUND(attributes) ((((int)attributes)&BACKGROUND_MASK) >> 3) #define _TTY_BRIGHTNESS(attributes) ((((int)attributes)&BRIGHTNESS_MASK) >> 6) #define _TTY_REVERSEVID(attributes) ((((int)attributes)&REVERSEVID_MASK) >> 7) #define TTY_IO_FOREGROUND _TTY_FOREGROUND(tty_io_current_attribute) #define TTY_IO_BACKGROUND _TTY_BACKGROUND(tty_io_current_attribute) #define TTY_IO_BRIGHTNESS _TTY_BRIGHTNESS(tty_io_current_attribute) #define TTY_IO_REVERSEVID _TTY_REVERSEVID(tty_io_current_attribute) #define TTY_FOREGROUND _TTY_FOREGROUND(tty_current_attribute) #define TTY_BACKGROUND _TTY_BACKGROUND(tty_current_attribute) #define TTY_BRIGHTNESS _TTY_BRIGHTNESS(tty_current_attribute) #define TTY_REVERSEVID _TTY_REVERSEVID(tty_current_attribute) #define _TTY_SET_FOREGROUND(attributes, color)\ ((attributes) = ((attributes) & ~FOREGROUND_MASK) | (((color) & 7) << 0)) #define _TTY_SET_BACKGROUND(attributes, color)\ ((attributes) = ((attributes) & ~BACKGROUND_MASK) | (((color) & 7) << 3)) #define _TTY_SET_BRIGHTNESS(attributes, status)\ ((attributes) = ((attributes) & ~BRIGHTNESS_MASK) | (((status) & 1) << 6)) #define _TTY_SET_REVERSEVID(attributes, status)\ ((attributes) = ((attributes) & ~REVERSEVID_MASK) | (((status) & 1) << 7)) #define TTY_IO_SET_FOREGROUND(color)\ _TTY_SET_FOREGROUND(tty_io_current_attribute, (color)) #define TTY_IO_SET_BACKGROUND(color)\ _TTY_SET_BACKGROUND(tty_io_current_attribute, (color)) #define TTY_IO_SET_BRIGHTNESS(status)\ _TTY_SET_BRIGHTNESS(tty_io_current_attribute, (status)) #define TTY_IO_SET_REVERSEVID(status)\ _TTY_SET_REVERSEVID(tty_io_current_attribute, (status)) #define TTY_SET_FOREGROUND(color)\ _TTY_SET_FOREGROUND(tty_current_attribute, (color)) #define TTY_SET_BACKGROUND(color)\ _TTY_SET_BACKGROUND(tty_current_attribute, (color)) #define TTY_SET_BRIGHTNESS(status)\ _TTY_SET_BRIGHTNESS(tty_current_attribute, (status)) #define TTY_SET_REVERSEVID(status)\ _TTY_SET_REVERSEVID(tty_current_attribute, (status)) #ifdef HAVE_LINUX /* These variable tells us if we are using a Linux console. */ int LinuxConsole; #endif /* HAVE_LINUX */ /* Structures for keys management. */ tty_key_t *key_list_head; tty_key_t *current_key; tty_key_t default_key; /* 1Kb of cache memory for terminal optimizations. Don't make this bigger, some terminal/OS combinations fail to transmit chunks of data that are too big. I'm not sure I fully understand the problem, but 10Kb didn't work and 1Kb did. xwrite() reported success, but the screen was not correctly updated. xterm bug!? */ #define TTY_CACHE_SIZE 1024 static char tty_cache[TTY_CACHE_SIZE]; static int tty_index; #ifndef HAVE_LINUX static char term_buf[2048]; #endif static char vt100[] = "vt100"; /* The terminal mode. TTY_CANONIC at the begining. */ int tty_mode = TTY_CANONIC; char *tty_type; char PC; /* For tputs. */ char *BC; /* For tgoto/tparm. */ char *UP; #ifdef HAVE_LINUX speed_t ospeed; #else /* !HAVE_LINUX */ short ospeed; #endif /* !HAVE_LINUX */ /* A structure describing some attributes we need to know about each capability. See below for greater detail. */ typedef struct { char *name; /* the capability name. */ /* These ones should be in an union, but the HP-UX non ANSI compiler complains about union initialization being an ANSI feature and I care more for portability than for the memory used. */ char *string; /* The string value of the capability. */ int integer; /* The integer value of the capability. */ int required; /* This capability is required. */ char *symbol; /* The human readable form of the key name. */ } tty_capability_t; #define TTY_CAPABILITIES_USED 38 #define TTY_FIRST_SYMBOL_KEY 17 static tty_capability_t tty_capability[TTY_CAPABILITIES_USED] = { { "me", NULL, 0, 0, NULL }, /* Turn off all attributes. */ { "mr", NULL, 0, 0, NULL }, /* Turn on reverse video mode. */ { "md", NULL, 0, 0, NULL }, /* Turn on bold. */ { "vi", NULL, 0, 0, NULL }, /* Make the cursor invisible. */ { "ve", NULL, 0, 0, NULL }, /* Make the cursor appear normal. */ { "cl", NULL, 0, 1, NULL }, /* Clear screen & home the cursor. */ { "cm", NULL, 0, 1, NULL }, /* Move the cursor. */ { "pc", NULL, 0, 0, NULL }, /* Padding character. */ { "up", NULL, 0, 0, NULL }, /* Up one line. */ { "le", NULL, 0, 0, NULL }, /* Move left one space. */ { "so", NULL, 0, 0, NULL }, /* Enter standout mode. */ { "sg", NULL, 0, 0, NULL }, /* This is a magic-cookie terminal. */ { "ms", NULL, 0, 0, NULL }, /* Safe to move in standout mode. */ { "co", NULL, 0, 0, NULL }, /* The number of columns. */ { "li", NULL, 0, 0, NULL }, /* The number of lines. */ { "ti", NULL, 0, 0, NULL }, /* Begin program that uses cursor motion. */ { "te", NULL, 0, 0, NULL }, /* End program that uses cursor motion. */ { "ku", NULL, 0, 0, "UP" }, /* (UP) */ { "kd", NULL, 0, 0, "DOWN" }, /* (DOWN) */ { "kr", NULL, 0, 0, "RIGHT" }, /* (RIGHT) */ { "kl", NULL, 0, 0, "LEFT" }, /* (LEFT) */ { "kI", NULL, 0, 0, "INS" }, /* (INS) */ { "kD", NULL, 0, 0, "DEL" }, /* (DEL) */ { "kh", NULL, 0, 0, "HOME" }, /* (HOME) */ { "@7", NULL, 0, 0, "END" }, /* (END) */ { "kP", NULL, 0, 0, "PGUP" }, /* (PGUP) */ { "kN", NULL, 0, 0, "PGDOWN" }, /* (PGDOWN) */ { "k0", NULL, 0, 0, "F0" }, /* (F0) */ { "k1", NULL, 0, 0, "F1" }, /* (F1) */ { "k2", NULL, 0, 0, "F2" }, /* (F2) */ { "k3", NULL, 0, 0, "F3" }, /* (F3) */ { "k4", NULL, 0, 0, "F4" }, /* (F4) */ { "k5", NULL, 0, 0, "F5" }, /* (F5) */ { "k6", NULL, 0, 0, "F6" }, /* (F6) */ { "k7", NULL, 0, 0, "F7" }, /* (F7) */ { "k8", NULL, 0, 0, "F8" }, /* (F8) */ { "k9", NULL, 0, 0, "F9" }, /* (F9) */ { "k;", NULL, 0, 0, "F10" }, /* (F10) */ }; /* Some nice aliases... */ #define TTY_ATTRIBUTES_OFF (tty_capability[0].string) #define TTY_REVERSE_ON (tty_capability[1].string) #define TTY_BRIGHT_ON (tty_capability[2].string) #define TTY_CURSOR_OFF (tty_capability[3].string) #define TTY_CURSOR_ON (tty_capability[4].string) #define TTY_CLEAR_SCREEN (tty_capability[5].string) #define TTY_CURSOR_MOVE (tty_capability[6].string) #define TTY_PAD_CHAR (tty_capability[7].string) #define TTY_UP_ONE_LINE (tty_capability[8].string) #define TTY_LEFT_ONE_SPACE (tty_capability[9].string) #define TTY_STANDOUT_ON (tty_capability[10].string) #define TTY_MAGIC_COOKIE (tty_capability[11].integer) #define TTY_MS_FLAG (tty_capability[12].integer) #define TTY_COLUMNS (tty_capability[13].integer) #define TTY_LINES (tty_capability[14].integer) #define TTY_START_CURSORAPP (tty_capability[15].string) #define TTY_END_CURSORAPP (tty_capability[16].string) /* Some more nice aliases... */ #define TTY_ATTRIBUTES_OFF_NAME (tty_capability[0].name) #define TTY_REVERSE_ON_NAME (tty_capability[1].name) #define TTY_BRIGHT_ON_NAME (tty_capability[2].name) #define TTY_CURSOR_OFF_NAME (tty_capability[3].name) #define TTY_CURSOR_ON_NAME (tty_capability[4].name) #define TTY_CLEAR_SCREEN_NAME (tty_capability[5].name) #define TTY_CURSOR_MOVE_NAME (tty_capability[6].name) #define TTY_PAD_CHAR_NAME (tty_capability[7].name) #define TTY_UP_ONE_LINE_NAME (tty_capability[8].name) #define TTY_LEFT_ONE_SPACE_NAME (tty_capability[9].name) #define TTY_STANDOUT_ON_NAME (tty_capability[10].name) #define TTY_MAGIC_COOKIE_NAME (tty_capability[11].name) #define TTY_MS_FLAG_NAME (tty_capability[12].name) #define TTY_COLUMNS_NAME (tty_capability[13].name) #define TTY_LINES_NAME (tty_capability[14].name) #define TTY_START_CURSORAPP_NAME (tty_capability[15].name) #define TTY_END_CURSORAPP_NAME (tty_capability[16].name) #ifdef HAVE_LIBTERMCAP static char term_database[] = "termcap"; static char term_env[] = "TERMCAP"; #else /* !HAVE_LIBTERMCAP */ static char term_database[] = "terminfo"; static char term_env[] = "TERMINFO"; #endif /* !HAVE_LIBTERMCAP */ static void tty_io_goto PROTO ((int, int)); static void tty_io_foreground PROTO ((int)); static void tty_io_background PROTO ((int)); static void tty_io_brightness PROTO ((int)); static void tty_io_reversevid PROTO ((int)); static void tty_io_colors PROTO ((int)); static int tty_is_xterm PROTO ((char *)); extern void fatal PROTO ((char *)); /* ANSI colors. OFF & ON are here because we need them when we read the configuration file. Don't bother... */ static char *colors[10] = { "BLACK", "RED", "GREEN", "YELLOW", "BLUE", "MAGENTA", "CYAN", "WHITE", "OFF", "ON" }; /* Control keys description. C-a, C-b, C-c and so on... */ unsigned char key_ctrl_table[0x5f] = { 0x20, /* 0x20 ( ) */ 0x21, /* 0x21 (!) */ 0x22, /* 0x22 (") */ 0x23, /* 0x23 (#) */ 0xff, /* 0x24 ($) */ 0x25, /* 0x25 (%) */ 0x26, /* 0x26 (&) */ 0x07, /* 0x27 (') */ 0x28, /* 0x28 (() */ 0x29, /* 0x29 ()) */ 0x2a, /* 0x2a (*) */ 0x2b, /* 0x2b (+) */ 0x2c, /* 0x2c (,) */ 0x2d, /* 0x2d (-) */ 0x2e, /* 0x2e (.) */ 0x2f, /* 0x2f (/) */ 0x20, /* 0x30 (0) */ 0x20, /* 0x31 (1) */ 0xff, /* 0x32 (2) */ 0x1b, /* 0x33 (3) */ 0x1c, /* 0x34 (4) */ 0x1d, /* 0x35 (5) */ 0x1e, /* 0x36 (6) */ 0x1f, /* 0x37 (7) */ 0x7f, /* 0x38 (8) */ 0x39, /* 0x39 (9) */ 0x3a, /* 0x3a (:) */ 0x3b, /* 0x3b (;) */ 0x3c, /* 0x3c (<) */ 0x20, /* 0x3d (=) */ 0x3e, /* 0x3e (>) */ 0x20, /* 0x3f (?) */ 0x20, /* 0x40 (@) */ 0x01, /* 0x41 (A) */ 0x02, /* 0x42 (B) */ 0x03, /* 0x43 (C) */ 0x04, /* 0x44 (D) */ 0x05, /* 0x45 (E) */ 0x06, /* 0x46 (F) */ 0x07, /* 0x47 (G) */ 0x08, /* 0x48 (H) */ 0x09, /* 0x49 (I) */ 0x0a, /* 0x4a (J) */ 0x0b, /* 0x4b (K) */ 0x0c, /* 0x4c (L) */ 0x0d, /* 0x4d (M) */ 0x0e, /* 0x4e (N) */ 0x0f, /* 0x4f (O) */ 0x10, /* 0x50 (P) */ 0x11, /* 0x51 (Q) */ 0x12, /* 0x52 (R) */ 0x13, /* 0x53 (S) */ 0x14, /* 0x54 (T) */ 0x15, /* 0x55 (U) */ 0x16, /* 0x56 (V) */ 0x17, /* 0x57 (W) */ 0x18, /* 0x58 (X) */ 0x19, /* 0x59 (Y) */ 0x1a, /* 0x5a (Z) */ 0x1b, /* 0x5b ([) */ 0x1c, /* 0x5c (\) */ 0x1d, /* 0x5d (]) */ 0x5e, /* 0x5e (^) */ 0x7f, /* 0x5f (_) */ 0x20, /* 0x60 (`) */ 0x01, /* 0x61 (a) */ 0x02, /* 0x62 (b) */ 0x03, /* 0x63 (c) */ 0x04, /* 0x64 (d) */ 0x05, /* 0x65 (e) */ 0x06, /* 0x66 (f) */ 0x07, /* 0x67 (g) */ 0x08, /* 0x68 (h) */ 0x09, /* 0x69 (i) */ 0x0a, /* 0x6a (j) */ 0x0b, /* 0x6b (k) */ 0x0c, /* 0x6c (l) */ 0x0d, /* 0x6d (m) */ 0x0e, /* 0x6e (n) */ 0x0f, /* 0x6f (o) */ 0x10, /* 0x70 (p) */ 0x11, /* 0x71 (q) */ 0x12, /* 0x72 (r) */ 0x13, /* 0x73 (s) */ 0x14, /* 0x74 (t) */ 0x15, /* 0x75 (u) */ 0x16, /* 0x76 (v) */ 0x17, /* 0x77 (w) */ 0x18, /* 0x78 (x) */ 0x19, /* 0x79 (y) */ 0x1a, /* 0x7a (z) */ 0x20, /* 0x7b ({) */ 0x20, /* 0x7c (|) */ 0x20, /* 0x7d (}) */ 0x20, /* 0x7e (~) */ }; #define NO 0 #define YES 1 #define MAX_KEY_LENGTH 15 /* Major number for Linux virtual console devices (/dev/tty*). */ #define LINUX_VC_MAJOR 4 static int keyno = 0; static int keyindex = 0; static char keybuf[1024]; static unsigned char keystr[MAX_KEY_LENGTH * 20]; static int partial = 0; static int key_on_display = 0; /* Hooks that get called when we are going idle and when we stop being idle. */ void (* tty_enter_idle_hook)(); void (* tty_exit_idle_hook)(); void tty_set_last_char_flag(last_char_flag) int last_char_flag; { tty_last_char_flag = last_char_flag; } /* * This function is used to switch between canonical and noncanonical * terminal modes. */ void tty_set_mode(mode) int mode; { if (mode == TTY_NONCANONIC) { #ifdef HAVE_POSIX_TTY new_term = old_term; new_term.c_iflag &= ~(IXON | ICRNL | IGNCR | INLCR | IGNBRK | BRKINT); new_term.c_oflag &= ~OPOST; new_term.c_lflag |= ISIG | NOFLSH; new_term.c_lflag &= ~(ICANON | ECHO); /* I think we will always have these ones: */ new_term.c_cc[VINTR] = key_INTERRUPT; /* Ctrl-G */ new_term.c_cc[VQUIT] = CDISABLE; #ifdef VSTART new_term.c_cc[VSTART] = CDISABLE; /* START (^Q) */ #endif #ifdef VSTOP new_term.c_cc[VSTOP] = CDISABLE; /* STOP (^S) */ #endif new_term.c_cc[VMIN] = 1; new_term.c_cc[VTIME] = 0; /* ... but not always these ones: (in fact I am not sure if I really need to overwrite all these, but just in case... */ #ifdef VERASE new_term.c_cc[VERASE] = CDISABLE; #endif #ifdef VKILL new_term.c_cc[VKILL] = CDISABLE; #endif #ifdef VEOL new_term.c_cc[VEOL] = CDISABLE; #endif #ifdef VEOL2 new_term.c_cc[VEOL2] = CDISABLE; #endif #ifdef VSWTCH new_term.c_cc[VSWTCH] = CDISABLE; #endif #ifdef VSUSP new_term.c_cc[VSUSP] = key_SUSPEND; /* Ctrl-Z */ #endif #ifdef VDSUSP new_term.c_cc[VDSUSP] = CDISABLE; #endif #ifdef VREPRINT new_term.c_cc[VREPRINT] = CDISABLE; #endif #ifdef VDISCARD new_term.c_cc[VDISCARD] = CDISABLE; #endif #ifdef VWERASE new_term.c_cc[VWERASE] = CDISABLE; #endif #ifdef VLNEXT new_term.c_cc[VLNEXT] = CDISABLE; #endif tcsetattr(TTY_OUTPUT, TCSADRAIN, &new_term); ospeed = cfgetospeed(&new_term); #else #ifdef HAVE_SYSTEMV_TTY new_term = old_term; new_term.c_iflag &= ~(IXON | ICRNL | IGNCR | INLCR); new_term.c_oflag = 0; new_term.c_lflag = 0; /* I think we will always have these: */ new_term.c_cc[VINTR] = key_INTERRUPT; /* Ctrl-G */ new_term.c_cc[VQUIT] = CDISABLE; #ifdef VSTART new_term.c_cc[VSTART] = CDISABLE; /* START (^Q) */ #endif #ifdef VSTOP new_term.c_cc[VSTOP] = CDISABLE; /* STOP (^S) */ #endif new_term.c_cc[VMIN] = 1; new_term.c_cc[VTIME] = 0; /* ... but not always these: (in fact I am not sure if I really need to overwrite all these, but just in case... */ #ifdef VERASE new_term.c_cc[VERASE] = CDISABLE; #endif #ifdef VKILL new_term.c_cc[VKILL] = CDISABLE; #endif #ifdef VEOL new_term.c_cc[VEOL] = CDISABLE; #endif #ifdef VEOL2 new_term.c_cc[VEOL2] = CDISABLE; #endif #ifdef VSWTCH new_term.c_cc[VSWTCH] = CDISABLE; #endif #ifdef VSUSP new_term.c_cc[VSUSP] = key_SUSPEND; /* Ctrl-Z */ #endif #ifdef VDSUSP new_term.c_cc[VDSUSP] = CDISABLE; #endif #ifdef VREPRINT new_term.c_cc[VREPRINT] = CDISABLE; #endif #ifdef VDISCARD new_term.c_cc[VDISCARD] = CDISABLE; #endif #ifdef VWERASE new_term.c_cc[VWERASE] = CDISABLE; #endif #ifdef VLNEXT new_term.c_cc[VLNEXT] = CDISABLE; #endif ioctl(TTY_OUTPUT, TCSETAW, &new_term); ospeed = new_term.c_cflag & CBAUD; #else new_arg = old_arg; new_targ = old_targ; new_ltarg = old_ltarg; new_arg.sg_flags = ((old_arg.sg_flags & ~(ECHO | CRMOD | XTABS | ALLDELAY | TILDE)) | CBREAK); new_targ.t_intrc = key_INTERRUPT; /* Ctrl-G */ new_targ.t_quitc = CDISABLE; new_targ.t_stopc = CDISABLE; new_targ.t_startc = CDISABLE; new_targ.t_eofc = CDISABLE; new_targ.t_brkc = CDISABLE; new_ltarg.t_lnextc = CDISABLE; new_ltarg.t_flushc = CDISABLE; new_ltarg.t_werasc = CDISABLE; new_ltarg.t_rprntc = CDISABLE; new_ltarg.t_dsuspc = CDISABLE; /* DSUSPC (delayed SUSPC,^Y) */ new_ltarg.t_suspc = key_SUSPEND; /* Ctrl-Z */ ioctl(TTY_OUTPUT, TIOCSETN, &new_arg); ioctl(TTY_OUTPUT, TIOCSETC, &new_targ); ioctl(TTY_OUTPUT, TIOCSLTC, &new_ltarg); ospeed = new_arg.sg_ospeed; #endif /* HAVE_SYSTEMV_TTY */ #endif /* HAVE_POSIX_TTY */ /* Try to make sure the terminal is not locked. */ #ifdef TCXONC #ifdef __QNX__ { int value = 1; ioctl (TTY_OUTPUT, TCXONC, &value); } #else ioctl(TTY_OUTPUT, TCXONC, 1); #endif #endif #ifndef APOLLO #ifdef TIOCSTART ioctl(TTY_OUTPUT, TIOCSTART, 0); #endif #endif #ifdef HAVE_POSIX_TTY #ifdef TCOON tcflow(TTY_OUTPUT, TCOON); #endif #endif /* Make sure we restore the interrupt character that was in use last time when we used NONCANONICAL mode. */ tty_set_interrupt_char(tty_interrupt_char); } else { #ifdef HAVE_POSIX_TTY tcsetattr(TTY_OUTPUT, TCSADRAIN, &old_term); #else #ifdef HAVE_SYSTEMV_TTY ioctl(TTY_OUTPUT, TCSETAW, &old_term); #else ioctl(TTY_OUTPUT, TIOCSETN, &old_arg); ioctl(TTY_OUTPUT, TIOCSETC, &old_targ); ioctl(TTY_OUTPUT, TIOCSLTC, &old_ltarg); #endif /* HAVE_SYSTEMV_TTY */ #endif /* HAVE_POSIX_TTY */ } tty_mode = mode; } int tty_get_mode() { return tty_mode; } /* * Set the interrupt character. */ void tty_set_interrupt_char(c) int c; { #ifdef HAVE_POSIX_TTY struct termios current_term; tcgetattr(TTY_OUTPUT, ¤t_term); current_term.c_cc[VINTR] = c; current_term.c_cc[VQUIT] = CDISABLE; tcsetattr(TTY_OUTPUT, TCSADRAIN, ¤t_term); #else #ifdef HAVE_SYSTEMV_TTY struct termio current_term; ioctl(TTY_OUTPUT, TCGETA, ¤t_term); current_term.c_cc[VINTR] = c; current_term.c_cc[VQUIT] = CDISABLE; ioctl(TTY_OUTPUT, TCSETAW, ¤t_term); #else struct tchars current_targ; ioctl(TTY_OUTPUT, TIOCGETC, ¤t_targ); current_targ.t_intrc = c; current_targ.t_quitc = CDISABLE; ioctl(TTY_OUTPUT, TIOCSETC, ¤t_targ); #endif /* HAVE_SYSTEMV_TTY */ #endif /* HAVE_POSIX_TTY */ tty_interrupt_char = c; } /* * Flush the tty cache. */ void tty_flush() { int bytes_transferred = 0; while (bytes_transferred < tty_index) { int count = xwrite(TTY_OUTPUT, tty_cache + bytes_transferred, tty_index - bytes_transferred); if (count < 0) break; bytes_transferred += count; } tty_index = 0; } /* * Write a character to the screen. Used by tputs() to output * characters. Actually we are only storing them in a buffer * (tty_cache[]) and flush them later (in tty_flush()). */ int tty_writec(c) int c; { if (tty_index == TTY_CACHE_SIZE) tty_flush(); tty_cache[tty_index++] = (char)c; return 1; } /* * Send the `cl' sequence to the terminal. */ void tty_io_clear() { tputs(TTY_CLEAR_SCREEN, tty_lines, tty_writec); tty_flush(); } /* uses the ti/te capability to signal we are entering/exiting a cursor */ /* addressable app (which saves/restores the screen, at least on xterm) */ void tty_start_cursorapp() { tputs(TTY_START_CURSORAPP,tty_lines-1,tty_writec); tty_flush(); } void tty_end_cursorapp() { tty_io_clear(); tputs(TTY_END_CURSORAPP,tty_lines-1,tty_writec); tty_flush(); } /* * This function is called to restore the canonic mode at exit. It also * clears the screen (or restore it, if possible) and sets the default * attributes. If screen is NULL, there was an error, so don't try to * restore it. */ void tty_end(screen) char *screen; { if (tty_mode == TTY_NONCANONIC) tty_set_mode(TTY_CANONIC); tty_defaults(); #ifdef HAVE_LINUX if(screen && LinuxConsole) tty_put_screen(screen); #endif tty_end_cursorapp(); tty_io_goto(tty_lines, 0); tty_flush(); printf("\n"); } /* * Converts a key sequence from the human readable, '^' based form into a * machine usable form. */ char * tty_key_human2machine(key_seq) unsigned char *key_seq; { unsigned char *first; unsigned char *second; first = second = key_seq; if (tty_kbdmode == TTY_RESTRICTED_INPUT && *key_seq != '^') return NULL; while (*second) { if (*second == '^') { if (*++second) { /* ^G is the interrupt character and ^Z the suspend one. They are not allowed in key sequences. */ if (toupper(*second) == 'G' || toupper(*second) == 'Z') return NULL; *first++ = key_ctrl_table[(*second++ & 0x7F) - ' ']; } else return NULL; } else *first++ = *second++; } *first = 0; return (char *)key_seq; } /* * Converts a partial key sequence from the machine form into the human * readable, '^' based form. */ unsigned char * tty_key_machine2human(key_seq) char *key_seq; { unsigned char *ptr; keystr[0] = '\0'; for (ptr = (unsigned char *)key_seq; *ptr; ptr++) { if (ptr != (unsigned char *)key_seq) strcat((char *)keystr, " "); if (*ptr == key_ESC) strcat((char *)keystr, "escape"); else if (*ptr == ' ') strcat((char *)keystr, "space"); else if (*ptr == key_BACKSPACE) strcat((char *)keystr, "backspace"); else if (*ptr == key_CTRL_SPACE) strcat((char *)keystr, "^space"); else if (iscntrl(*ptr)) { char x[3]; x[0] = '^'; x[1] = *ptr + 'A' - 1; x[2] = '\0'; strcat((char *)keystr, x); } else { char x[2]; x[0] = *ptr; x[1] = '\0'; strcat((char *)keystr, x); } } return (unsigned char *)keystr; } /* * Update the tty screen. */ void tty_update() { int pos, x, y; int tty_io_cursor_x = -1; int tty_io_cursor_y = -1; int last_pos = tty_columns * tty_lines; /* Check if we should display the last character on the screen. */ if (tty_last_char_flag == OFF) last_pos--; /* Make the cursor invisible. */ tty_cursor(OFF); for (pos = 0; pos < last_pos; pos++) if (tty_scr[pos] != tty_prev_scr[pos] || tty_atr[pos] != tty_prev_atr[pos]) { /* Move the cursor to the appropriate position, if necessary. */ y = pos / tty_columns; x = pos % tty_columns; if (x != tty_io_cursor_x || y != tty_io_cursor_y) tty_io_goto(tty_io_cursor_y = y, tty_io_cursor_x = x); /* Output the color sequence, if necessary, then the character. */ tty_io_colors(tty_atr[pos]); tty_writec(tty_scr[pos]); if (++tty_io_cursor_x == tty_columns) { /* Force a call to tty_io_goto() at the next iteration. We don't trust the tty to do it the right way. */ tty_io_cursor_x = 0; tty_io_cursor_y = -1; } } /* Update the latest cursor position. */ tty_io_goto(tty_cursor_y, tty_cursor_x); /* Make the cursor visible again. */ tty_cursor(ON); if (tty_index) tty_flush(); /* Synchronize the screen copies. */ memcpy(tty_prev_scr, tty_scr, tty_columns * tty_lines * sizeof(char)); memcpy(tty_prev_atr, tty_atr, tty_columns * tty_lines * sizeof(char)); } /* * Add a string to the tty cache. We implicitly assume that there will * be no attempt to write more than TTY_CACHE_SIZE character in a single * call. */ static int tty_writes(s, len) char *s; int len; { if (tty_index + len >= TTY_CACHE_SIZE) tty_flush(); memcpy(tty_cache + tty_index, s, len); tty_index += len; return len; } /* * Write a string to the screen, at the current cursor position. * If the string is too long to fit between the current cursor * position and the end of the line, it is truncated (i.e. it doesn't * wrap arround). Return the number of characters written. */ int tty_puts(buf, length) char *buf; int length; { int tty_offset; int x = tty_cursor_x; tty_cursor_x += length; if (x >= tty_columns) return 0; if (tty_cursor_y >= tty_lines) return 0; /* If the string doesn't fit completely, adjust the length. */ if (x + length > tty_columns) length = tty_columns - x; tty_offset = (tty_cursor_y * tty_columns) + x; memcpy(tty_scr + tty_offset, buf, length); memset(tty_atr + tty_offset, tty_current_attribute, length); return length; } /* * Write a character to the screen. */ int tty_putc(c) int c; { char character = c; return tty_puts(&character, sizeof(char)); } /* * Read data from the terminal. */ int tty_read(buf, length) char *buf; int length; { int bytes; tty_update(); if (tty_enter_idle_hook) (*tty_enter_idle_hook)(); bytes = xread(TTY_INPUT, buf, length); if (tty_exit_idle_hook) (*tty_exit_idle_hook)(); return bytes; } /* * Clear the screen using the current color attributes. When the * Linux console receives the 'cl' (clear screen) escape sequence, it * clears the screen using the current color attributes, while all the * xterms I've seen seem not to do so. Therefore, we won't rely on * this feature under Linux, to avoid potential problems, because I * don't know which approach is correct. */ void tty_clear() { tty_io_clear(); memset(tty_scr, '\0', tty_lines*tty_columns * sizeof(unsigned char)); memset(tty_atr, '\0', tty_lines*tty_columns * sizeof(unsigned char)); memset(tty_prev_scr, '\0', tty_lines*tty_columns * sizeof(unsigned char)); memset(tty_prev_atr, '\0', tty_lines*tty_columns * sizeof(unsigned char)); tty_cursor_x = 0; tty_cursor_y = 0; } /* * Fill the terminal screen with spaces & the current attribute. */ void tty_fill() { memset(tty_scr, ' ', tty_lines * tty_columns * sizeof(unsigned char)); memset(tty_atr, tty_current_attribute, tty_lines * tty_columns * sizeof(unsigned char)); tty_touch(); } /* * Touch the tty, getting rid of any possible optimization. The * current content of the screen will be completely different at * update time so that the entire screen will be updated. */ void tty_touch() { memset(tty_prev_scr, '\0', tty_lines*tty_columns * sizeof(unsigned char)); } /* * Move the cursor. */ static void tty_io_goto(y, x) int y, x; { /* If the 'ms' flag is present, reset all the attributes before moving the cursor. */ if (TTY_MS_FLAG == 0) tty_defaults(); /* Sanity checking. */ if (x < 0 || x >= tty_columns || y < 0 || y >= tty_lines) tputs(tgoto(TTY_CURSOR_MOVE, tty_columns - 1, tty_lines - 1), 1, tty_writec); else tputs(tgoto(TTY_CURSOR_MOVE, x, y), 1, tty_writec); } /* * Set the foreground color. Use the ANSI color sequence where possible or * tty_reverse() for monochrome terminals. */ static void tty_io_foreground(color) int color; { char str[16]; if (fg_cache == VALID_CACHE && color == TTY_IO_FOREGROUND) return; if (AnsiColors == ON) { memcpy(str, ansi_foreground, sizeof(ansi_foreground)); str[3] += color; tty_writes(str, sizeof(ansi_foreground)); } else tty_io_reversevid(color != WHITE); fg_cache = VALID_CACHE; TTY_IO_SET_FOREGROUND(color); } /* * Set the background color. Use the ANSI color sequence where possible or * tty_reverse() for monochrome terminals. */ static void tty_io_background(color) int color; { char str[16]; if (bg_cache == VALID_CACHE && color == TTY_IO_BACKGROUND) return; if (AnsiColors == ON) { memcpy(str, ansi_background, sizeof(ansi_background)); str[3] += color; tty_writes(str, sizeof(ansi_background)); } else tty_io_reversevid(color != BLACK); bg_cache = VALID_CACHE; TTY_IO_SET_BACKGROUND(color); } /* * Set the brightness status. See the comment below. */ static void tty_io_brightness(status) int status; { if (br_cache == VALID_CACHE && status == TTY_IO_BRIGHTNESS) return; if (status == ON) { if (TTY_BRIGHT_ON) tputs(TTY_BRIGHT_ON, 1, tty_writec); } else { if (TTY_ATTRIBUTES_OFF) tputs(TTY_ATTRIBUTES_OFF, 1, tty_writec); fg_cache = INVALID_CACHE; bg_cache = INVALID_CACHE; TTY_IO_SET_BRIGHTNESS(OFF); /* * There is no terminal capability to turn the brightness off (or * the bold mode off). We are using the 'me' capability (where * available) which turns off all attributes so we must restore * the reverse status after that. * * There is no need to restore the foreground & background colors * because we've always put tty_io_brightness(status) _before_ * tty_io_foreground(color) or tty_io_background(color). */ if (TTY_IO_REVERSEVID == ON) { rv_cache = INVALID_CACHE; tty_io_reversevid(ON); } } br_cache = VALID_CACHE; TTY_IO_SET_BRIGHTNESS(status); } /* * Set the reverse video status. This is only used internally by the * code in this file therefore it is declared 'static'. */ static void tty_io_reversevid(status) int status; { if (rv_cache == VALID_CACHE && status == TTY_IO_REVERSEVID) return; if (status == ON) { if (TTY_REVERSE_ON) tputs(TTY_REVERSE_ON, 1, tty_writec); } else { if (TTY_ATTRIBUTES_OFF) tputs(TTY_ATTRIBUTES_OFF, 1, tty_writec); fg_cache = INVALID_CACHE; bg_cache = INVALID_CACHE; TTY_IO_SET_REVERSEVID(OFF); /* Same comment as in tty_brightness(). */ if (TTY_IO_BRIGHTNESS == ON) { br_cache = INVALID_CACHE; tty_io_brightness(ON); } } rv_cache = VALID_CACHE; TTY_IO_SET_REVERSEVID(status); } /* * Set the brightness, foreground and background altogether. */ static void tty_io_colors(attributes) int attributes; { tty_io_brightness(_TTY_BRIGHTNESS(attributes)); tty_io_foreground(_TTY_FOREGROUND(attributes)); tty_io_background(_TTY_BACKGROUND(attributes)); } /* * Move the cursor. */ void tty_goto(y, x) int y, x; { tty_cursor_y = y; tty_cursor_x = x; } /* * Return the current coordinates of the cursor (line/column). */ void tty_get_cursor(y, x) int *y, *x; { *y = tty_cursor_y; *x = tty_cursor_x; } /* * Set the foreground color. */ void tty_foreground(color) int color; { TTY_SET_FOREGROUND(color); } /* * Set the background color. */ void tty_background(color) int color; { TTY_SET_BACKGROUND(color); } /* * Set the brightness status. See the comment below. */ void tty_brightness(status) int status; { TTY_SET_BRIGHTNESS(status); } /* * Set the reverse video status. This is only used internally by the * code in this file therefore it is declared 'static'. */ void tty_reversevid(status) int status; { TTY_SET_REVERSEVID(status); } /* * Set the brightness, foreground and background all together. */ void tty_colors(brightness, foreground, background) int brightness, foreground, background; { tty_brightness(brightness); tty_foreground(foreground); tty_background(background); } /* * Beep :-) */ void tty_beep() { tty_writec(7); tty_flush(); } /* * Set the cursor status (where possible). Make it invisible during screen * refreshes and restore it afterward. */ void tty_cursor(status) int status; { if (status) { if (TTY_CURSOR_ON) tputs(TTY_CURSOR_ON, 1, tty_writec); } else { if (TTY_CURSOR_OFF) tputs(TTY_CURSOR_OFF, 1, tty_writec); } } /* * Store the software terminal status in a tty_status_t structure. */ void tty_save(status) tty_status_t *status; { *status = tty_current_attribute; } /* * Restore the software terminal status from a tty_status_t structure. */ void tty_restore(status) tty_status_t *status; { tty_current_attribute = *status; } /* * Restore the terminal to its default state. */ void tty_defaults() { if (AnsiColors == ON) tty_writes(ansi_defaults, sizeof(ansi_defaults)); if (TTY_ATTRIBUTES_OFF) tputs(TTY_ATTRIBUTES_OFF, 1, tty_writec); fg_cache = INVALID_CACHE; bg_cache = INVALID_CACHE; br_cache = INVALID_CACHE; rv_cache = INVALID_CACHE; } /* * Extract the first key in the buffer. If the 8th bit is set, return * an ESC char first, then the key without the 8th bit. * * FIXME: It seems that the 8th bit can be used for parity as well. * This case is not handled yet. It should be configurable. */ static int tty_extract_key() { int key = keybuf[keyindex]; if (key & 0x80) { keybuf[keyindex] &= 0x7F; return key_ESC; } keyno--; keyindex++; return key; } /* * Get a character from the terminal. For better performance on * highly loaded systems, read all the data available. */ int tty_getc() { service_pending_signals(); if (keyno) return tty_extract_key(); /* No interrupt/quit character. */ tty_set_interrupt_char(-1); /* Allow signals to suspend/resize git. */ signals(ON); keyindex = 0; while ((keyno = tty_read(keybuf, 1024)) < 0) ; /* Prevent signals from suspending/resizing git. */ signals(OFF); /* Restore ^G as the interrupt/quit character. */ tty_set_interrupt_char(key_INTERRUPT); return keyno ? tty_extract_key() : -1; } /* * Insert a key sequence into the list. */ void tty_key_list_insert_sequence(key, key_seq, aux_data) tty_key_t **key; unsigned char *key_seq; void *aux_data; { tty_key_t *new_key; new_key = (tty_key_t *)xmalloc(sizeof(tty_key_t)); new_key->key_seq = (unsigned char *)xstrdup((char *)key_seq); new_key->aux_data = aux_data; new_key->next = *key; *key = new_key; } /* * Parse the key list, inserting the new key sequence in the proper * position. */ void tty_key_list_insert(key_seq, aux_data) unsigned char *key_seq; void *aux_data; { static tty_key_t **key = NULL; if (*key_seq == 0) return; /* bad key sequence ! */ /* Try to optimize by checking if the current entry should be added after the current position. Avoid re-parsing the entire list if so. */ if (key == NULL || strcmp((char *)key_seq, (char *)(*key)->key_seq) <= 0) key = &key_list_head; for (; *key; key = &(*key)->next) if (strcmp((char *)key_seq, (char *)(*key)->key_seq) <= 0) { tty_key_list_insert_sequence(key, key_seq, aux_data); return; } tty_key_list_insert_sequence(key, key_seq, aux_data); } /* * Force the next key search to start from the begining of the list. */ void tty_key_search_restart() { current_key = key_list_head; } /* * Incremental searches a key in the list. Returns a pointer to the first * sequence that matches, -1 if there is no match and NULL if there can * still be a match. */ tty_key_t * tty_key_search(key_seq) char *key_seq; { int cmp; if (current_key == NULL) return NULL; for (; current_key; current_key = current_key->next) { cmp = strcmp(key_seq, (char *)current_key->key_seq); if (cmp == 0) return current_key; if (cmp < 0) break; } if (current_key == NULL || strncmp(key_seq, (char *)current_key->key_seq, strlen(key_seq)) != 0) return (tty_key_t *)-1; else return NULL; } #if 0 /* * Delete a key from the list. Don't remove this function, God only knows * when I'm gonna need it... */ void tty_key_list_delete() { tty_key_t *key, *next_key; for (key = key_list_head; key; key = next_key) { next_key = key->next; xfree(key->key_seq); xfree(key); } } #endif /* * Print the key sequence on the last line of the screen. */ void tty_key_print(key_seq) char *key_seq; { tty_status_t tty_status; char *typed = "Keys typed so far: "; char *incomplete = " "; char *spaces; tty_save(&tty_status); tty_goto(tty_lines - 1, 0); tty_background(WHITE); tty_foreground(BLACK); spaces = xmalloc(tty_columns+1); memset(spaces, ' ', tty_columns); spaces[tty_columns] = '\0'; tty_puts(spaces, tty_columns); xfree(spaces); tty_goto(tty_lines - 1, 0); tty_key_machine2human(key_seq); tty_puts(typed, strlen(typed)); tty_puts((char *)keystr, strlen((char *)keystr)); tty_puts(incomplete, strlen(incomplete)); tty_update(); tty_restore(&tty_status); } /* * Get the first key available, returning also the repeat count, that * is, the number of times the key has been pressed. These feature is * mainly used by the calling routines to perform optimizations. For * example, if you press the down arrow several times, the caller can * display only the final position, saving a lot of time. If you have * ever worked with git on highly loaded systems, I'm sure you know what * I mean. * * If tty_get_key() returns NULL, the key sequence is invalid. */ tty_key_t * tty_get_key(repeat_count) int *repeat_count; { int i, c; tty_key_t *key = NULL; while ((c = tty_getc()) == -1) ; if (repeat_count) *repeat_count = 1; /* Handle ^SPC. */ if (c == 0) c = 0xff; if (tty_kbdmode == TTY_RESTRICTED_INPUT) { if (c == '\n' || c == '\r') c = key_ENTER; if (isprint(c) || c == key_INTERRUPT) { default_key.key_seq[0] = c; default_key.key_seq[1] = '\0'; return &default_key; } } partial = 0; key_on_display = 0; tty_key_search_restart(); for (i = 0; i < MAX_KEY_LENGTH; i++) { /* Kludge to handle brain-damaged key sequences. If a 0 (^SPC) is found, change it into 0xff. I don't know how smart this is, but right know I don't feel like doing it otherwise. */ if (c == 0) c = 0xff; tty_key_seq[i] = c; tty_key_seq[i + 1] = 0; key = tty_key_search((char *)tty_key_seq); if (key == (tty_key_t *)-1) { alarm(1); partial = 0; return NULL; } if (key) { if (partial) { /* tty_key_print((char *)tty_key_seq); */ /* tty_update(); */ /* Small delay for displaying the selected sequence. */ /* FIXME: 1 second is way too much! */ /* sleep(1); */ } break; } if (keyno == 0) { /* Schedule an alarm in 1 second, to display the key sequence if still incomplete by that time. */ if (key_on_display) tty_key_print((char *)tty_key_seq); else alarm(1); partial = 1; } while ((c = tty_getc()) == -1) ; } if (i == MAX_KEY_LENGTH) { alarm(1); partial = 0; return NULL; } if (repeat_count) while (keyno > i && (memcmp(tty_key_seq, &keybuf[keyindex], i + 1) == 0)) { keyindex += i + 1; keyno -= i + 1; (*repeat_count)++; } alarm(1); partial = 0; return key; } void tty_key_print_async() { if (partial) { tty_key_print((char *)tty_key_seq); key_on_display = 1; } } char * tty_get_previous_key_seq() { return (char *)tty_key_seq; } #define columns_ok(x) (((x) > 0) && ((x) <= MAX_TTY_COLUMNS)) #define lines_ok(x) (((x) > 0) && ((x) <= MAX_TTY_LINES)) /* * Retrieve the screen size. The default is to use the number of * lines and columns specified in the environment. If the values are * not acceptable, default to the value returned by the winsz ioctl() * call. If these ones are not valid (or the ioctl() call to get the * window size is not supported), just default to the values specified * in the termcap description. If this fails too, default to 80x24. * Note that we try to get the best value separately for lines and for * columns. */ void tty_resize() { char *env; char buf[32]; int shell_lines = 0, shell_columns = 0; int termcap_lines = 0, termcap_columns = 0; #ifdef HAVE_WINSZ struct winsize winsz; int winsz_lines = 0, winsz_columns = 0; #endif /* HAVE_WINSZ */ #ifdef HAVE_WINSZ #if defined TIOCGSIZE && !defined TIOCGWINSZ #define TIOCGWINSZ TIOCGSIZE #endif if (ioctl(TTY_OUTPUT, TIOCGWINSZ, &winsz) == 0) if (winsz.ws_col && winsz.ws_row) { winsz_columns = winsz.ws_col; winsz_lines = winsz.ws_row; } #endif /* HAVE_WINSZ */ if ((env = getenv("COLUMNS"))) sscanf(env, "%d", &shell_columns); if ((env = getenv("LINES"))) sscanf(env, "%d", &shell_lines); termcap_columns = TTY_COLUMNS; termcap_lines = TTY_LINES; #ifdef HAVE_WINSZ if (columns_ok(winsz_columns)) tty_columns = winsz_columns; else { #endif if (columns_ok(shell_columns)) tty_columns = shell_columns; else if (columns_ok(termcap_columns)) tty_columns = termcap_columns; else tty_columns = 80; #ifdef HAVE_WINSZ } #endif #ifdef HAVE_WINSZ if (lines_ok(winsz_lines)) tty_lines = winsz_lines; else { #endif if (lines_ok(shell_lines)) tty_lines = shell_lines; else if (lines_ok(termcap_lines)) tty_lines = termcap_lines; else tty_lines = 24; #ifdef HAVE_WINSZ } #endif assert(tty_lines != 0); assert(tty_columns != 0); /* Update the LINES & COLUMNS environment variables to reflect the change in the window size. This is important in order to avoid passing children incorrect environment values. We only do this when we trust the values we've got (i.e. when we got them through TIOCGWINSZ). Thanks to xax@roedu.net for the suggestion. */ sprintf(buf, "%d", tty_lines); xsetenv("LINES", buf); sprintf(buf, "%d", tty_columns); xsetenv("COLUMNS", buf); /* Resize the tty buffers. */ if (tty_scr) xfree(tty_scr); if (tty_atr) xfree(tty_atr); if (tty_prev_scr) xfree(tty_prev_scr); if (tty_prev_atr) xfree(tty_prev_atr); tty_scr = (unsigned char *)xcalloc( tty_columns * tty_lines, sizeof(unsigned char)); tty_atr = (unsigned char *)xcalloc( tty_columns * tty_lines, sizeof(unsigned char)); tty_prev_scr = (unsigned char *)xcalloc( tty_columns * tty_lines, sizeof(unsigned char)); tty_prev_atr = (unsigned char *)xcalloc( tty_columns * tty_lines, sizeof(unsigned char)); #ifdef SIGWINCH /* We need to pass the resize command to the parent process (usually the shell). */ /* FIXME: This doesn't work and I haven't got the time to look into it... */ /*kill(getppid(), SIGWINCH);*/ #endif } #ifdef HAVE_LINUX /* * Read and write the screen contents via a Linux virtual console. * Returns 0 on failure, non-zero otherwise. Handle both /dev/vcsaX * and /dev/vcsX. op specifies the operation to be performed: VCS_READ * or VCS_WRITE. We check first for /dev/vcs?X since it makes debugging * easier (using /de/vcsa0 when debugging dumps the screen on the * debugger's console; not funny). */ int vcs_io(buf, op) char *buf; int op; { ssize_t (*fn)(); int vcsfd, flag; char vcs_name[16]; char vcsa_name[16]; strcpy(vcs_name, "/dev/vcsXX"); strcpy(vcsa_name, "/dev/vcsaXX"); if (op == VCS_READ) { flag = O_RDONLY; fn = read; } else { flag = O_WRONLY; fn = write; if (vcs_is_monochrome) goto monochrome; } vcs_is_monochrome = 0; /* First attempt: /dev/vcsaX. */ vcsa_name[9] = tty_device[8]; vcsa_name[10] = tty_device[9]; vcsfd = open(vcsa_name, flag); if (vcsfd != -1) { vcsa_label: (*fn)(vcsfd, buf, 4 + tty_lines * tty_columns * 2); close(vcsfd); if (op == VCS_WRITE) { tty_io_goto(buf[3], buf[2]); tty_flush(); } return 1; } /* Second attempt: /dev/vcsa0. */ vcsa_name[9] = '0'; vcsa_name[10] = '\0'; vcsfd = open(vcsa_name, flag); if (vcsfd != -1) goto vcsa_label; monochrome: /* We failed to access a /dev/vcsa* device. */ vcs_is_monochrome = 1; /* This is important in order to clear the screen attributes. */ if (op == VCS_WRITE) tty_clear(); /* Third attempt: /dev/vcsX (B/W). */ vcs_name[8] = tty_device[8]; vcs_name[9] = tty_device[9]; vcsfd = open(vcs_name, flag); if (vcsfd != -1) { vcs_label: (*fn)(vcsfd, buf, 4 + tty_lines * tty_columns); close(vcsfd); /* Unfortunately, the b/w devices do not provide the 4 bytes header with screen size & cursor position information. */ if (op == VCS_WRITE) { tty_io_goto(tty_lines - 1, 0); tty_flush(); } return 1; } /* Fourth attempt: /dev/vcs0 (B/W). */ vcs_name[8] = '0'; vcs_name[9] = '\0'; vcsfd = open(vcs_name, flag); if (vcsfd != -1) goto vcs_label; return 0; } #endif /* * Dump the screen. Only used in Linux if the terminal is a virtual * console. */ void tty_get_screen(buf) char *buf; { #ifdef HAVE_LINUX if (LinuxConsole) vcs_read_ok = vcs_io(buf, VCS_READ); #else buf = NULL; #endif /* HAVE_LINUX */ } /* * Restore the screen. If the terminal is not a Linux virtual console, just * restore it to the default state. */ void tty_put_screen(buf) char *buf; { tty_defaults(); #ifdef HAVE_LINUX if (LinuxConsole) { /* If we were unable to read from /dev/vcs*, then we should not try to restore it. */ if (vcs_read_ok) { tty_touch(); /* We might have the permission to read the contents of the virtual console, but not the permission to write it. */ if (vcs_io(buf, VCS_WRITE) == 0) tty_clear(); else memset(tty_scr, '\0', tty_lines * tty_columns * sizeof(unsigned char)); } else tty_clear(); } else tty_clear(); #else /* !HAVE_LINUX */ tty_clear(); buf = NULL; #endif /* !HAVE_LINUX */ } /* * Get the color index from the colors[] index table. */ int tty_get_color_index(colorname) char *colorname; { int i; for (i = 0; i < 10; i++) if (strcmp(colors[i], colorname) == 0) return (i < 8) ? i : (i - 8); return -1; } /* * Get the capability of a given termcap symbol. Return NULL if there * is no capability for it. */ char * tty_get_symbol_key_seq(symbol) char *symbol; { int i; for (i = TTY_FIRST_SYMBOL_KEY; i < TTY_CAPABILITIES_USED; i++) if (strcmp(tty_capability[i].symbol, symbol) == 0) return tty_capability[i].string; return NULL; } /* * Get the entire set of required termcap/terminfo capabilities. It performs * consistency checkings trying to recover as well as possible. */ void tty_get_capabilities() { #ifdef HAVE_LINUX struct stat statbuf; #endif /* HAVE_LINUX */ char *capability_buf, *tmp; int err, i, term_errors = 0; char *termtype = getenv("TERM"); #ifdef HAVE_LINUX fstat(TTY_OUTPUT, &statbuf); /* dropped test for minor <= 8 - linux now has unlimited VCs */ if ((statbuf.st_rdev >> 8) == LINUX_VC_MAJOR) LinuxConsole = 1; else LinuxConsole = 0; #endif /* HAVE_LINUX */ if (termtype == NULL) { fprintf(stderr, "%s: can't find the TERM environment variable, ", g_program); goto switch_to_vt100; } if (strlen(termtype) > 63) { fprintf(stderr, "%s: the TERM environment variable is too long, ", g_program); switch_to_vt100: fprintf(stderr, "trying vt100 ...\n"); termtype = vt100; } retry: #ifdef HAVE_LINUX err = tgetent(NULL, termtype); #else err = tgetent(term_buf, termtype); #endif if (err == -1) { fprintf(stderr, "%s: can't find the %s database.\n", g_program, term_database); fprintf(stderr, "%s: check your %s environment variable ...\n", g_program, term_env); exit(1); } if (err == 0) { fprintf(stderr, "%s: can't find the terminal type %s in the %s database.\n", g_program, termtype, term_database); if (strcmp(termtype, "iris-ansi") == 0) { fprintf(stderr, "%s: trying ansi...\n", g_program); termtype = "ansi"; goto retry; } if (tty_is_xterm(termtype)) { fprintf(stderr, "%s: trying xterm...\n", g_program); termtype = "xterm"; goto retry; } if (strcmp(termtype, "vt220") == 0 || strcmp(termtype, "vt320") == 0) { fprintf(stderr, "%s: trying vt100...\n", g_program); termtype = "ansi"; goto retry; } exit(1); } tty_type = xstrdup(termtype); capability_buf = xmalloc(2048); tmp = tgetstr(TTY_PAD_CHAR_NAME, &capability_buf); PC = tmp ? *tmp : 0; BC = tgetstr(TTY_LEFT_ONE_SPACE_NAME, &capability_buf); UP = tgetstr(TTY_UP_ONE_LINE_NAME, &capability_buf); if (BC == NULL || UP == NULL) BC = UP = NULL; TTY_ATTRIBUTES_OFF = tgetstr(TTY_ATTRIBUTES_OFF_NAME, &capability_buf); TTY_BRIGHT_ON = tgetstr(TTY_BRIGHT_ON_NAME, &capability_buf); TTY_REVERSE_ON = tgetstr(TTY_REVERSE_ON_NAME, &capability_buf); if (TTY_ATTRIBUTES_OFF == NULL) TTY_REVERSE_ON = TTY_BRIGHT_ON = NULL; TTY_STANDOUT_ON = tgetstr(TTY_STANDOUT_ON_NAME, &capability_buf); if (TTY_STANDOUT_ON == NULL) { TTY_STANDOUT_ON = NULL; TTY_MS_FLAG = 0; } else { /* Use standout instead of reverse video whenever possible. */ TTY_REVERSE_ON = TTY_STANDOUT_ON; TTY_MS_FLAG = tgetflag(TTY_MS_FLAG_NAME); } /* Check for magic-cookie terminals. Not supported yet. */ TTY_MAGIC_COOKIE = tgetnum(TTY_MAGIC_COOKIE_NAME); if (TTY_MAGIC_COOKIE >= 0) TTY_ATTRIBUTES_OFF = TTY_REVERSE_ON = TTY_BRIGHT_ON = NULL; /* Try to figure out the number of lines and columns as specified in the termcap description. */ TTY_COLUMNS = tgetnum(TTY_COLUMNS_NAME); TTY_LINES = tgetnum(TTY_LINES_NAME); TTY_CURSOR_OFF = tgetstr(TTY_CURSOR_OFF_NAME, &capability_buf); TTY_CURSOR_ON = tgetstr(TTY_CURSOR_ON_NAME, &capability_buf); if (TTY_CURSOR_OFF == NULL || TTY_CURSOR_ON == NULL) TTY_CURSOR_ON = TTY_CURSOR_OFF = NULL; TTY_CLEAR_SCREEN = tgetstr(TTY_CLEAR_SCREEN_NAME, &capability_buf); TTY_CURSOR_MOVE = tgetstr(TTY_CURSOR_MOVE_NAME, &capability_buf); TTY_START_CURSORAPP = tgetstr(TTY_START_CURSORAPP_NAME, &capability_buf); TTY_END_CURSORAPP = tgetstr(TTY_END_CURSORAPP_NAME, &capability_buf); for (i = TTY_FIRST_SYMBOL_KEY; i < TTY_CAPABILITIES_USED; i++) tty_capability[i].string = tgetstr(tty_capability[i].name, &capability_buf); for (i = 0; i < TTY_CAPABILITIES_USED; i++) if (tty_capability[i].string == NULL) { if (tty_capability[i].required) { term_errors++; fprintf(stderr, "%s: can't find the '%s' terminal capability.\n", g_program, tty_capability[i].name); } else { /* If this capability does not exist but its presence is not mandatory then make it be the null string. */ tty_capability[i].string = ""; } } if (term_errors) { fprintf(stderr, "%s: %d errors. Your terminal is too dumb :-< .\n", g_program, term_errors); exit(1); } } /* * Initialize the tty driver. */ void tty_init(kbd_mode) int kbd_mode; { /* Fail if stdin or stdout are not real terminals. */ if (!isatty(TTY_INPUT) || !isatty(TTY_OUTPUT)) { fprintf(stderr, "%s: only stderr can be redirected.\n", g_program); exit(1); } if ((tty_device = ttyname(1)) == NULL) { fprintf(stderr, "%s: can't get terminal name.\n", g_program); exit(1); } /* Store the terminal settings in old_term. it will be used to restore them later. */ #ifdef HAVE_POSIX_TTY tcgetattr(TTY_OUTPUT, &old_term); #else #ifdef HAVE_SYSTEMV_TTY ioctl(TTY_OUTPUT, TCGETA, &old_term); #else ioctl(TTY_OUTPUT, TIOCGETP, &old_arg); ioctl(TTY_OUTPUT, TIOCGETC, &old_targ); ioctl(TTY_OUTPUT, TIOCGLTC, &old_ltarg); #endif /* HAVE_SYSTEMV_TTY */ #endif /* HAVE_POSIX_TTY */ default_key.key_seq = tty_key_seq = (unsigned char *)xmalloc(64); default_key.aux_data = NULL; default_key.next = NULL; tty_kbdmode = kbd_mode; tty_device_length = strlen(tty_device); tty_get_capabilities(); } /* * Update the title of xterm-like X terminal emulators. */ void tty_update_title(string) char *string; { if (tty_is_xterm(tty_type)) { size_t len = strlen(string); char *temp = xmalloc(128 + len + 1); char *printable_string = xstrdup(string); toprintable(printable_string, len); sprintf(temp, "%c]2;%s - %s%c", 0x1b, PRODUCT, printable_string, 0x07); /* I don't know what can be considered a resonable limit here, I just arbitrarily chosed to truncate the length of the title to twice the number of columns. Longer strings seem to make fvwm2 issue error messages. */ if (128 + (int)len > 2 * tty_columns) { temp[2 * tty_columns ] = 0x07; temp[2 * tty_columns + 1] = '\0'; } xwrite(TTY_OUTPUT, temp, strlen(temp)); xfree(printable_string); xfree(temp); fflush(stdout); } } static int tty_is_xterm(term) char *term; { if (strncmp(term, "xterm", 5) == 0 || strncmp(term, "rxvt", 4) == 0 || strncmp(term, "iris-ansi", 9) == 0 || strcmp(term, "aixterm") == 0 || strcmp(term, "Eterm") == 0 || strcmp(term, "dtterm") == 0) { return 1; } return 0; } gnuit-4.9.5/src/misc.c0000644000175000017500000003655011146671376011513 00000000000000/* misc.c -- Miscelaneous functions used in git/gitps/gitview. */ /* Copyright (C) 1993-2000, 2006-2007 Free Software Foundation, Inc. This file is part of gnuit. gnuit 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 3 of the License, or (at your option) any later version. gnuit 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, see http://www.gnu.org/licenses/. */ /* Written by Tudor Hulubei and Andrei Pitis. */ #ifdef HAVE_CONFIG_H #include #endif #include #ifdef HAVE_STDLIB_H #include #else /* !HAVE_STDLIB_H */ #include "ansi_stdlib.h" #endif /* !HAVE_STDLIB_H */ #include #include #include #ifdef HAVE_STDDEF_H #include #endif #include #ifdef HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ #include "xstring.h" #include "xmalloc.h" #include "configure.h" #include "file.h" #include "tty.h" #include "misc.h" static char SYSTEM_CONFIGFILE_PREFIX[] = "/gnuitrc."; static char USER_CONFIGFILE_PREFIX[] = "/.gnuitrc."; static char OLD_USER_CONFIGFILE_PREFIX[] = "/.gitrc."; static char *termdir; static char *bindir; char *login_name; char *day_name[] = { "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" }; char *month_name[] = { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" }; /* The pointer to the head of the file type attributes list. */ file_type_info_t *fti_head = NULL; extern void fatal PROTO ((char *)); void compute_directories() { char *prefix_relative_bin_dir = "/bin"; char *prefix_relative_term_dir = "/share/gnuit"; bindir = xmalloc(strlen(PREFIX) + strlen(prefix_relative_bin_dir) + 1); sprintf(bindir, "%s%s", PREFIX, prefix_relative_bin_dir); termdir = xmalloc(strlen(PREFIX) + strlen(prefix_relative_term_dir) + 1); sprintf(termdir, "%s%s", PREFIX, prefix_relative_term_dir); } /* * Add $(bindir) to the PATH environment variable so that git will be * able to find its auxiliary programs/scripts even when that * directory is not in the PATH. I don't think it is worth searching * $(bindir) in the PATH first... */ void update_path() { char *path = getenv("PATH"); if (path == NULL) xsetenv("PATH", bindir); else { char *new_value = xmalloc(strlen(path) + 1 + strlen(bindir) + 1); sprintf(new_value, "%s:%s", path, bindir); xsetenv("PATH", new_value); xfree(new_value); } } void display_exit_message(signame) char *signame; { struct tm *time = get_local_time(); fprintf(stderr, "%s %d %2d:%02d:%02d %s[%d]: exiting on %s signal\n", month_name[time->tm_mon], time->tm_mday, time->tm_hour, time->tm_min, time->tm_sec, g_program, (int)getpid(), signame); } extern void clean_up PROTO (()); RETSIGTYPE fatal_signal(signum) int signum; { clean_up(); switch (signum) { case SIGTERM: display_exit_message("TERM"); break; case SIGHUP: case SIGINT: display_exit_message((signum == SIGHUP) ? "HUP" : "INT"); break; case SIGSEGV: display_exit_message("SEGV"); goto ask_report; default: fprintf(stderr, "%s: got a stupid signal (%d). Unless it was a joke ...\n", g_program, signum); ask_report: fprintf(stderr, "%s: please report to gnuit-dev@gnu.org\n", g_program); break; } exit(signum); } void configuration_fatal_error(configfile) char *configfile; { fprintf(stderr, "%s: installation problem: \n", g_program); fprintf(stderr, "%s: cannot find configuration file '%s'.\n\n", g_program, configfile); } void configuration_warning(configfile) char *configfile; { fprintf(stderr, "\n%s: Cannot open configuration file '%s'.\n", g_program, configfile); fprintf(stderr, "%s: See the info documentation for details.\n", g_program); fprintf(stderr, "%s: If the TERM environment variable is, say, vt102, your\n", g_program); fprintf(stderr, "%s: configuration file name is 'gnuitrc.vt102'.\n", g_program); fprintf(stderr, "%s: You can copy a configuration file in your home directory\n", g_program); fprintf(stderr, "%s: and modify it in order to overwrite the default one.\n", g_program); fprintf(stderr, "%s: Add a dot at the start of the file, e.g. '~/.gnuitrc.xterm'.\n", g_program); fprintf(stderr, "%s: Try modifying 'gnuitrc.generic'...\n\n", g_program); } void common_configuration_init() { /* Load the global gnuitrc.common file. */ char *configfile = xmalloc(strlen(termdir) + 1 + strlen(SYSTEM_CONFIGFILE_PREFIX) + sizeof("common") + 1); strcpy(configfile, termdir); strcat(configfile, SYSTEM_CONFIGFILE_PREFIX); strcat(configfile, "common"); if (configuration_init(configfile) == 0) { /* Give up if global gnuitrc.common is not found. */ configuration_fatal_error(configfile); exit(1); } } int specific_configuration_init() { char *configfile = xmalloc(strlen(g_home) + 1 + strlen(USER_CONFIGFILE_PREFIX) + strlen(tty_type) + 1); strcpy(configfile, g_home); strcat(configfile, USER_CONFIGFILE_PREFIX); strcat(configfile, tty_type); if (configuration_init(configfile) == 0) { xfree(configfile); configfile = xmalloc(strlen(g_home) + 1 + strlen(OLD_USER_CONFIGFILE_PREFIX) + strlen(tty_type) + 1); strcpy(configfile, g_home); strcat(configfile, OLD_USER_CONFIGFILE_PREFIX); strcat(configfile, tty_type); if (configuration_init(configfile) == 0) { xfree(configfile); configfile = xmalloc(strlen(termdir) + 1 + strlen(SYSTEM_CONFIGFILE_PREFIX) + strlen(tty_type) + 1); strcpy(configfile, termdir); strcat(configfile, SYSTEM_CONFIGFILE_PREFIX); strcat(configfile, tty_type); if (configuration_init(configfile) == 0) { configuration_warning(configfile); xfree(configfile); configfile = xmalloc(strlen(termdir) + 1 + strlen(SYSTEM_CONFIGFILE_PREFIX) + sizeof("generic") + 1); strcpy(configfile, termdir); strcat(configfile, SYSTEM_CONFIGFILE_PREFIX); strcat(configfile, "generic"); if (configuration_init(configfile) == 0) { configuration_fatal_error(configfile); exit(1); } return 0; } } } xfree(configfile); return 1; } void use_section(section) char *section; { char *gitfmprefix="[GITFM-"; char *gitprefix="[GIT-"; if (configuration_section(section) == -1) { /* If we are looking for [GITFM-something, accept [GIT-something for backwards compatibility */ if(strncmp(section,gitfmprefix,strlen(gitfmprefix)) == 0) { char *newsection=xmalloc(strlen(gitprefix) + strlen(section+strlen(gitprefix)) + 1); strcpy(newsection,gitprefix); strcat(newsection,section+strlen(gitfmprefix)); if (configuration_section(newsection) != -1) { /* found old [GIT-something section */ xfree(newsection); return; } xfree(newsection); } fprintf(stderr, "%s: can't find section %s in the configuration file.\n", g_program, section); exit(1); } } int get_int_var(var_name, default_value) char *var_name; int default_value; { char *data; configuration_getvarinfo(var_name, &data, 1, DO_SEEK); return data ? atoi(data) : default_value; } int get_const_var(var_name, options, options_no, default_value) char *var_name, *options[]; int options_no, default_value; { int i; char *data; configuration_getvarinfo(var_name, &data, 1, DO_SEEK); if (data) { for (i = 0; i < options_no; i++) if (strcmp(data, options[i]) == 0) break; if (i == options_no) fprintf(stderr, "%s: invalid %s (%s).\n", g_program, var_name, data); else return i; } return default_value; } int get_flag_var(var_name, default_value) char *var_name; int default_value; { char *data; configuration_getvarinfo(var_name, &data, 1, DO_SEEK); if (data) { if (strcmp(data, "ON") == 0) return 1; if (strcmp(data, "OFF") == 0) return 0; fprintf(stderr, "%s: invalid %s (%s).\n", g_program, var_name, data); return default_value; } return default_value; } char * get_string_var(var_name, default_value) char *var_name, *default_value; { char *data; configuration_getvarinfo(var_name, &data, 1, DO_SEEK); if (data) return xstrdup(data); return default_value; } void get_colorset_var(charset, colorset_name, fields_no) int *charset; char *colorset_name[]; int fields_no; { int i, index; char *data; for (i = 0; i < fields_no; i++) { configuration_getvarinfo(colorset_name[i], &data, 1, DO_SEEK); if (data) { index = tty_get_color_index(data); if (index == -1) fprintf(stderr, "%s: invalid %s (%s).\n", g_program, colorset_name[i], data); else charset[i] = index; } } } /* * Minimize the path, that is, convert paths like /etc/./././///./ into * their cleaner form: /etc. Stolen from the Thix kernel. Enhanced to * minimize paths like /usr/local/bin/../lib as well. */ char * minimize_path(path) char *path; { char *cpath = path; char *opath = path; if (*opath == '/') *cpath++ = *opath++; else fatal("relative path encountered"); while (*opath) { while (*opath == '/' || (*opath == '.' && (*(opath + 1) == '/' || *(opath + 1) == '\0'))) opath++; if (*opath == '.' && *(opath + 1) == '.' && (*(opath + 2) == '/' || *(opath + 2) == '\0')) { /* This is something like /usr/local/bin/.. and we are going to remove the trailing .. along with the directory that no longer meakes sense: bin. */ /* Check for /.. and do nothing if this is the case. */ if (cpath - 1 != path) { for (cpath -= 2; *cpath != '/'; cpath--); cpath++; } opath += 2; continue; } while (*opath && *opath != '/') *cpath++ = *opath++; if (*opath) *cpath++ = '/'; } if (*(cpath - 1) == '/' && cpath - path > 1) cpath--; *cpath = '\0'; return path; } void get_login_name() { struct passwd *pwd; int euid = geteuid(); if ((pwd = getpwuid(euid)) == NULL) { fprintf(stderr, "%s: OOOPS, I can't get your user name (euid = %d)!\n", g_program, euid); fprintf(stderr, "%s: Your account no longer exists or you are a %s", g_program, "SYSTEM CRACKER! :-)\n"); fprintf(stderr, "%s: Correct the problem and try again.\n", g_program); exit(1); } login_name = xstrdup(pwd->pw_name); } void truncate_long_name(name, dest, len) char *name, *dest; int len; { int name_len; switch (len) { case 0: break; case 1: dest[0] = ' '; break; case 2: dest[0] = dest[1] = ' '; break; case 3: dest[0] = dest[1] = dest[2] = ' '; break; default: name_len = strlen(name); if (name_len > len) { dest[0] = dest[1] = dest[2] = '.'; memcpy(dest + 3, name + name_len - len + 3, len - 3); } else memcpy(dest, name, name_len); break; } } char * truncate_string(path, temppath, len) char *path; char *temppath; int len; { truncate_long_name(path, temppath, len - 1); temppath[min(len - 1, (int)strlen(path))] = '\0'; return temppath; } off64_t get_file_length(fd) int fd; { off64_t current, length; current = lseek64(fd, 0, SEEK_CUR); length = lseek64(fd, 0, SEEK_END); lseek64(fd, current, SEEK_SET); return length; } struct tm * get_local_time() { time_t __time; /* Get the broken-down time representation. */ __time = time(NULL); return localtime(&__time); } /* * Set the environment variable `variable' to the given `value'. * Remove the previous value, if any. * Return 0 on success, -1 on failure. */ int xsetenv(variable, value) char *variable; char *value; { int result; #ifdef HAVE_PUTENV { char *environment_string = xmalloc(strlen(variable) + 1 + strlen(value) + 1); sprintf(environment_string, "%s=%s", variable, value); result = putenv(environment_string); } #else #ifdef HAVE_SETENV unsetenv(variable); result = setenv(variable, value, 1); #else #error #endif /* HAVE_SETENV */ #endif /* HAVE_PUTENV */ if (result == -1) fprintf(stderr, "%s: warning: cannot add '%s' to environment\n", g_program, variable); return result; } /* * Make sure there are only printable characters in `string'. */ void toprintable(string, length) char *string; size_t length; { size_t i; for (i = 0; i < length; i++) if (!isprint((int)string[i])) string[i] = '?'; } int needs_quotes(string, length) char *string; size_t length; { size_t i; for (i = 0; i < length; i++) if (!isalnum((int)string[i]) && string[i] != '.' && string[i] != '-' && string[i] != '+' && string[i] != '=' && string[i] != '~' && string[i] != '^' && string[i] != '%' && string[i] != '@' && string[i] != '/' && string[i] != ':' && string[i] != '{' && string[i] != '}' && string[i] != ',' && string[i] != '_') return 1; return 0; } /* * Check if it is a background command. We are doing this by looking * for a '&' at the end of the command string. */ int is_a_bg_command(cmd) char *cmd; { int i; for (i = strlen(cmd) - 1; i >= 0; i--) { if (cmd[i] == '&') return 1; /* Skip spaces and tabs. */ if (cmd[i] != ' ' && cmd[i] != key_TAB) return 0; } /* No '&' found. */ return 0; } /* * Check if it is a empty command (containing only spaces and ';'s. * My guess that almost any command that doesn't contain at least one * alphanumeric character should be considered as being empty, but I * don't want to take any chances. */ int is_an_empty_command(cmd) char *cmd; { for (; *cmd; cmd++) if (*cmd != ' ' && *cmd != ';') return 0; return 1; } void get_file_type_info() { char *contents[3]; char pattern[80]; int brightness, foreground, background; file_type_info_t *previous = NULL, *fti, *fti_head1 = NULL; for (;;) { configuration_getvarinfo(pattern, contents, 3, NO_SEEK); if (*pattern == '\0') break; if (contents[0]) foreground = tty_get_color_index(contents[0]); else foreground = -1; if (contents[1]) background = tty_get_color_index(contents[1]); else background = -1; if (contents[2]) brightness = tty_get_color_index(contents[2]); else brightness = -1; /* Insert the file type entry just obtained into the list. */ fti = (file_type_info_t *)xmalloc(sizeof(file_type_info_t)); if (fti_head1 == NULL) fti_head1 = previous = fti; else previous->next = fti; fti->pattern = xstrdup(pattern); fti->foreground = foreground; fti->background = background; fti->brightness = brightness; fti->next = NULL; previous = fti; } /* Fixed by Marian Ciobanu , October 24, 1995. */ if (fti_head1) { if (fti_head) { previous->next = fti_head; fti_head = fti_head1; } else fti_head = fti_head1; } } gnuit-4.9.5/src/file.h0000644000175000017500000000274411146671376011502 00000000000000/* file.h -- Backward compatibility SEEK_* constants. */ /* Copyright (C) 1993-2000, 2006-2007 Free Software Foundation, Inc. This file is part of gnuit. gnuit 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 3 of the License, or (at your option) any later version. gnuit 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, see http://www.gnu.org/licenses/. */ /* Written by Tudor Hulubei and Andrei Pitis. */ #ifndef _GIT_FILE_H #define _GIT_FILE_H #ifdef HAVE_CONFIG_H #include #endif #include /* Older BSD systems need this. */ #ifndef SEEK_SET #ifdef L_SET #define SEEK_SET L_SET #else #define SEEK_SET 0 #endif /* L_SET */ #endif /* SEEK_SET */ #ifndef SEEK_CUR #ifdef L_INCR #define SEEK_CUR L_INCR #else #define SEEK_CUR 1 #endif /* L_INCR */ #endif /* SEEK_CUR */ #ifndef SEEK_END #ifdef L_XTND #define SEEK_END L_XTND #else #define SEEK_END 2 #endif /* L_XTND */ #endif /* SEEK_END */ #ifndef _LARGEFILE64_SOURCE #define off64_t off_t #define fopen64 fopen #define lseek64 lseek #define open64 open #endif // !_LARGEFILE64_SOURCE #endif /* _GIT_FILE_H */ gnuit-4.9.5/src/git.c0000644000175000017500000021645511146671376011347 00000000000000/* git.c -- The main git file. */ /* Copyright (C) 1993-2000, 2006-2007 Free Software Foundation, Inc. This file is part of gnuit. gnuit 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 3 of the License, or (at your option) any later version. gnuit 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, see http://www.gnu.org/licenses/. */ /* Written by Tudor Hulubei and Andrei Pitis. */ #ifdef HAVE_CONFIG_H #include #endif #include #ifdef HAVE_STDLIB_H #include #else /* !HAVE_STDLIB_H */ #include "ansi_stdlib.h" #endif /* !HAVE_STDLIB_H */ #include #ifdef HAVE_STDDEF_H #include #endif #include "file.h" #include #include #include #include #include #ifdef HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ #ifdef HAVE_LOCALE_H #include #endif #include #include "stdc.h" #include "xstring.h" #include "xmalloc.h" #include "getopt.h" #include "xio.h" #include "tty.h" #include "window.h" #include "inputline.h" #include "status.h" #include "title.h" #include "panel.h" #include "configure.h" #include "signals.h" #include "system.h" #include "history.h" #include "tilde.h" #include "misc.h" char *copyright = "GIT is free software; you can redistribute it and/or modify it under the\n\ terms of the GNU General Public License as published by the Free Software\n\ Foundation; either version 3, or (at your option) any later version.\n\ Copyright (C) 1993-2001, 2007-2008 Free Software Foundation, Inc.\n\ Written by Tudor Hulubei and Andrei Pitis, Bucharest, Romania\n\n"; #define MAX_STATIC_SIZE 50 #ifdef HAVE_LINUX extern int LinuxConsole; #endif /* HAVE_LINUX */ #ifdef HAVE_LINUX int AnsiColors = ON; #else /* !HAVE_LINUX */ int AnsiColors = OFF; #endif /* !HAVE_LINUX */ int TypeSensitivity = ON; /* These are the only possible values for `current_mode'. Used while resuming from suspended mode in order to correctly refresh the display. */ #define GIT_SCREEN_MODE 0 #define GIT_TERMINAL_MODE 1 char *g_home; char *g_program; /* for gnulib lib/error.c */ char *program_name; char *version = VERSION; int two_panel_mode = 1; int current_mode = GIT_SCREEN_MODE; int panel_no; int wait_msg; int UseLastScreenChar; char color_section[] = "[GITFM-Color]"; char monochrome_section[] = "[GITFM-Monochrome]"; char lock_bad[] = "Bad password, try again..."; char *exit_msg; char *screen; char PS1[4] = " $ "; panel_t *left_panel, *right_panel, *src_panel, *dst_panel, *tmp_panel; static char *NormalModeHelp = ""; static char *CommandLineModeHelp = ""; static int ConfirmOnExit; /* Directory history stuff. */ char **dir_history; int dir_history_count; int dir_history_point; #define BUILTIN_OPERATIONS 89 #define BUILTIN_copy -1 #define BUILTIN_move -2 #define BUILTIN_make_directory -3 #define BUILTIN_delete -4 #define BUILTIN_exit -5 #define BUILTIN_previous_history_element -6 #define BUILTIN_tty_mode -7 #define BUILTIN_refresh -8 #define BUILTIN_switch_panels -9 #define BUILTIN_next_history_element -10 #define BUILTIN_panel_enable_next_mode -11 #define BUILTIN_panel_enable_owner_group -12 #define BUILTIN_panel_enable_date_time -13 #define BUILTIN_panel_enable_size -14 #define BUILTIN_panel_enable_abbrevsize -15 #define BUILTIN_panel_enable_mode -16 #define BUILTIN_panel_enable_full_name -17 #define BUILTIN_panel_sort_next_method -18 #define BUILTIN_panel_sort_by_name -19 #define BUILTIN_panel_sort_by_extension -20 #define BUILTIN_panel_sort_by_size -21 #define BUILTIN_panel_sort_by_date -22 #define BUILTIN_panel_sort_by_mode -23 #define BUILTIN_panel_sort_by_owner_id -24 #define BUILTIN_panel_sort_by_group_id -25 #define BUILTIN_panel_sort_by_owner_name -26 #define BUILTIN_panel_sort_by_group_name -27 #define BUILTIN_select_entry -28 #define BUILTIN_entry_to_input_line -29 #define BUILTIN_beginning_of_panel -30 #define BUILTIN_end_of_panel -31 #define BUILTIN_scroll_down -32 #define BUILTIN_scroll_up -33 #define BUILTIN_previous_line -34 #define BUILTIN_next_line -35 #define BUILTIN_other_panel -36 #define BUILTIN_change_directory -37 #define BUILTIN_select_files_matching_pattern -38 #define BUILTIN_unselect_files_matching_pattern -39 #define BUILTIN_adapt_current_directory -40 #define BUILTIN_adapt_other_directory -41 #define BUILTIN_other_path_to_input_line -42 #define BUILTIN_selected_entries_to_input_line -43 #define BUILTIN_backward_char -44 #define BUILTIN_forward_char -45 #define BUILTIN_backward_word -46 #define BUILTIN_forward_word -47 #define BUILTIN_beginning_of_line -48 #define BUILTIN_end_of_line -49 #define BUILTIN_delete_char -50 #define BUILTIN_backward_delete_char -51 #define BUILTIN_kill_word -52 #define BUILTIN_backward_kill_word -53 #define BUILTIN_kill_line -54 #define BUILTIN_kill_to_beginning_of_line -55 #define BUILTIN_kill_to_end_of_line -56 #define BUILTIN_just_one_space -57 #define BUILTIN_delete_horizontal_space -58 #define BUILTIN_downcase_word -59 #define BUILTIN_upcase_word -60 #define BUILTIN_capitalize_word -61 #define BUILTIN_action -62 #define BUILTIN_set_mark -63 #define BUILTIN_kill_region -64 #define BUILTIN_kill_ring_save -65 #define BUILTIN_yank -66 #define BUILTIN_exchange_point_and_mark -67 #define BUILTIN_set_scroll_step -68 #define BUILTIN_isearch_backward -69 #define BUILTIN_isearch_forward -70 #define BUILTIN_previous_directory -71 #define BUILTIN_next_directory -72 #define BUILTIN_reset_directory_history -73 #define BUILTIN_enlarge_panel -74 #define BUILTIN_enlarge_other_panel -75 #define BUILTIN_two_panels -76 #define BUILTIN_lock -77 #define BUILTIN_quick_compare_panels -78 #define BUILTIN_thorough_compare_panels -79 #define BUILTIN_name_downcase -80 #define BUILTIN_name_upcase -81 #define BUILTIN_up_one_dir -82 #define BUILTIN_compare -83 #define BUILTIN_bin_packing -84 #define BUILTIN_horizontal_scroll_left -85 #define BUILTIN_horizontal_scroll_right -86 #define BUILTIN_select_extension -87 #define BUILTIN_unselect_extension -88 #define BUILTIN_apropos -89 #define MAX_BUILTIN_NAME 35 char builtin[BUILTIN_OPERATIONS][MAX_BUILTIN_NAME] = { "copy", "move", "make-directory", "delete", "exit", "previous-history-element", "tty-mode", "refresh", "switch-panels", "next-history-element", "panel-enable-next-mode", "panel-enable-owner-group", "panel-enable-date-time", "panel-enable-size", "panel-enable-abbrevsize", "panel-enable-mode", "panel-enable-full-name", "panel-sort-next-method", "panel-sort-by-name", "panel-sort-by-extension", "panel-sort-by-size", "panel-sort-by-date", "panel-sort-by-mode", "panel-sort-by-owner-id", "panel-sort-by-group-id", "panel-sort-by-owner-name", "panel-sort-by-group-name", "select-entry", "entry-to-input-line", "beginning-of-panel", "end-of-panel", "scroll-down", "scroll-up", "previous-line", "next-line", "other-panel", "change-directory", "select-files-matching-pattern", "unselect-files-matching-pattern", "adapt-current-directory", "adapt-other-directory", "other-path-to-input-line", "selected-entries-to-input-line", "backward-char", "forward-char", "backward-word", "forward-word", "beginning-of-line", "end-of-line", "delete-char", "backward-delete-char", "kill-word", "backward-kill-word", "kill-line", "kill-to-beginning-of-line", "kill-to-end-of-line", "just-one-space", "delete-horizontal-space", "downcase-word", "upcase-word", "capitalize-word", "action", "set-mark", "kill-region", "kill-ring-save", "yank", "exchange-point-and-mark", "set-scroll-step", "isearch-backward", "isearch-forward", "previous-directory", "next-directory", "reset-directory-history", "enlarge-panel", "enlarge-other-panel", "two-panels", "lock", "quick-compare-panels", "thorough-compare-panels", "name-downcase", "name-upcase", "up-one-dir", "compare", "bin-packing", "horizontal-scroll-left", "horizontal-scroll-right", "select-extension", "unselect-extension", "apropos", }; typedef struct { char *name; /* The command name. */ char *body; /* The unexpanded command body. */ char *new_dir; /* If exit code == 0, goto this directory. */ char save_screen; /* Save the screen contents (if possible). */ char pause; /* Wait for a key before restoring the panels. */ char hide; /* Hide the output, emulating a builtin command. */ char builtin; /* This is a builtin command. */ char *sequence; /* The ascii representation of the key sequence on which the command is bound; used for error reporting and the apropos command. */ xstack_t *history; /* The history of the strings used to expand the command body. */ } command_t; #define MAX_KEYS 2048 /* enough ? :-) */ #define KEYSDATA_FIELDS 8 /* * Return ON if there is enough space on the screen to display the panels. */ int panels_can_be_displayed() { if (tty_lines >= 7) { if (two_panel_mode) { if (tty_columns >= 6 * 2) return ON; } else if (tty_columns >= 6) return ON; } return OFF; } /* * Return 1 if in GIT_TERMINAL_MODE. */ int in_terminal_mode() { return (current_mode == GIT_TERMINAL_MODE); } /* * Resize (if necessary) all git's components. */ void resize(resize_required) int resize_required; { int display_title = OFF; int display_status = OFF; int old_tty_lines = tty_lines; int old_tty_columns = tty_columns; tty_resize(); /* Don't resize, unless absolutely necessary. */ if (!resize_required) if (tty_lines == old_tty_lines && tty_columns == old_tty_columns) return; #ifdef HAVE_LINUX if (LinuxConsole) screen = xrealloc(screen, 4 + tty_columns * tty_lines * 2); #endif /* HAVE_LINUX */ /* Watch out for special cases (tty_lines < 7) because some * components will no longer fit. * * The title needs one line. The panels need four. There is one * more line for the input line and one for the status. * * Cases (lines available): * 1 line: input line * 2 lines: input line + status * 3-6 lines: title + input line + status * >= 7 lines: everything */ if (tty_lines >= 2) display_status = ON; if (tty_lines >= 3) display_title = ON; if (panels_can_be_displayed()) { if (two_panel_mode) { int right_panel_columns = (tty_columns >> 1); int left_panel_columns = right_panel_columns + (tty_columns & 1); if (window_x(panel_window(src_panel)) <= window_x(panel_window(dst_panel))) { panel_resize(src_panel, 0, 1, tty_lines - 3, left_panel_columns); panel_resize(dst_panel, left_panel_columns, 1, tty_lines - 3, right_panel_columns); } else { panel_resize(src_panel, left_panel_columns, 1, tty_lines - 3, right_panel_columns); panel_resize(dst_panel, 0, 1, tty_lines - 3, left_panel_columns); } } else { panel_resize(src_panel, 0, 1, tty_lines - 3, tty_columns); panel_resize(dst_panel, 0, 1, tty_lines - 3, tty_columns); } } else { panel_resize(src_panel, 0x10000, 0x10000, 2, 80); panel_resize(dst_panel, 0x10000, 0x10000, 2, 80); } title_resize(display_title ? tty_columns : 0, 0); status_resize(display_status ? tty_columns : 0, tty_lines - 1); il_resize(tty_columns, (tty_lines == 1) ? 0 : (tty_lines - 2)); } /* * Resize and refresh all git's components. * `signum' is the number of the signal that forced the refresh * (SIGCONT or SIGWINCH) but can be 0 if unconditional refresh is * desired. */ void refresh(signum) int signum; { resize(0); if (signum == SIGCONT) { /* We were suspended. Switch back to noncanonical mode. */ tty_set_mode(TTY_NONCANONIC); tty_defaults(); } if (wait_msg) return; panel_no_optimizations(src_panel); panel_no_optimizations(dst_panel); panel_center_current_entry(src_panel); panel_center_current_entry(dst_panel); if (current_mode == GIT_SCREEN_MODE) { if (!panels_can_be_displayed()) { /* We know that when this is the case, the panels will not be displayed, and we don't want junk on the screen. */ tty_defaults(); tty_clear(); } title_update(); panel_update(src_panel); if (two_panel_mode) panel_update(dst_panel); } else tty_put_screen(screen); status_update(); il_update(); il_update_point(); tty_update(); if (signum == SIGCONT) tty_update_title(panel_get_path(src_panel)); } void report_undefined_key(status_message) char *status_message; { char *prev = tty_get_previous_key_seq(); size_t length = strlen(prev); if (length && (prev[length - 1] != key_INTERRUPT)) { char *str = (char *)tty_key_machine2human(prev); char *buf = xmalloc(128 + strlen(str)); sprintf(buf, "%s: not defined.", str); status(buf, STATUS_ERROR, STATUS_LEFT); xfree(buf); tty_beep(); tty_update(); sleep(1); } else tty_beep(); if (status_message) status(status_message, STATUS_OK, STATUS_CENTERED); else status_default(); il_update_point(); tty_update(); } /*****************************************/ /* The GIT interface to the input line. */ /*****************************************/ #define IL_ISEARCH_BEGIN 0 #define IL_ISEARCH_BACKWARD 1 #define IL_ISEARCH_FORWARD 2 #define IL_ISEARCH_END 3 extern int il_dispatch_commands PROTO ((int, int)); extern char *il_fix_text PROTO ((char *)); extern char *il_build_help_from_string PROTO ((char *)); extern char *il_isearch PROTO ((char *, char **, int, int *)); extern char il_read_char PROTO ((char *, char *, int)); extern char *il_read_line PROTO ((char *, char **, char *, xstack_t *)); /* * Add a string to the history. */ void il_history_add_entry(history, text) xstack_t *history; char *text; { char *history_text; /* Avoid duplicates. */ if (xstack_preview(history, &history_text, 1) && strcmp(history_text, text) == 0) return; history_text = xstrdup(text); xstack_push(history, &history_text); } /* * Preview a history string. */ char * il_history_view_entry(history, offset) xstack_t *history; int offset; { char *history_text; return xstack_preview(history, &history_text, offset) ? history_text : NULL; } /* * Dispatch input line commands. key is the actual command while flags is * a set of IL_*s or-ed together, allowing us to customize the behaviour * of the input line. If IL_MOVE is not specified, the IL_EDIT flag is * ignored. Returns 1 if key has been processed and 0 otherwise. */ int il_dispatch_commands(key, flags) int key; int flags; { if ((flags & IL_MOVE) == 0) return 0; switch (key) { case BUILTIN_backward_char: il_backward_char(); break; case BUILTIN_forward_char: il_forward_char(); break; case BUILTIN_backward_word: il_backward_word(); break; case BUILTIN_forward_word: il_forward_word(); break; case BUILTIN_beginning_of_line: il_beginning_of_line(); break; case BUILTIN_end_of_line: il_end_of_line(); break; case BUILTIN_delete_char: if (flags & IL_EDIT) il_delete_char(); break; case BUILTIN_backward_delete_char: if (flags & IL_EDIT) il_backward_delete_char(); break; case BUILTIN_kill_word: if (flags & IL_EDIT) il_kill_word(); break; case BUILTIN_backward_kill_word: if (flags & IL_EDIT) il_backward_kill_word(); break; case BUILTIN_kill_line: if (flags & IL_EDIT) il_kill_line(IL_STORE); break; case BUILTIN_kill_to_beginning_of_line: if (flags & IL_EDIT) il_kill_to_beginning_of_line(); break; case BUILTIN_kill_to_end_of_line: if (flags & IL_EDIT) il_kill_to_end_of_line(); break; case BUILTIN_just_one_space: if (flags & IL_EDIT) il_just_one_space(); break; case BUILTIN_delete_horizontal_space: if (flags & IL_EDIT) il_delete_horizontal_space(); break; case BUILTIN_downcase_word: if (flags & IL_EDIT) il_downcase_word(); break; case BUILTIN_upcase_word: if (flags & IL_EDIT) il_upcase_word(); break; case BUILTIN_capitalize_word: if (flags & IL_EDIT) il_capitalize_word(); break; case BUILTIN_set_mark: il_set_mark(); break; case BUILTIN_kill_region: if (flags & IL_EDIT) il_kill_region(); break; case BUILTIN_kill_ring_save: il_kill_ring_save(); break; case BUILTIN_yank: if (flags & IL_EDIT) il_yank(); break; case BUILTIN_exchange_point_and_mark: il_exchange_point_and_mark(); break; default: if ((flags & IL_EDIT) && isprint(key)) il_insert_char(key); else return 0; break; } return 1; } /* * Fix the text. Replace non-printable characters with question marks * and expand tabs. Return a malloc-ed pointer to the fixed text. * The caller should free the new text. */ char * il_fix_text(text) char *text; { int i, j; char *fixed_text; size_t fixed_text_length; if (text == NULL) return NULL; fixed_text = xmalloc(fixed_text_length = (strlen(text) + 1)); for (i = 0, j = 0; text[i]; i++) if (text[i] == '\t') { fixed_text = xrealloc(fixed_text, fixed_text_length += 8); memcpy(&fixed_text[j], " ", 8); j += 8; } else if (isprint((int)text[i])) fixed_text[j++] = text[i]; else fixed_text[j++] = '?'; fixed_text[j] = 0; return fixed_text; } char * il_build_help_from_string(options) char *options; { size_t len = 0; char *options_ptr = options; char *help = xmalloc(1 + strlen(options) * 3 + 8); help[len++] = '('; for (; *(options_ptr + 1); options_ptr++) { help[len++] = *options_ptr; help[len++] = ','; help[len++] = ' '; } help[len++] = *options_ptr; help[len++] = ')'; help[len++] = ' '; help[len++] = '\0'; return help; } /* * Read only one char from the input line. message is a string explaining * what is this all about. options is a string containing only those * characters that are valid answers, NULL if any character is a valid * answer. The default char is the first char in the options string. * Returns 0 if it was interrupted, a valid character otherwise. */ char il_read_char(message, options, flags) char *message; char *options; int flags; { char *help; tty_key_t *ks; int key, repeat_count; command_t *command; input_line_t *saved_il = NULL; if (flags & IL_SAVE) saved_il = il_save(); il_reset_line(); if (message) { char *text = il_fix_text(message); if (flags & IL_ERROR) { il_insert_text("*** "); il_set_error_flag(1); } il_insert_text(text); if (flags & IL_HOME) il_beginning_of_line(); xfree(text); if (options) { help = il_build_help_from_string(options); il_insert_text(help); xfree(help); } } il_update(); il_update_point(); tty_update(); if (flags & IL_BEEP) tty_beep(); while (1) { while ((ks = tty_get_key(&repeat_count)) == NULL) { tty_beep(); status_update(); il_update_point(); } key = ks->key_seq[0]; command = (command_t *)ks->aux_data; if (command && command->builtin) key = - 1 - (command->name - builtin[0]) / MAX_BUILTIN_NAME; switch (key) { case BUILTIN_refresh: refresh(0); break; case BUILTIN_action: if (options != NULL) key = *options; case key_INTERRUPT: goto done; default: while (repeat_count--) if (il_dispatch_commands(key, flags) == 0) goto il_error; il_update(); break; il_error: if (options == NULL) goto done; if (options && strchr(options, key)) goto done; tty_beep(); break; } status_update(); il_update_point(); tty_update(); } done: il_set_error_flag(0); if ((flags & IL_SAVE) && saved_il) { il_restore(saved_il); il_update(); il_update_point(); tty_update(); } return (key == key_INTERRUPT) ? 0 : key; } /* * WARNING: dest *must* be a pointer to a NULL pointer or a pointer * to a pointer allocated with xmalloc(). In the first case, * il_read_line() will return a string allocated with xmalloc(). In * the second case, it will reallocate the pointer as needed using * xrealloc(). The caller should free the memory allocated this way. */ char * il_read_line(static_text, dest, default_string, history) char *static_text; char **dest; char *default_string; xstack_t *history; { tty_key_t *ks; char *history_text; command_t *command; int key = 0, repeat_count, offset = 0; il_reset_line(); if (static_text) il_set_static_text(static_text); if (default_string) il_insert_text(default_string); if (history && default_string) { il_history_add_entry(history, default_string); offset = 1; } il_update(); il_update_point(); tty_update(); while (1) { while ((ks = tty_get_key(&repeat_count)) == NULL) { tty_beep(); status_update(); il_update_point(); } key = ks->key_seq[0]; command = (command_t *)ks->aux_data; if (command && command->builtin) key = - 1 - (command->name - builtin[0]) / MAX_BUILTIN_NAME; switch (key) { case BUILTIN_previous_line: case BUILTIN_previous_history_element: if (history == NULL) break; history_text = il_history_view_entry(history, ++offset); if (history_text == NULL) { offset--; tty_beep(); } else { il_kill_line(IL_DONT_STORE); il_insert_text(history_text); il_update(); il_update_point(); } break; case BUILTIN_next_line: case BUILTIN_next_history_element: if (history == NULL) break; if (offset == 0) { il_kill_line(IL_DONT_STORE); il_update(); il_update_point(); break; } il_kill_line(IL_DONT_STORE); offset--; if (offset > 0) { history_text = il_history_view_entry(history, offset); il_insert_text(history_text); } il_update(); il_update_point(); break; case BUILTIN_refresh: refresh(0); break; case BUILTIN_action: il_get_contents(dest); case key_INTERRUPT: goto done; default: while (repeat_count--) if (il_dispatch_commands(key, IL_MOVE | IL_EDIT) == 0) tty_beep(); il_update(); break; } status_update(); il_update_point(); tty_update(); } done: if (key == BUILTIN_action) { if (history) il_history_add_entry(history, *dest); return *dest; } else return NULL; } /* * status = IL_ISEARCH_BEGIN -> we are beginning to isearch; initialize * status = IL_ISEARCH_BACKWARD -> we are in the middle of an isearch-backward * status = IL_ISEARCH_FORWARD -> we are in the middle of an isearch-forward * status = IL_ISEARCH_END -> isearch complete; clean up * * *action = IL_ISEARCH_ACTION_DECREASE -> the user pressed the backspace key * so if there is no matching element * in the panel stack, we should delete * the last character in the input line * *action = IL_ISEARCH_ACTION_RETRY -> the user pressed the isearch-* * character again, so we should try to * find a new match for the current * string * *action = IL_ISEARCH_ACTION_INCREASE -> a new character has been inserted * into the input line so we should try * to find a match for the new string */ char * il_isearch(static_text, dest, status, action) char *static_text; char **dest; int status; int *action; { int key; int keycmd; tty_key_t *ks; command_t *command; static input_line_t *saved_il; if (status == IL_ISEARCH_BEGIN) { saved_il = il_save(); il_reset_line(); if (static_text) il_set_static_text(static_text); return NULL; } if (status == IL_ISEARCH_END) { il_restore(saved_il); il_update(); il_update_point(); tty_update(); return NULL; } if (action == NULL) return NULL; *action = IL_ISEARCH_ACTION_NONE; il_update(); il_update_point(); tty_update(); restart: if ((ks = tty_get_key(NULL)) == NULL) { status_update(); il_update_point(); tty_update(); return NULL; } keycmd = key = ks->key_seq[0]; command = (command_t *)ks->aux_data; if (command && command->builtin) keycmd = - 1 - (command->name - builtin[0]) / MAX_BUILTIN_NAME; switch (keycmd) { case key_INTERRUPT: case BUILTIN_action: break; case BUILTIN_refresh: refresh(0); goto restart; case BUILTIN_backward_delete_char: /* If the input line is empty, just beep. */ if (il_is_empty()) tty_beep(); else { *action = IL_ISEARCH_ACTION_DECREASE; /* Don't call il_backward_delete_char(). There might be several history elements in the panel stack that match the current string so we have to delay the call to il_backward_delete_char() until all the matching elements have been pop-ed. */ } break; default: if ((keycmd == BUILTIN_isearch_backward && status == IL_ISEARCH_BACKWARD) || (keycmd == BUILTIN_isearch_forward && status == IL_ISEARCH_FORWARD)) { if (il_is_empty()) *action = IL_ISEARCH_ACTION_INCREASE; else *action = IL_ISEARCH_ACTION_RETRY; break; } if (isprint(key)) { il_insert_char(key); *action = IL_ISEARCH_ACTION_INCREASE; } else { /* Force a NULL return value when detecting non printable characters (or functional keys). */ keycmd = key_INTERRUPT; } break; } status_update(); il_update(); il_update_point(); tty_update(); il_get_contents(dest); return (keycmd == BUILTIN_action || keycmd == key_INTERRUPT) ? NULL : *dest; } /****************************************/ /* The directory history function set. */ /****************************************/ void dir_history_reset() { if (dir_history) { int i; for (i = 0; i < dir_history_count; i++) xfree(dir_history[i]); xfree(dir_history); dir_history = NULL; } dir_history_count = 0; dir_history_point = 0; } void dir_history_add(directory) char *directory; { dir_history_point = dir_history_count; dir_history = (char **)xrealloc(dir_history, ++dir_history_count * sizeof(char *)); dir_history[dir_history_point] = xstrdup(directory); } void dir_history_next(this, link) panel_t *this; panel_t *link; { if (dir_history_point < dir_history_count - 1) panel_action(this, act_CHDIR, link, dir_history[++dir_history_point], 1); else tty_beep(); } void dir_history_prev(this, link) panel_t *this; panel_t *link; { if (dir_history_point) panel_action(this, act_CHDIR, link, dir_history[--dir_history_point], 1); else tty_beep(); } void clean_up() { tty_end(NULL); /* It is better not to do this here. It can lead to an endless loop if xmalloc fails in write_history because xmalloc will call fatal and fatal will call clean_up again... */ #if 0 if (il) il_end(); #endif status_end(); remove_log(); } void fatal(postmsg) char *postmsg; { if (tty_get_mode() == TTY_NONCANONIC) clean_up(); fprintf(stderr, "%s: fatal error: %s.\n", g_program, postmsg); exit(1); } /* * This function is a mess. Don't try to understand what it does * ... :-( Basically, it expands a configuration line macro. The * return value is 0 on error, -1 if some condition failed (the * command contains a %d but the current entry is not a directory), 1 * if everything is ok, 2 if the command was correctly expanded and it * contains a '%i' and 3 if it contains a '%I'. Easy, isn't it? */ int command_expand(command, dest, p, l) command_t *command; char **dest; panel_t *p, *l; { char c; uid_t uid; gid_t gid; int retval; panel_t *t; size_t len; struct group *grp; struct passwd *pwd; static int busy = 0; char *answer = NULL; char *question = NULL; int i_flag = 0, entry; size_t oldtmplen, tmplen; char *ptr, *tmp = NULL, *d, *flag; char *src = command->body, *save_body; len = strlen(src) + 1; d = *dest = xmalloc(len); while (*src) { if (*src != '%') *d++ = *src++; else { t = islower((int)*++src) ? p : l; switch (*src) { case '?': if (busy) { busy = 0; goto bad_command; } if (*++src != '{') goto bad_command; if ((ptr = strchr(++src, '}')) == NULL) goto bad_command; *ptr = 0; c = il_read_char(src, "yn", IL_MOVE); *ptr = '}'; if (c != 'y') goto strings_dont_match; src = ptr; break; case 's': if (busy) { busy = 0; goto bad_command; } if (*++src != '{') goto bad_command; if ((ptr = strchr(++src, ',')) == NULL) goto bad_command; *ptr = 0; busy = 1; save_body = command->body; command->body = src; retval = command_expand(command, &answer, p, l); command->body = save_body; busy = 0; if (retval < 1) { *ptr = ','; if (retval == 0) goto bad_command; else goto strings_dont_match; } question = xmalloc(16 + strlen(command->name) + strlen(answer) + 1); sprintf(question, "%s: %s", command->name, answer); xfree(answer); answer = NULL; *ptr++ = ','; if ((src = strchr(ptr, '}')) == NULL) goto bad_command; *src = 0; if (strlen(question) > MAX_STATIC_SIZE) question[MAX_STATIC_SIZE] = 0; busy = 1; save_body = command->body; command->body = ptr; retval = command_expand(command, &answer, p, l); command->body = save_body; busy = 0; if (retval < 1) { *src = '}'; xfree(question); question = NULL; if (retval == 0) goto bad_command; goto strings_dont_match; } flag = il_read_line(question, &tmp, answer, command->history); xfree(question); xfree(answer); question = answer = NULL; if (flag == NULL) { *src = '}'; goto strings_dont_match; } *src = '}'; break; case 'f': case 'F': if (panel_get_current_file_type(t) != FILE_ENTRY) goto strings_dont_match; get_file_name: ptr = panel_get_current_file_name(t); tmp = xmalloc(1 + strlen(ptr) + 1 + 1); sprintf(tmp, "\"%s\"", ptr); break; case 'd': case 'D': if (panel_get_current_file_type(t) != DIR_ENTRY) goto strings_dont_match; goto get_file_name; case 'l': case 'L': if (panel_get_current_file_type(t) != SYMLINK_ENTRY) goto strings_dont_match; goto get_file_name; case 't': case 'T': if (panel_get_current_file_type(t) != FIFO_ENTRY) goto strings_dont_match; goto get_file_name; case 'z': case 'Z': if (panel_get_current_file_type(t) != SOCKET_ENTRY) goto strings_dont_match; goto get_file_name; case 'a': case 'A': goto get_file_name; case 'm': case 'M': tmp = xmalloc(16); sprintf(tmp, "%o", (int)panel_get_current_file_mode(t) & 07777); break; case 'o': case 'O': uid = panel_get_current_file_uid(t); pwd = getpwuid(uid); if (pwd) tmp = xstrdup(pwd->pw_name); else { tmp = xmalloc(16); sprintf(tmp, "%o", (int)uid); } break; case 'g': case 'G': gid = panel_get_current_file_gid(t); grp = getgrgid(gid); if (grp) tmp = xstrdup(grp->gr_name); else { tmp = xmalloc(16); sprintf(tmp, "%o", (int)gid); } break; case 'p': case 'P': tmp = xmalloc(1 + strlen(t->path) + 1 + 1); sprintf(tmp, "\"%s\"", t->path); break; case 'b': case 'B': ptr = strrchr(t->path, '/'); ptr = (*++ptr) ? ptr : "/root"; tmp = xmalloc(1 + strlen(ptr) + 1 + 1); sprintf(tmp, "\"%s\"", ptr); break; case 'i': case 'I': i_flag = (*src == 'i') ? 1 : 2; if (busy && t->selected_entries) { tmplen = 20; tmp = xmalloc(tmplen + 1); strcpy(tmp, "selected entries"); break; } tmp = NULL; tmplen = 0; panel_init_iterator(t); while ((entry = panel_get_next(t)) != -1) { oldtmplen = tmplen; tmplen += 1 + strlen(t->dir_entry[entry].name) + 1 + 1; tmp = xrealloc(tmp, tmplen + 1); tmp[oldtmplen] = '"'; strcpy(tmp + oldtmplen + 1, t->dir_entry[entry].name); tmp[tmplen - 2] = '"'; tmp[tmplen - 1] = ' '; tmp[tmplen ] = 0; } /* This can happen when there is no selected entry and the current file is "..". */ if (tmplen == 0) goto strings_dont_match; break; default: goto bad_command; } src++; *d = 0; if (tmp) { *dest = xrealloc(*dest, len += strlen(tmp)); strcat(*dest, tmp); d = *dest + strlen(*dest); xfree(tmp); tmp = NULL; } } } *d = 0; return 1 + i_flag; bad_command: xfree(*dest); *dest = NULL; return 0; strings_dont_match: if (tmp) xfree(tmp); *dest = NULL; return -1; } void add_to_environment(variable, alternate_variable, value) char *variable; char *alternate_variable; char *value; { char *alternate_value; if (getenv(variable) == NULL) { if (alternate_variable && (alternate_value=getenv(alternate_variable))) xsetenv(variable, alternate_value); else xsetenv(variable, value); } } /* * Read keys from the current section ([GITFM-Keys] is supposed to be in * use when read_keys() is called). Return the number of keys read. */ int read_keys(keys, errors) int keys; int *errors; { int i, j; command_t *command; int need_conversion; char key_seq[80]; char *contents[KEYSDATA_FIELDS - 2]; *errors = 0; for (i = keys; i < MAX_KEYS; i++) { configuration_getvarinfo(key_seq, contents, KEYSDATA_FIELDS - 2, NO_SEEK); if (*key_seq == '\0') break; if (*key_seq != '^') { char *key_seq_ptr = tty_get_symbol_key_seq(key_seq); if (key_seq_ptr) { /* Ignore empty/invalid key sequences. */ if (*key_seq_ptr == '\0') continue; /* We got the key sequence in the correct form, as returned by tgetstr, so there is no need for further conversion. */ strcpy(key_seq, key_seq_ptr); need_conversion = 0; } else { /* This is not a TERMCAP symbol, it is a key sequence that we will have to be converted with tty_key_human2machine() into a machine usable form before being used. */ need_conversion = 1; } } else need_conversion = 1; command = (command_t *)xcalloc(1, sizeof(command_t)); if (contents[0]) command->name = xstrdup(contents[0]); else { xfree(command); continue; } command->history = xstack_init(sizeof(char *)); if (contents[2]) command->new_dir = xstrdup(contents[2]); if (contents[1]) command->body = xstrdup(contents[1]); else goto insert; if (contents[3]) command->save_screen = ((tolower((int)contents[3][0])=='y')?1:0); else command->save_screen = 1; if (contents[4]) command->pause = ((tolower((int)contents[4][0])=='y')?1:0); if (contents[5]) command->hide = ((tolower((int)contents[5][0])=='y')?1:0); insert: /* This speeds up the process. It is not a limitation because, by convention, all the build-in command names contain only lowercase letters. Avoid searching through the list of built-in command names. */ if (islower((int)command->name[0])) for (j = 0; j < BUILTIN_OPERATIONS; j++) { if (strcmp(command->name, builtin[j]) == 0) { xfree(command->name); command->name = builtin[j]; command->builtin = 1; break; } } command->sequence = xstrdup(key_seq); if (command->builtin || command->body || command->new_dir) { if (need_conversion) { if (tty_key_human2machine((unsigned char *)key_seq)) tty_key_list_insert((unsigned char *)key_seq, (void *)command); else { fprintf(stderr, "%s: warning: invalid key sequence '%s'\n", g_program, key_seq); (*errors)++; } } else tty_key_list_insert((unsigned char *)key_seq, (void *)command); } } return i; } /* * Last moment settings before suspending git. */ void hide() { tty_set_mode(TTY_CANONIC); tty_defaults(); tty_put_screen(screen); } /* * Set the git prompt. */ void set_prompt() { char temp[MAX_STATIC_SIZE + 1]; il_set_static_text(strcat(truncate_string(panel_get_path(src_panel), temp, MAX_STATIC_SIZE-strlen(PS1)+1), PS1)); } void reread() { /* Note that the order is important. `src_panel' should be updated last, because we want its current directory to be git's current directory. */ panel_action(dst_panel, act_REGET, src_panel, (void *)-1, 1); panel_action(src_panel, act_REGET, dst_panel, (void *)-1, 1); } void usage() { printf("usage: %s [-hvcblp] [path1] [path2]\n", g_program); printf(" -h print this help message\n"); printf(" -v print the version number\n"); printf(" -c use ANSI colors\n"); printf(" -b don't use ANSI colors\n"); printf(" -l don't use the last screen character\n"); printf(" -p output final path at exit\n"); } int main(argc, argv) int argc; char *argv[]; { tty_key_t *ks; char *final_path; command_t *command; size_t len = 0, ptrlen; char *temporary_directory; int previous_isearch_failed; int resuming_previous_isearch; int output_final_path = OFF; input_line_t *saved_il = NULL; char *panel_path, *current_path; char *lock_password, *unlock_password, *aproposstr; int child_exit_code, repeat_count, keys; int action_status, i, retval, to_case, cmp_mode; int c, ansi_colors = -1, use_last_screen_character = ON; int entry, key, app_end = 0, first_time = 1, errors = 0; char *left_panel_path, *right_panel_path, *output_string; char *cmdln = NULL, *input = NULL, *ptr, *srcptr, *search_string = NULL; /* Make sure we don't get signals before we are ready to handle them. */ signals_init(); #ifdef HAVE_SETLOCALE setlocale(LC_ALL,""); #endif program_name = g_program = argv[0]; g_home = getenv("HOME"); if (g_home == NULL) g_home = "."; compute_directories(); update_path(); get_login_name(); exit_msg = xmalloc(strlen(PRODUCT) + 16); sprintf(exit_msg, "Exit %s? ", PRODUCT); if (getenv("COLORTERM") != NULL) ansi_colors = ON; /* Parse the command line. */ while ((c = getopt(argc, argv, "hvcblp")) != -1) switch (c) { case 'h': /* Help request. */ usage(); return 0; case 'v': /* Version number request. */ printf("%s %s\n", PRODUCT, VERSION); return 0; case 'c': /* Force git to use ANSI color sequences. */ ansi_colors = ON; break; case 'b': /* Prevent git from using ANSI color sequences. */ ansi_colors = OFF; break; case 'l': /* Prevent git from using the last character on the screen. */ use_last_screen_character = OFF; break; case 'p': /* Output the final path at exit. Useful to be able to `cd' to that directory provided that a wrapper script is used. */ output_final_path = ON; break; case '?': return 1; default: fprintf(stderr, "%s: unknown error\n", g_program); return 1; } left_panel_path = right_panel_path = "."; if (optind < argc) { left_panel_path = xstrdup(argv[optind++]); if (optind < argc) right_panel_path = xstrdup(argv[optind++]); else right_panel_path = left_panel_path; } if (optind < argc) fprintf(stderr, "%s: warning: invalid extra options ignored\n", g_program); printf("\n"); #ifdef HAVE_GCC printf("%s %s (%s), %s %s\n", PRODUCT, VERSION, HOST, __TIME__, __DATE__); #else printf("%s %s (%s)\n", PRODUCT, VERSION, HOST); #endif /* !HAVE_GCC */ printf(copyright); #ifdef DEBIAN add_to_environment("GIT_EDITOR", "EDITOR", "sensible-editor"); add_to_environment("GNUIT_EDITOR", "GIT_EDITOR", "sensible-editor"); add_to_environment("GIT_PAGER", "PAGER", "sensible-pager"); add_to_environment("GNUIT_PAGER", "GIT_PAGER", "sensible-pager"); add_to_environment("GIT_BROWSER", (char *)NULL, "sensible-browser"); add_to_environment("GNUIT_BROWSER", "GIT_BROWSER", "sensible-browser"); #else /* !DEBIAN */ add_to_environment("GIT_EDITOR", "EDITOR", "vi"); add_to_environment("GNUIT_EDITOR", "GIT_EDITOR", "vi"); add_to_environment("GIT_PAGER", "PAGER", "more"); add_to_environment("GNUIT_PAGER", "GIT_PAGER", "more"); add_to_environment("GIT_BROWSER", (char *)NULL, "lynx"); add_to_environment("GNUIT_BROWSER", "GIT_BROWSER", "lynx"); #endif /* !DEBIAN */ add_to_environment("GIT_SHELL", "SHELL", "/bin/sh"); add_to_environment("GNUIT_SHELL", "GIT_SHELL", "/bin/sh"); add_to_environment("GIT_RMAIL", (char *)NULL, "mail"); add_to_environment("GNUIT_RMAIL", "GIT_RMAIL", "mail"); add_to_environment("GIT_VMSTAT", (char *)NULL, "free"); add_to_environment("GNUIT_VMSTAT", "GIT_VMSTAT", "free"); tty_init(TTY_RESTRICTED_INPUT); common_configuration_init(); use_section("[GITFM-FTI]"); get_file_type_info(); use_section("[GITFM-Keys]"); keys = read_keys(0, &errors); wait_msg += errors; configuration_end(); wait_msg += (specific_configuration_init() == 0); temporary_directory = getenv("TMPDIR"); if (temporary_directory == NULL) temporary_directory = "/tmp"; stdout_log_template = xmalloc(32 + strlen(temporary_directory) + 1); stderr_log_template = xmalloc(32 + strlen(temporary_directory) + 1); stdout_log_name = xmalloc(32 + strlen(temporary_directory) + 1); stderr_log_name = xmalloc(32 + strlen(temporary_directory) + 1); sprintf(stdout_log_template, "%s/gnuit.1.XXXXXX", temporary_directory); sprintf(stderr_log_template, "%s/gnuit.2.XXXXXX", temporary_directory); use_section("[Setup]"); if (ansi_colors == -1) AnsiColors = get_flag_var("AnsiColors", OFF); else AnsiColors = ansi_colors; if (use_last_screen_character) UseLastScreenChar = get_flag_var("UseLastScreenChar", OFF); else UseLastScreenChar = OFF; tty_set_last_char_flag(UseLastScreenChar); use_section("[GITFM-Setup]"); if (AnsiColors == ON) TypeSensitivity = get_flag_var("TypeSensitivity", ON); else TypeSensitivity = OFF; ConfirmOnExit = get_flag_var("ConfirmOnExit", OFF); NormalModeHelp = get_string_var("NormalModeHelp", ""); CommandLineModeHelp = get_string_var("CommandLineModeHelp", ""); use_section(AnsiColors ? color_section : monochrome_section); get_colorset_var(TitleColors, TitleFields, TITLE_FIELDS); use_section("[GITFM-FTI]"); get_file_type_info(); use_section("[GITFM-Keys]"); keys = read_keys(keys, &errors); wait_msg += errors; if (keys == MAX_KEYS) fprintf(stderr, "%s: too many key sequences; only %d are allowed.\n", g_program, MAX_KEYS); #ifndef HAVE_LONG_FILE_NAMES fprintf(stderr, "%s: warning: your system doesn't support long file names.", g_program); #endif /* !HAVE_LONG_FILE_NAMES */ if (getuid() == 0) PS1[1] = '#'; current_path = xgetcwd(); if (current_path == NULL) fatal("`getcwd' failed: permission denied"); tty_start_cursorapp(); title_init(); il_init(); status_init(NormalModeHelp); if (left_panel_path[0] == '/') panel_path = xstrdup(left_panel_path); else { panel_path = xmalloc(strlen(current_path) + 1 + strlen(left_panel_path) + 1); sprintf(panel_path, "%s/%s", current_path, left_panel_path); } left_panel = panel_init(panel_path); xfree(panel_path); if (right_panel_path[0] == '/') panel_path = xstrdup(right_panel_path); else { panel_path = xmalloc(strlen(current_path) + 1 + strlen(right_panel_path) + 1); sprintf(panel_path, "%s/%s", current_path, right_panel_path); } right_panel = panel_init(panel_path); xfree(panel_path); xfree(current_path); configuration_end(); src_panel = left_panel; dst_panel = right_panel; resize(0); tty_get_screen(screen); tty_set_mode(TTY_NONCANONIC); tty_defaults(); dir_history = NULL; dir_history_count = 0; dir_history_point = 0; signal_handlers(ON); tty_update_title(panel_get_path(src_panel)); restart: if (wait_msg) { alarm(0); fprintf(stdout, "Press almost any key to continue\n"); tty_goto(tty_lines - 1, 0); tty_get_key(NULL); wait_msg = 0; } tty_update_title(panel_get_path(src_panel)); alarm(60 - get_local_time()->tm_sec); src_panel = panel_no ? right_panel : left_panel; dst_panel = panel_no ? left_panel : right_panel; if (tty_lines < 7) { /* We know that when this is the case, the panels will not be displayed, and we don't want junk on the screen. */ tty_defaults(); tty_clear(); } title_update(); status_default(); il_restore(saved_il); tty_update(); /* Save the input line contents. */ saved_il = il_save(); reread(); refresh(0); /* Restore the input line contents. */ il_restore(saved_il); panel_set_focus(src_panel, ON); if (first_time) { dir_history_add(panel_get_path(src_panel)); first_time = 0; } set_prompt(); saved_il = il_save(); while(!app_end) { il_restore(saved_il); saved_il = il_save(); il_update(); il_update_point(); tty_update(); il_get_contents(&cmdln); user_heart_attack = 0; while ((ks = tty_get_key(&repeat_count)) == NULL) report_undefined_key(NULL); status_update(); key = ks->key_seq[0]; command = (command_t *)ks->aux_data; if (command) { if (command->builtin) key = - 1 - (command->name-builtin[0]) / MAX_BUILTIN_NAME; else { if (command->name) { panel_no_optimizations(src_panel); panel_no_optimizations(dst_panel); if (command->body) { char *cmd = NULL; retval = command_expand(command, &cmd, src_panel, dst_panel); if (retval) { if (retval > 0) { size_t msglen = 32 + strlen(command->name) + strlen(cmd) + 1; char *msg = xmalloc(msglen); sprintf(msg, "%s: %s", command->name, cmd); status(msg, STATUS_WARNING, STATUS_LEFT); tty_update(); xfree(msg); if (command->hide) { msg = xmalloc(64+strlen(command->name)+1); sprintf(msg, "Wait, running %s command %s...", "user-defined", command->name); il_message(msg); tty_update(); xfree(msg); } if (!is_a_bg_command(cmd)) tty_update_title(cmd); child_exit_code = start(cmd, command->hide); xfree(cmd); if (command->hide) { if(WIFSIGNALED(child_exit_code)) { il_read_char("Command interrupted by signal", (char *)NULL, IL_BEEP|IL_ERROR); } else if(WIFEXITED(child_exit_code) && (WEXITSTATUS(child_exit_code) != 0)) { tty_beep(); display_errors(command->name); } } else { if (command->save_screen) tty_get_screen(screen); tty_touch(); if (command->pause) wait_msg = 1; } if (WIFEXITED(child_exit_code) && (WEXITSTATUS(child_exit_code) == 0) && command->new_dir) { char *expanded_dir = tilde_expand(command->new_dir); panel_action(src_panel, act_CHDIR, dst_panel, expanded_dir, 1); dir_history_add(panel_get_path(src_panel)); xfree(expanded_dir); } if (WIFEXITED(child_exit_code) && (WEXITSTATUS(child_exit_code) == 0)) { if (retval == 2) panel_unselect_all(src_panel); else if (retval == 3) panel_unselect_all(dst_panel); } goto restart; } else continue; } else { char *msg; msg = xmalloc(80+strlen((char *)ks->key_seq)+1); sprintf(msg, "%s: invalid command on key sequence %s !", command->name, command->sequence); il_read_char(msg, (char *)NULL, IL_FREEZED|IL_BEEP|IL_SAVE|IL_ERROR); xfree(msg); continue; } } else { if (command->new_dir) { char *expanded_dir=tilde_expand(command->new_dir); panel_action(src_panel, act_CHDIR, dst_panel, expanded_dir, 1); dir_history_add(panel_get_path(src_panel)); xfree(expanded_dir); } goto restart; } } } } switch (key) { case key_INTERRUPT: il_free(saved_il); il_kill_line(IL_DONT_STORE); saved_il = il_save(); break; case BUILTIN_other_panel: if (!two_panel_mode) goto one_panel_mode; if ((repeat_count & 1) == 0) break; panel_set_focus(src_panel, OFF); tmp_panel = src_panel; src_panel = dst_panel; dst_panel = tmp_panel; panel_no = !panel_no; panel_set_focus(src_panel, ON); il_free(saved_il); set_prompt(); saved_il = il_save(); tty_update_title(panel_get_path(src_panel)); break; case BUILTIN_previous_line: panel_action(src_panel,act_UP,dst_panel,NULL,repeat_count); break; case BUILTIN_next_line: panel_action(src_panel,act_DOWN,dst_panel,NULL,repeat_count); break; case BUILTIN_action: action_status = 0; il_free(saved_il); il_get_contents(&cmdln); /* Remove the trailing spaces. */ for (i = strlen(cmdln) - 1; i >= 0; i--) if (cmdln[i] == ' ') cmdln[i] = '\0'; else break; switch (cmdln[0]) { case '+': if (cmdln[1] == '\0') panel_action(src_panel, act_SELECT_ALL, dst_panel, NULL, 1); else panel_action(src_panel, act_PATTERN_SELECT, dst_panel, cmdln + 1, 1); il_kill_line(IL_DONT_STORE); break; case '-': if (cmdln[1] == '\0') panel_action(src_panel, act_UNSELECT_ALL, dst_panel, NULL, 1); else panel_action(src_panel, act_PATTERN_UNSELECT, dst_panel, cmdln + 1, 1); il_kill_line(IL_DONT_STORE); break; case '\0': action_status = panel_action(src_panel, act_ENTER, dst_panel, screen, 1); tty_update_title(panel_get_path(src_panel)); il_kill_line(IL_DONT_STORE); set_prompt(); break; case '*': if (cmdln[1] == '\0') { panel_action(src_panel, act_TOGGLE, dst_panel, NULL, 1); il_kill_line(IL_DONT_STORE); break; } /* Fall through... */ default: if (history_expand(cmdln, &output_string) >= 0) { int bg_cmd; if (is_an_empty_command(output_string)) { saved_il = il_save(); il_read_char("Void command.", (char *)NULL, IL_FREEZED | IL_BEEP | IL_SAVE | IL_ERROR); break; } bg_cmd = is_a_bg_command(output_string); if (!bg_cmd) tty_update_title(output_string); il_kill_line(IL_DONT_STORE); il_insert_text(output_string); start(output_string, bg_cmd); il_history(IL_RECORD); il_kill_line(IL_DONT_STORE); /* HACK: Do not call tty_update(); here! */ if (!bg_cmd) { panel_no_optimizations(src_panel); panel_no_optimizations(dst_panel); tty_touch(); tty_get_screen(screen); action_status = 1; wait_msg = 1; } } else il_read_char(output_string, (char *)NULL, IL_FREEZED | IL_BEEP | IL_SAVE | IL_ERROR); break; } saved_il = il_save(); if (action_status) goto restart; break; case BUILTIN_select_entry: for (i = 0; i < repeat_count; i++) panel_action(src_panel, act_SELECT, dst_panel, NULL, 1); break; case BUILTIN_scroll_down: for (i = 0; i < repeat_count; i++) panel_action(src_panel, act_PGUP, dst_panel, NULL, 1); break; case BUILTIN_scroll_up: for (i = 0; i < repeat_count; i++) panel_action(src_panel, act_PGDOWN, dst_panel, NULL, 1); break; case BUILTIN_beginning_of_panel: panel_action(src_panel, act_HOME, dst_panel, NULL, 1); break; case BUILTIN_end_of_panel: panel_action(src_panel, act_END, dst_panel, NULL, 1); break; case BUILTIN_refresh: reread(); tty_update_title(panel_get_path(src_panel)); refresh(0); break; case BUILTIN_tty_mode: if ((repeat_count & 1) == 0) break; alarm(0); tty_put_screen(screen); #if 0 /* we used this to save the screen but under xterm it leaves the prompt bold when we quit */ tty_end_cursorapp(); #endif status(CommandLineModeHelp, STATUS_OK, STATUS_CENTERED); tty_update(); while (1) { il_restore(saved_il); saved_il = il_save(); il_update(); il_update_point(); tty_update(); il_get_contents(&cmdln); current_mode = GIT_TERMINAL_MODE; while ((ks = tty_get_key(&repeat_count)) == NULL) report_undefined_key(CommandLineModeHelp); key = ks->key_seq[0]; command = (command_t *)ks->aux_data; if (command && command->builtin) key = - 1 - (command->name - builtin[0]) / MAX_BUILTIN_NAME; if (key == BUILTIN_tty_mode && (repeat_count & 1)) { il_free(saved_il); saved_il = il_save(); break; } switch (key) { case key_INTERRUPT: il_free(saved_il); il_kill_line(IL_DONT_STORE); saved_il = il_save(); break; case BUILTIN_action: if (cmdln[0]) { il_free(saved_il); if (history_expand(cmdln, &output_string) < 0) { il_read_char(output_string, (char *)NULL, IL_FREEZED | IL_BEEP | IL_SAVE | IL_ERROR); saved_il = il_save(); break; } tty_put_screen(screen); il_kill_line(IL_DONT_STORE); il_insert_text(output_string); tty_update_title(output_string); start(output_string, 0); tty_get_screen(screen); il_history(IL_RECORD); status(CommandLineModeHelp, STATUS_OK, STATUS_CENTERED); il_kill_line(IL_DONT_STORE); saved_il = il_save(); tty_update_title(panel_get_path(src_panel)); tty_update(); } break; case BUILTIN_previous_history_element: case BUILTIN_previous_line: il_free(saved_il); for (i = 0; i < repeat_count; i++) { il_history(IL_PREVIOUS); tty_update(); } saved_il = il_save(); break; case BUILTIN_next_history_element: case BUILTIN_next_line: il_free(saved_il); for (i = 0; i < repeat_count; i++) { il_history(IL_NEXT); tty_update(); } saved_il = il_save(); break; case BUILTIN_refresh: refresh(0); tty_put_screen(screen); status(CommandLineModeHelp, STATUS_OK, STATUS_CENTERED); tty_update(); break; case BUILTIN_exit: if (ConfirmOnExit == OFF || il_read_char(exit_msg,"yn",IL_FREEZED) == 'y') { app_end = 1; goto end_tty_mode; } status(CommandLineModeHelp, STATUS_OK, STATUS_CENTERED); tty_update(); break; default: if (key) { il_free(saved_il); while (repeat_count--) il_dispatch_commands(key, IL_MOVE|IL_EDIT); saved_il = il_save(); } break; } status_update(); } end_tty_mode: #if 0 /* leaves prompt bold when we quit under xterm */ tty_start_cursorapp(); #endif panel_no_optimizations(src_panel); panel_no_optimizations(dst_panel); tty_touch(); status_default(); tty_update(); alarm(60 - get_local_time()->tm_sec); current_mode = GIT_SCREEN_MODE; if (app_end) continue; goto restart; case BUILTIN_copy: panel_action(src_panel, act_COPY, dst_panel, NULL, 1); break; case BUILTIN_move: panel_action(src_panel, act_MOVE, dst_panel, NULL, 1); break; case BUILTIN_make_directory: panel_action(src_panel, act_MKDIR, dst_panel, NULL, 1); break; case BUILTIN_delete: panel_action(src_panel, act_DELETE, dst_panel, NULL, 1); break; case BUILTIN_panel_enable_next_mode: case BUILTIN_panel_enable_owner_group: case BUILTIN_panel_enable_date_time: case BUILTIN_panel_enable_abbrevsize: case BUILTIN_panel_enable_size: case BUILTIN_panel_enable_mode: case BUILTIN_panel_enable_full_name: panel_action(src_panel, act_ENABLE_NEXT_MODE - (key - BUILTIN_panel_enable_next_mode), NULL, NULL, 1); break; case BUILTIN_panel_sort_next_method: case BUILTIN_panel_sort_by_name: case BUILTIN_panel_sort_by_extension: case BUILTIN_panel_sort_by_size: case BUILTIN_panel_sort_by_date: case BUILTIN_panel_sort_by_mode: case BUILTIN_panel_sort_by_owner_id: case BUILTIN_panel_sort_by_group_id: case BUILTIN_panel_sort_by_owner_name: case BUILTIN_panel_sort_by_group_name: panel_action(src_panel, act_SORT_NEXT_METHOD - (key - BUILTIN_panel_sort_next_method), NULL, NULL, 1); break; case BUILTIN_exit: if (ConfirmOnExit == OFF || il_read_char(exit_msg, "yn", IL_FREEZED) == 'y') app_end = 1; break; case BUILTIN_entry_to_input_line: srcptr = panel_get_current_file_name(src_panel); ptr = xmalloc(1 + 1 + strlen(srcptr) + 1 + 1 + 1); copy_to_cmdln: len = strlen(cmdln); il_free(saved_il); /* FIXME: I removed the quotes since git is not able to handle non-printable characters in the command line anyway. We just convert them to question marks. */ /* If the character before the position where we want to insert the file name is ' ' or '/', we don't insert a space before the file name, to avoid redundant spaces and allow for easy path concatenation. */ if ((len != 0) && ((cmdln[il_point() - 1] == '/') || (cmdln[il_point() - 1] == ' '))) { if (needs_quotes(srcptr, strlen(srcptr))) sprintf(ptr, "\"%s\" ", srcptr); else sprintf(ptr, "%s ", srcptr); } else { if (needs_quotes(srcptr, strlen(srcptr))) sprintf(ptr, " \"%s\" ", srcptr); else sprintf(ptr, " %s ", srcptr); } ptrlen = strlen(ptr); toprintable(ptr, strlen(ptr)); il_insert_text(ptr); xfree(ptr); saved_il = il_save(); break; case BUILTIN_other_path_to_input_line: srcptr = dst_panel->path; ptr = xmalloc(1 + 1 + dst_panel->pathlen + 1 + 1 + 1); goto copy_to_cmdln; case BUILTIN_selected_entries_to_input_line: len = strlen(cmdln); il_free(saved_il); panel_init_iterator(src_panel); while ((entry = panel_get_next(src_panel)) != -1) { srcptr = src_panel->dir_entry[entry].name; ptr = xmalloc(1 + 1 + strlen(srcptr) + 1 + 1 + 1); if (needs_quotes(srcptr, strlen(srcptr))) sprintf(ptr, " \"%s\"", srcptr); else sprintf(ptr, " %s", srcptr); ptrlen = strlen(ptr); len += ptrlen; toprintable(ptr, ptrlen); il_insert_text(ptr); xfree(ptr); } il_insert_text(" "); saved_il = il_save(); break; case BUILTIN_previous_history_element: il_free(saved_il); for (i = 0; i < repeat_count; i++) { il_history(IL_PREVIOUS); tty_update(); } saved_il = il_save(); break; case BUILTIN_next_history_element: il_free(saved_il); for (i = 0; i < repeat_count; i++) { il_history(IL_NEXT); tty_update(); } saved_il = il_save(); break; case BUILTIN_switch_panels: if ((repeat_count & 1) == 0) break; if (!two_panel_mode) break; panel_no_optimizations(src_panel); panel_no_optimizations(dst_panel); panel_action(src_panel, act_SWITCH, dst_panel, NULL, 1); panel_update(src_panel); panel_update(dst_panel); break; case BUILTIN_change_directory: if (il_read_line("Directory: ", &input, (char *)NULL, command->history)) { char *expanded_input; if (input[0] == 0) break; panel_action(src_panel, act_CHDIR, dst_panel, expanded_input = tilde_expand(input), 1); dir_history_add(panel_get_path(src_panel)); xfree(expanded_input); xfree(input); input = NULL; il_restore(saved_il); set_prompt(); saved_il = il_save(); tty_update_title(panel_get_path(src_panel)); } break; case BUILTIN_select_files_matching_pattern: if (il_read_line( "Select files matching one of the patterns: ", &input, (char *)NULL, command->history)) { if (input[0] == 0) break; panel_action(src_panel, act_PATTERN_SELECT, dst_panel, input, 1); xfree(input); input = NULL; } break; case BUILTIN_unselect_files_matching_pattern: if (il_read_line( "Unselect files matching one of the patterns: ", &input, (char *)NULL, command->history)) { if (input[0] == 0) break; panel_action(src_panel, act_PATTERN_UNSELECT, dst_panel, input, 1); xfree(input); input = NULL; } break; case BUILTIN_adapt_current_directory: panel_action(src_panel, act_CHDIR, dst_panel, dst_panel->path, 1); dir_history_add(panel_get_path(src_panel)); il_free(saved_il); set_prompt(); saved_il = il_save(); tty_update_title(panel_get_path(src_panel)); break; case BUILTIN_adapt_other_directory: panel_action(dst_panel, act_CHDIR, src_panel, src_panel->path, 1); dir_history_add(panel_get_path(dst_panel)); break; case BUILTIN_set_scroll_step: if (il_read_line("Scroll step: ", &input, (char *)NULL, command->history)) { if (input[0] == 0) break; panel_action(src_panel, act_SET_SCROLL_STEP, dst_panel, input, 1); xfree(input); input = NULL; } break; case BUILTIN_isearch_backward: previous_isearch_failed = 0; resuming_previous_isearch = 0; il_isearch("I-search backward: ", (char **)NULL, IL_ISEARCH_BEGIN, (int *)NULL); panel_action(src_panel, act_ISEARCH_BEGIN, dst_panel, NULL, 1); for(;;) { isearch_aux_t iai; if (il_isearch((char *)NULL, &input, IL_ISEARCH_BACKWARD, &iai.action) == NULL) break; /* If the strlen(input) == 0, we typed ^R twice, so we must search for the string we searched previously. */ if (strlen(input) == 0 && search_string && strlen(search_string)) { xfree(input); input = strdup(search_string); il_insert_text(input); resuming_previous_isearch = 1; previous_isearch_failed = 0; } /* Wrap around. */ if (iai.action == IL_ISEARCH_ACTION_RETRY && previous_isearch_failed) { panel_set_wrapped_isearch_flag(src_panel, 1); previous_isearch_failed = 0; } iai.string = input; panel_action(src_panel, act_ISEARCH_BACKWARD, dst_panel, &iai, 1); if (iai.action == IL_ISEARCH_ACTION_FAILED) { previous_isearch_failed = 1; tty_beep(); } else { int update = 0; if (resuming_previous_isearch) if (iai.length < strlen(search_string)) { il_kill_line(0); resuming_previous_isearch = 0; update = 1; } if (iai.length < strlen(input)) { il_backward_delete_char(); update = 1; } if (update) { il_update(); il_update_point(); tty_update(); } } } if (search_string) xfree(search_string); if (input == NULL) break; search_string = strdup(input); panel_action(src_panel, act_ISEARCH_END, dst_panel, NULL, 1); il_isearch((char *)NULL, (char **)NULL, IL_ISEARCH_END, (int *)NULL); break; case BUILTIN_isearch_forward: previous_isearch_failed = 0; resuming_previous_isearch = 0; il_isearch("I-search: ", (char **)NULL, IL_ISEARCH_BEGIN, (int *)NULL); panel_action(src_panel, act_ISEARCH_BEGIN, dst_panel, NULL, 1); for(;;) { isearch_aux_t iai; if (il_isearch((char *)NULL, &input, IL_ISEARCH_FORWARD, &iai.action) == NULL) break; /* If the strlen(input) == 0, we typed ^S twice, so we must search for the string we searched previously. */ if (strlen(input) == 0 && search_string && strlen(search_string)) { xfree(input); input = strdup(search_string); il_insert_text(input); resuming_previous_isearch = 1; previous_isearch_failed = 0; } /* Wrap around. */ if (iai.action == IL_ISEARCH_ACTION_RETRY && previous_isearch_failed) { tty_beep(); panel_set_wrapped_isearch_flag(src_panel, 1); previous_isearch_failed = 0; } iai.string = input; panel_action(src_panel, act_ISEARCH_FORWARD, dst_panel, &iai, 1); if (iai.action == IL_ISEARCH_ACTION_FAILED) { previous_isearch_failed = 1; tty_beep(); } else { int update = 0; if (resuming_previous_isearch) if (iai.length < strlen(search_string)) { il_kill_line(0); resuming_previous_isearch = 0; update = 1; } if (iai.length < strlen(input)) { il_backward_delete_char(); update = 1; } if (update) { il_update(); il_update_point(); tty_update(); } } } if (search_string) xfree(search_string); if (input == NULL) break; search_string = strdup(input); panel_action(src_panel, act_ISEARCH_END, dst_panel, NULL, 1); il_isearch((char *)NULL, (char **)NULL, IL_ISEARCH_END, (int *)NULL); break; case BUILTIN_reset_directory_history: dir_history_reset(); dir_history_add(panel_get_path(src_panel)); break; case BUILTIN_previous_directory: dir_history_prev(src_panel, dst_panel); il_restore(saved_il); set_prompt(); saved_il = il_save(); tty_update_title(panel_get_path(src_panel)); break; case BUILTIN_next_directory: dir_history_next(src_panel, dst_panel); il_restore(saved_il); set_prompt(); saved_il = il_save(); tty_update_title(panel_get_path(src_panel)); break; case BUILTIN_enlarge_other_panel: one_panel_mode: panel_set_focus(src_panel, OFF); tmp_panel = src_panel; src_panel = dst_panel; dst_panel = tmp_panel; panel_no = !panel_no; panel_set_focus(src_panel, ON); panel_activate(src_panel); il_free(saved_il); set_prompt(); saved_il = il_save(); tty_update_title(panel_get_path(src_panel)); case BUILTIN_enlarge_panel: panel_no_optimizations(src_panel); panel_no_optimizations(dst_panel); tty_touch(); panel_deactivate(dst_panel); two_panel_mode = 0; resize(1); panel_action(src_panel, act_ENABLE_ALL, NULL, NULL, 1); panel_action(dst_panel, act_ENABLE_ALL, NULL, NULL, 1); panel_update(src_panel); break; case BUILTIN_two_panels: panel_no_optimizations(src_panel); panel_no_optimizations(dst_panel); tty_touch(); panel_activate(dst_panel); two_panel_mode = 1; resize(1); if (tty_columns < 6 * 2) refresh(1); panel_action(src_panel, act_ENABLE_SIZE, NULL, NULL, 1); panel_action(dst_panel, act_ENABLE_SIZE, NULL, NULL, 1); panel_update(src_panel); panel_update(dst_panel); break; case BUILTIN_lock: /* Turn echo off. */ il_echo(0); lock_password = NULL; il_read_line("Enter a password: ", &lock_password, (char *)NULL, (xstack_t *)NULL); if (lock_password == NULL || *lock_password == '\0') { il_echo(1); break; } for (unlock_password = NULL;;) { il_read_line("Enter password to unlock: ", &unlock_password, (char *)NULL, (xstack_t *)NULL); tty_update(); if (unlock_password && strcmp(lock_password, unlock_password) == 0) break; il_message(lock_bad); tty_beep(); tty_update(); sleep(2); } tty_update(); xfree(lock_password); xfree(unlock_password); /* Turn echo back on. */ il_echo(1); break; case BUILTIN_quick_compare_panels: cmp_mode = CMPDIR_QUICK; panel_action(src_panel, act_CMPDIR, dst_panel, &cmp_mode, 1); break; case BUILTIN_thorough_compare_panels: cmp_mode = CMPDIR_THOROUGH; panel_action(src_panel, act_CMPDIR, dst_panel, &cmp_mode, 1); break; case BUILTIN_name_downcase: to_case = CASE_DOWN; panel_action(src_panel, act_CASE, dst_panel, &to_case, 1); break; case BUILTIN_name_upcase: to_case = CASE_UP; panel_action(src_panel, act_CASE, dst_panel, &to_case, 1); break; case BUILTIN_up_one_dir: panel_action(src_panel, act_UP_ONE_DIR, dst_panel, NULL, 1); il_restore(saved_il); set_prompt(); saved_il = il_save(); tty_update_title(panel_get_path(src_panel)); break; case BUILTIN_compare: panel_action(src_panel, act_COMPARE, dst_panel, NULL, 1); break; case BUILTIN_bin_packing: if (il_read_line("Bin size (in Kb): ", &input, "0", command->history)) { if (input[0] == 0) break; panel_action(src_panel, act_BIN_PACKING, dst_panel, input, 1); xfree(input); input = NULL; } break; case BUILTIN_horizontal_scroll_left: panel_action(src_panel, act_HORIZONTAL_SCROLL_LEFT, dst_panel, input, repeat_count); break; case BUILTIN_horizontal_scroll_right: panel_action(src_panel, act_HORIZONTAL_SCROLL_RIGHT, dst_panel, input, repeat_count); break; case BUILTIN_select_extension: panel_action(src_panel, act_SELECT_EXTENSION, dst_panel, NULL, 1); break; case BUILTIN_unselect_extension: panel_action(src_panel, act_UNSELECT_EXTENSION, dst_panel, NULL, 1); break; case BUILTIN_apropos: aproposstr=NULL; il_read_line("Apropos: ", &aproposstr, (char *)NULL, command->history); if (aproposstr) { if(*aproposstr != '\0') { extern tty_key_t *key_list_head; tty_key_t *key; int fd; FILE *fp=NULL; int gotmatch=0; char *template="gnuit-apropos-XXXXXX"; char *tmpfn; tmpfn=xmalloc(strlen(temporary_directory)+strlen(template)+1+2); sprintf(tmpfn,"%s/%s",temporary_directory,template); fd=mkstemp(tmpfn); if(fd != -1) fp=fdopen(fd,"w"); if(!fp) { il_read_char("Error opening temporary file", NULL, IL_ERROR|IL_BEEP); break; } for(key=key_list_head;key;key=key->next) { command_t *command=(command_t *)key->aux_data; if(strcasestr(command->name, aproposstr)) { gotmatch=1; fprintf(fp,"%s: %s\n",command->name, command->sequence); } } fclose(fp); if(gotmatch) { char *cmd, *pager; pager=getenv("GNUIT_PAGER"); if(!pager) pager="more"; cmd=xmalloc(strlen(pager)+strlen(tmpfn)+1+1); sprintf(cmd,"%s %s",pager,tmpfn); start(cmd,0); xfree(cmd); wait_msg=1; } else il_read_char("No matches", NULL, 0); unlink(tmpfn); xfree(tmpfn); } xfree(aproposstr); goto restart; } break; default: if (key) { il_free(saved_il); while (repeat_count--) il_dispatch_commands(key, IL_MOVE | IL_EDIT); saved_il = il_save(); } break; } } final_path = panel_get_path(src_panel); panel_end(left_panel); panel_end(right_panel); tty_set_mode(TTY_CANONIC); tty_defaults(); if (il) il_end(); status_end(); remove_log(); tty_end(screen); if (output_final_path) write(3, final_path, strlen(final_path)); return 0; } gnuit-4.9.5/src/system.h0000644000175000017500000000271111146671376012101 00000000000000/* system.h -- Prototypes and #defines for the stuff in system.c. */ /* Copyright (C) 1993-1999, 2006-2007 Free Software Foundation, Inc. This file is part of gnuit. gnuit 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 3 of the License, or (at your option) any later version. gnuit 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, see http://www.gnu.org/licenses/. */ /* Written by Tudor Hulubei and Andrei Pitis. */ #ifndef _GIT_SYSTEM_H #define _GIT_SYSTEM_H #include "stdc.h" #if HAVE_SYS_WAIT_H #include #endif #ifndef WEXITSTATUS #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8) #endif #ifndef WIFEXITED #define WIFEXITED(stat_val) (((stat_val) & 0xFF) == 0) #endif #ifndef WIFSIGNALED #define WIFSIGNALED(stat_val) ((int)((stat_val) & 0xFF) != 0) #endif extern char *stdout_log_name; extern char *stderr_log_name; extern char *stdout_log_template; extern char *stderr_log_template; extern int start PROTO ((char *, int)); extern void remove_log PROTO (()); extern void display_errors PROTO ((char *)); #endif /* _GIT_SYSTEM_H */ gnuit-4.9.5/src/misc.h0000644000175000017500000000620111146671376011506 00000000000000/* misc.h -- Prototypes for the functions in misc.c. */ /* Copyright (C) 1993-2000, 2006-2007 Free Software Foundation, Inc. This file is part of gnuit. gnuit 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 3 of the License, or (at your option) any later version. gnuit 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, see http://www.gnu.org/licenses/. */ /* Written by Tudor Hulubei and Andrei Pitis. */ #ifndef _GIT_MISC_H #define _GIT_MISC_H #include #ifdef HAVE_STDDEF_H #include #endif #ifdef HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ #include "xtime.h" #include "stdc.h" #include "file.h" extern char *g_home; extern char *g_program; extern char *login_name; extern char *day_name[]; extern char *month_name[]; extern char color_section[]; extern char monochrome_section[]; #undef max #undef min #define max(a, b) (((a) >= (b)) ? (a) : (b)) #define min(a, b) (((a) <= (b)) ? (a) : (b)) /* It looks like we need this for SunOS. */ #ifndef RAND_MAX #define RAND_MAX 2147483647 #endif #define close2(fd1, fd2) \ { \ close(fd1); \ close(fd2); \ } #define xfree2(ptr1, ptr2) \ { \ xfree(ptr1); \ xfree(ptr2); \ } typedef struct file_type_info_tag { char *pattern; int foreground; int background; int brightness; struct file_type_info_tag *next; } file_type_info_t; extern file_type_info_t * fti_head; extern void compute_directories PROTO (()); extern void update_path PROTO (()); extern RETSIGTYPE fatal_signal PROTO ((int)); extern void display_exit_message PROTO ((char *)); extern void configuration_help PROTO ((char *)); extern void common_configuration_init PROTO (()); extern int specific_configuration_init PROTO (()); extern void use_section PROTO ((char *)); extern int get_int_var PROTO ((char *, int)); extern int get_const_var PROTO ((char *, char *[], int, int)); extern int get_flag_var PROTO ((char *, int)); extern char *get_string_var PROTO ((char *, char *)); extern void get_colorset_var PROTO ((int *, char *[], int)); extern char *minimize_path PROTO ((char *)); extern void get_login_name PROTO (()); extern void truncate_long_name PROTO ((char *, char *, int)); extern char *truncate_string PROTO ((char *, char *, int)); extern off64_t get_file_length PROTO ((int)); extern struct tm *get_local_time PROTO (()); extern int is_a_bg_command PROTO ((char *)); extern int is_an_empty_command PROTO ((char *)); extern void get_file_type_info PROTO (()); extern void toprintable PROTO ((char *, size_t)); extern int needs_quotes PROTO ((char *, size_t)); extern int xsetenv PROTO ((char *, char *)); #endif /* _GIT_MISC_H */ gnuit-4.9.5/src/history.c0000644000175000017500000013703111146671376012255 00000000000000/* history.c -- Standalone history library. */ /* Copyright (C) 1989, 1992 Free Software Foundation, Inc. This file is part of gnuit. gnuit 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 3 of the License, or (at your option) any later version. gnuit 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, see http://www.gnu.org/licenses/. */ /* The goal is to make the implementation transparent, so that you don't have to know what data types are used, just what functions you can call. I think I have done that. */ #define READLINE_LIBRARY #ifdef HAVE_CONFIG_H #include #endif #include #include #include "file.h" #include "xio.h" #if defined (HAVE_STDLIB_H) # include #else # include "ansi_stdlib.h" #endif /* HAVE_STDLIB_H */ #if defined (HAVE_UNISTD_H) # include #endif #include "xstring.h" #include /* Not all systems declare ERRNO in errno.h... and some systems #define it! */ #if !defined (errno) extern int errno; #endif /* !errno */ #include "history.h" #include "xmalloc.h" #define STREQ(a, b) (((a)[0] == (b)[0]) && (strcmp ((a), (b)) == 0)) #define STREQN(a, b, n) (((a)[0] == (b)[0]) && (strncmp ((a), (b), (n)) == 0)) #ifndef savestring # ifndef strcpy extern char *strcpy (); # endif #define savestring(x) strcpy (xmalloc (1 + strlen (x)), (x)) #endif #ifndef whitespace #define whitespace(c) (((c) == ' ') || ((c) == '\t')) #endif #ifndef digit #define digit(c) ((c) >= '0' && (c) <= '9') #endif #ifndef digit_value #define digit_value(c) ((c) - '0') #endif #ifndef member # ifndef strchr extern char *strchr (); # endif #define member(c, s) ((c) ? ((char *)strchr ((s), (c)) != (char *)NULL) : 0) #endif /* Possible history errors passed to hist_error. */ #define EVENT_NOT_FOUND 0 #define BAD_WORD_SPEC 1 #define SUBST_FAILED 2 #define BAD_MODIFIER 3 static char error_pointer; static char *subst_lhs; static char *subst_rhs; static int subst_lhs_len = 0; static int subst_rhs_len = 0; static char *get_history_word_specifier (); #if defined (SHELL) extern char *single_quote (); #endif /* **************************************************************** */ /* */ /* History Functions */ /* */ /* **************************************************************** */ /* An array of HIST_ENTRY. This is where we store the history. */ static HIST_ENTRY **the_history = (HIST_ENTRY **)NULL; /* Non-zero means that we have enforced a limit on the amount of history that we save. */ int history_stifled = 0; /* If HISTORY_STIFLED is non-zero, then this is the maximum number of entries to remember. */ int max_input_history; /* The current location of the interactive history pointer. Just makes life easier for outside callers. */ static int history_offset = 0; /* The number of strings currently stored in the input_history list. */ int history_length = 0; /* The current number of slots allocated to the input_history. */ static int history_size = 0; /* The number of slots to increase the_history by. */ #define DEFAULT_HISTORY_GROW_SIZE 50 /* The character that represents the start of a history expansion request. This is usually `!'. */ char history_expansion_char = '!'; /* The character that invokes word substitution if found at the start of a line. This is usually `^'. */ char history_subst_char = '^'; /* During tokenization, if this character is seen as the first character of a word, then it, and all subsequent characters upto a newline are ignored. For a Bourne shell, this should be '#'. Bash special cases the interactive comment character to not be a comment delimiter. */ char history_comment_char = '\0'; /* The list of characters which inhibit the expansion of text if found immediately following history_expansion_char. */ char *history_no_expand_chars = " \t\n\r="; /* The logical `base' of the history array. It defaults to 1. */ int history_base = 1; /* Return the current HISTORY_STATE of the history. */ HISTORY_STATE * history_get_history_state () { HISTORY_STATE *state; state = (HISTORY_STATE *)xmalloc (sizeof (HISTORY_STATE)); state->entries = the_history; state->offset = history_offset; state->length = history_length; state->size = history_size; return (state); } /* Set the state of the current history array to STATE. */ void history_set_history_state (state) HISTORY_STATE *state; { the_history = state->entries; history_offset = state->offset; history_length = state->length; history_size = state->size; } /* Begin a session in which the history functions might be used. This initializes interactive variables. */ void using_history () { history_offset = history_length; } /* Return the number of bytes that the primary history entries are using. This just adds up the lengths of the_history->lines. */ int history_total_bytes () { register int i, result; result = 0; for (i = 0; the_history && the_history[i]; i++) result += strlen (the_history[i]->line); return (result); } /* Place STRING at the end of the history list. The data field is set to NULL. */ void add_history (string) char *string; { HIST_ENTRY *temp; if (history_stifled && (history_length == max_input_history)) { register int i; /* If the history is stifled, and history_length is zero, and it equals max_input_history, we don't save items. */ if (history_length == 0) return; /* If there is something in the slot, then remove it. */ if (the_history[0]) { xfree (the_history[0]->line); xfree (the_history[0]); } /* Copy the rest of the entries, moving down one slot. */ for (i = 0; i < history_length; i++) the_history[i] = the_history[i + 1]; history_base++; } else { if (!history_size) { history_size = DEFAULT_HISTORY_GROW_SIZE; the_history = (HIST_ENTRY **)xmalloc (history_size * sizeof (HIST_ENTRY *)); history_length = 1; } else { if (history_length == (history_size - 1)) { history_size += DEFAULT_HISTORY_GROW_SIZE; the_history = (HIST_ENTRY **) xrealloc (the_history, history_size * sizeof (HIST_ENTRY *)); } history_length++; } } temp = (HIST_ENTRY *)xmalloc (sizeof (HIST_ENTRY)); temp->line = savestring (string); temp->data = (char *)NULL; the_history[history_length] = (HIST_ENTRY *)NULL; the_history[history_length - 1] = temp; } /* Make the history entry at WHICH have LINE and DATA. This returns the old entry so you can dispose of the data. In the case of an invalid WHICH, a NULL pointer is returned. */ HIST_ENTRY * replace_history_entry (which, line, data) int which; char *line; char *data; { HIST_ENTRY *temp = (HIST_ENTRY *)xmalloc (sizeof (HIST_ENTRY)); HIST_ENTRY *old_value; if (which >= history_length) return ((HIST_ENTRY *)NULL); old_value = the_history[which]; temp->line = savestring (line); temp->data = data; the_history[which] = temp; return (old_value); } /* Returns the magic number which says what history element we are looking at now. In this implementation, it returns history_offset. */ int where_history () { return (history_offset); } /* Search the history for STRING, starting at history_offset. If DIRECTION < 0, then the search is through previous entries, else through subsequent. If ANCHORED is non-zero, the string must appear at the beginning of a history line, otherwise, the string may appear anywhere in the line. If the string is found, then current_history () is the history entry, and the value of this function is the offset in the line of that history entry that the string was found in. Otherwise, nothing is changed, and a -1 is returned. */ #define ANCHORED_SEARCH 1 #define NON_ANCHORED_SEARCH 0 static int history_search_internal (string, direction, anchored) char *string; int direction, anchored; { register int i, reverse; register char *line; register int line_index; int string_len; i = history_offset; reverse = (direction < 0); /* Take care of trivial cases first. */ if (!history_length || ((i == history_length) && !reverse)) return (-1); if (reverse && (i == history_length)) i--; #define NEXT_LINE() do { if (reverse) i--; else i++; } while (0) string_len = strlen (string); while (1) { /* Search each line in the history list for STRING. */ /* At limit for direction? */ if ((reverse && i < 0) || (!reverse && i == history_length)) return (-1); line = the_history[i]->line; line_index = strlen (line); /* If STRING is longer than line, no match. */ if (string_len > line_index) { NEXT_LINE (); continue; } /* Handle anchored searches first. */ if (anchored == ANCHORED_SEARCH) { if (STREQN (string, line, string_len)) { history_offset = i; return (0); } NEXT_LINE (); continue; } /* Do substring search. */ if (reverse) { line_index -= string_len; while (line_index >= 0) { if (STREQN (string, line + line_index, string_len)) { history_offset = i; return (line_index); } line_index--; } } else { register int limit = line_index - string_len + 1; line_index = 0; while (line_index < limit) { if (STREQN (string, line + line_index, string_len)) { history_offset = i; return (line_index); } line_index++; } } NEXT_LINE (); } } /* Do a non-anchored search for STRING through the history in DIRECTION. */ int history_search (string, direction) char *string; int direction; { return (history_search_internal (string, direction, NON_ANCHORED_SEARCH)); } /* Do an anchored search for string through the history in DIRECTION. */ int history_search_prefix (string, direction) char *string; int direction; { return (history_search_internal (string, direction, ANCHORED_SEARCH)); } /* Remove history element WHICH from the history. The removed element is returned to you so you can free the line, data, and containing structure. */ HIST_ENTRY * remove_history (which) int which; { HIST_ENTRY *return_value; if (which >= history_length || !history_length) return_value = (HIST_ENTRY *)NULL; else { register int i; return_value = the_history[which]; for (i = which; i < history_length; i++) the_history[i] = the_history[i + 1]; history_length--; } return (return_value); } /* Stifle the history list, remembering only MAX number of lines. */ void stifle_history (max) int max; { if (max < 0) max = 0; if (history_length > max) { register int i, j; /* This loses because we cannot free the data. */ for (i = 0; i < (history_length - max); i++) { xfree (the_history[i]->line); xfree (the_history[i]); } history_base = i; for (j = 0, i = history_length - max; j < max; i++, j++) the_history[j] = the_history[i]; the_history[j] = (HIST_ENTRY *)NULL; history_length = j; } history_stifled = 1; max_input_history = max; } /* Stop stifling the history. This returns the previous amount the history was stifled by. The value is positive if the history was stifled, negative if it wasn't. */ int unstifle_history () { int result = max_input_history; if (history_stifled) { result = -result; history_stifled = 0; } return (result); } /* Return the string that should be used in the place of this filename. This only matters when you don't specify the filename to read_history (), or write_history (). */ static char * history_filename (filename) char *filename; { char *return_val = filename ? savestring (filename) : (char *)NULL; if (!return_val) { char *home; int home_len; home = getenv ("HOME"); if (!home) home = "."; home_len = strlen (home); /* strlen(".history") == 8 */ return_val = xmalloc (2 + home_len + 8); strcpy (return_val, home); return_val[home_len] = '/'; strcpy (return_val + home_len + 1, ".history"); } return (return_val); } /* Add the contents of FILENAME to the history list, a line at a time. If FILENAME is NULL, then read from ~/.history. Returns 0 if successful, or errno if not. */ int read_history (filename) char *filename; { return (read_history_range (filename, 0, -1)); } /* Read a range of lines from FILENAME, adding them to the history list. Start reading at the FROM'th line and end at the TO'th. If FROM is zero, start at the beginning. If TO is less than FROM, read until the end of the file. If FILENAME is NULL, then read from ~/.history. Returns 0 if successful, or errno if not. */ int read_history_range (filename, from, to) char *filename; int from, to; { register int line_start, line_end; char *input, *buffer = (char *)NULL; int file, current_line; struct stat finfo; input = history_filename (filename); file = open (input, O_RDONLY, 0666); if ((file < 0) || (xfstat (file, &finfo) == -1)) goto error_and_exit; buffer = xmalloc ((int)finfo.st_size + 1); if (read (file, buffer, finfo.st_size) != finfo.st_size) { error_and_exit: if (file >= 0) close (file); if (input) xfree (input); if (buffer) xfree (buffer); return (errno); } close (file); /* Set TO to larger than end of file if negative. */ if (to < 0) to = finfo.st_size; /* Start at beginning of file, work to end. */ line_start = line_end = current_line = 0; /* Skip lines until we are at FROM. */ while (line_start < finfo.st_size && current_line < from) { for (line_end = line_start; line_end < finfo.st_size; line_end++) if (buffer[line_end] == '\n') { current_line++; line_start = line_end + 1; if (current_line == from) break; } } /* If there are lines left to gobble, then gobble them now. */ for (line_end = line_start; line_end < finfo.st_size; line_end++) if (buffer[line_end] == '\n') { buffer[line_end] = '\0'; if (buffer[line_start]) add_history (buffer + line_start); current_line++; if (current_line >= to) break; line_start = line_end + 1; } if (input) xfree (input); if (buffer) xfree (buffer); return (0); } /* Truncate the history file FNAME, leaving only LINES trailing lines. If FNAME is NULL, then use ~/.history. */ int history_truncate_file (fname, lines) char *fname; register int lines; { register int i; int file, chars_read; char *buffer = (char *)NULL, *filename; struct stat finfo; filename = history_filename (fname); file = open (filename, O_RDONLY, 0666); if (file == -1 || xfstat (file, &finfo) == -1) goto truncate_exit; buffer = xmalloc ((int)finfo.st_size + 1); chars_read = read (file, buffer, finfo.st_size); close (file); if (chars_read <= 0) goto truncate_exit; /* Count backwards from the end of buffer until we have passed LINES lines. */ for (i = chars_read - 1; lines && i; i--) { if (buffer[i] == '\n') lines--; } /* If this is the first line, then the file contains exactly the number of lines we want to truncate to, so we don't need to do anything. It's the first line if we don't find a newline between the current value of i and 0. Otherwise, write from the start of this line until the end of the buffer. */ for ( ; i; i--) if (buffer[i] == '\n') { i++; break; } /* Write only if there are more lines in the file than we want to truncate to. */ if (i && ((file = open (filename, O_WRONLY|O_TRUNC, 0666)) != -1)) { write (file, buffer + i, finfo.st_size - i); close (file); } truncate_exit: if (buffer) xfree (buffer); xfree (filename); return 0; } #define HISTORY_APPEND 0 #define HISTORY_OVERWRITE 1 /* Workhorse function for writing history. Writes NELEMENT entries from the history list to FILENAME. OVERWRITE is non-zero if you wish to replace FILENAME with the entries. */ static int history_do_write (filename, nelements, overwrite) char *filename; int nelements, overwrite; { register int i; char *output = history_filename (filename); int file, mode; mode = overwrite ? O_WRONLY | O_CREAT | O_TRUNC : O_WRONLY | O_APPEND; if ((file = open (output, mode, 0666)) == -1) { if (output) xfree (output); return (errno); } if (nelements > history_length) nelements = history_length; /* Build a buffer of all the lines to write, and write them in one syscall. Suggested by Peter Ho (peter@robosts.oxford.ac.uk). */ { register int j = 0; int buffer_size = 0; char *buffer; /* Calculate the total number of bytes to write. */ for (i = history_length - nelements; i < history_length; i++) buffer_size += 1 + strlen (the_history[i]->line); /* Allocate the buffer, and fill it. */ buffer = xmalloc (buffer_size); for (i = history_length - nelements; i < history_length; i++) { strcpy (buffer + j, the_history[i]->line); j += strlen (the_history[i]->line); buffer[j++] = '\n'; } write (file, buffer, buffer_size); xfree (buffer); } close (file); if (output) xfree (output); return (0); } /* Append NELEMENT entries to FILENAME. The entries appended are from the end of the list minus NELEMENTs up to the end of the list. */ int append_history (nelements, filename) int nelements; char *filename; { return (history_do_write (filename, nelements, HISTORY_APPEND)); } /* Overwrite FILENAME with the current history. If FILENAME is NULL, then write the history list to ~/.history. Values returned are as in read_history ().*/ int write_history (filename) char *filename; { return (history_do_write (filename, history_length, HISTORY_OVERWRITE)); } /* Return the history entry at the current position, as determined by history_offset. If there is no entry there, return a NULL pointer. */ HIST_ENTRY * current_history () { if ((history_offset == history_length) || !the_history) return ((HIST_ENTRY *)NULL); else return (the_history[history_offset]); } /* Back up history_offset to the previous history entry, and return a pointer to that entry. If there is no previous entry then return a NULL pointer. */ HIST_ENTRY * previous_history () { if (!history_offset) return ((HIST_ENTRY *)NULL); else return (the_history[--history_offset]); } /* Move history_offset forward to the next history entry, and return a pointer to that entry. If there is no next entry then return a NULL pointer. */ HIST_ENTRY * next_history () { if (history_offset == history_length) return ((HIST_ENTRY *)NULL); else return (the_history[++history_offset]); } /* Return the current history array. The caller has to be carefull, since this is the actual array of data, and could be bashed or made corrupt easily. The array is terminated with a NULL pointer. */ HIST_ENTRY ** history_list () { return (the_history); } /* Return the history entry which is logically at OFFSET in the history array. OFFSET is relative to history_base. */ HIST_ENTRY * history_get (offset) int offset; { int local_index = offset - history_base; if (local_index >= history_length || local_index < 0 || !the_history) return ((HIST_ENTRY *)NULL); return (the_history[local_index]); } /* Search for STRING in the history list. DIR is < 0 for searching backwards. POS is an absolute index into the history list at which point to begin searching. */ int history_search_pos (string, dir, pos) char *string; int dir, pos; { int ret, old = where_history (); history_set_pos (pos); if (history_search (string, dir) == -1) { history_set_pos (old); return (-1); } ret = where_history (); history_set_pos (old); return ret; } /* Make the current history item be the one at POS, an absolute index. Returns zero if POS is out of range, else non-zero. */ int history_set_pos (pos) int pos; { if (pos > history_length || pos < 0 || !the_history) return (0); history_offset = pos; return (1); } /* **************************************************************** */ /* */ /* History Expansion */ /* */ /* **************************************************************** */ /* Hairy history expansion on text, not tokens. This is of general use, and thus belongs in this library. */ /* The last string searched for in a !?string? search. */ static char *search_string = (char *)NULL; /* Return the event specified at TEXT + OFFSET modifying OFFSET to point to after the event specifier. Just a pointer to the history line is returned; NULL is returned in the event of a bad specifier. You pass STRING with *INDEX equal to the history_expansion_char that begins this specification. DELIMITING_QUOTE is a character that is allowed to end the string specification for what to search for in addition to the normal characters `:', ` ', `\t', `\n', and sometimes `?'. So you might call this function like: line = get_history_event ("!echo:p", &index, 0); */ char * get_history_event (string, caller_index, delimiting_quote) char *string; int *caller_index; int delimiting_quote; { register int i = *caller_index; register char c; HIST_ENTRY *entry; int which, sign = 1; int local_index, search_mode, substring_okay = 0; char *temp; /* The event can be specified in a number of ways. !! the previous command !n command line N !-n current command-line minus N !str the most recent command starting with STR !?str[?] the most recent command containing STR All values N are determined via HISTORY_BASE. */ if (string[i] != history_expansion_char) return ((char *)NULL); /* Move on to the specification. */ i++; #define RETURN_ENTRY(e, w) \ return ((e = history_get (w)) ? e->line : (char *)NULL) /* Handle !! case. */ if (string[i] == history_expansion_char) { i++; which = history_base + (history_length - 1); *caller_index = i; RETURN_ENTRY (entry, which); } /* Hack case of numeric line specification. */ if (string[i] == '-') { sign = -1; i++; } if (digit (string[i])) { /* Get the extent of the digits and compute the value. */ for (which = 0; digit (string[i]); i++) which = (which * 10) + digit_value (string[i]); *caller_index = i; if (sign < 0) which = (history_length + history_base) - which; RETURN_ENTRY (entry, which); } /* This must be something to search for. If the spec begins with a '?', then the string may be anywhere on the line. Otherwise, the string must be found at the start of a line. */ if (string[i] == '?') { substring_okay++; i++; } /* Only a closing `?' or a newline delimit a substring search string. */ for (local_index = i; (c = string[i]); i++) if ((!substring_okay && (whitespace (c) || c == ':' || #if defined (SHELL) member (c, ";&()|<>") || #endif /* SHELL */ string[i] == delimiting_quote)) || string[i] == '\n' || (substring_okay && string[i] == '?')) break; temp = xmalloc (1 + (i - local_index)); strncpy (temp, &string[local_index], (i - local_index)); temp[i - local_index] = '\0'; if (substring_okay && string[i] == '?') i++; *caller_index = i; #define FAIL_SEARCH() \ do { history_offset = history_length; xfree (temp) ; return (char *)NULL; } while (0) search_mode = substring_okay ? NON_ANCHORED_SEARCH : ANCHORED_SEARCH; while (1) { local_index = history_search_internal (temp, -1, search_mode); if (local_index < 0) FAIL_SEARCH (); if (local_index == 0 || substring_okay) { entry = current_history (); history_offset = history_length; /* If this was a substring search, then remember the string that we matched for word substitution. */ if (substring_okay) { if (search_string) xfree (search_string); search_string = temp; } else xfree (temp); return (entry->line); } if (history_offset) history_offset--; else FAIL_SEARCH (); } #undef FAIL_SEARCH #undef RETURN_ENTRY } #if defined (SHELL) /* Function for extracting single-quoted strings. Used for inhibiting history expansion within single quotes. */ /* Extract the contents of STRING as if it is enclosed in single quotes. SINDEX, when passed in, is the offset of the character immediately following the opening single quote; on exit, SINDEX is left pointing to the closing single quote. */ static void rl_string_extract_single_quoted (string, sindex) char *string; int *sindex; { register int i = *sindex; while (string[i] && string[i] != '\'') i++; *sindex = i; } static char * quote_breaks (s) char *s; { register char *p, *r; char *ret; int len = 3; for (p = s; p && *p; p++, len++) { if (*p == '\'') len += 3; else if (whitespace (*p) || *p == '\n') len += 2; } r = ret = xmalloc (len); *r++ = '\''; for (p = s; p && *p; ) { if (*p == '\'') { *r++ = '\''; *r++ = '\\'; *r++ = '\''; *r++ = '\''; p++; } else if (whitespace (*p) || *p == '\n') { *r++ = '\''; *r++ = *p++; *r++ = '\''; } else *r++ = *p++; } *r++ = '\''; *r = '\0'; return ret; } #endif /* SHELL */ static char * hist_error(s, start, current, errtype) char *s; int start, current, errtype; { char *temp, *emsg; int ll, elen; ll = current - start; switch (errtype) { case EVENT_NOT_FOUND: emsg = "event not found"; elen = 15; break; case BAD_WORD_SPEC: emsg = "bad word specifier"; elen = 18; break; case SUBST_FAILED: emsg = "substitution failed"; elen = 19; break; case BAD_MODIFIER: emsg = "unrecognized history modifier"; elen = 29; break; default: emsg = "unknown expansion error"; elen = 23; break; } temp = xmalloc (ll + elen + 3); strncpy (temp, s + start, ll); temp[ll] = ':'; temp[ll + 1] = ' '; strcpy (temp + ll + 2, emsg); return (temp); } /* Get a history substitution string from STR starting at *IPTR and return it. The length is returned in LENPTR. A backslash can quote the delimiter. If the string is the empty string, the previous pattern is used. If there is no previous pattern for the lhs, the last history search string is used. If IS_RHS is 1, we ignore empty strings and set the pattern to "" anyway. subst_lhs is not changed if the lhs is empty; subst_rhs is allowed to be set to the empty string. */ static char * get_subst_pattern (str, iptr, delimiter, is_rhs, lenptr) char *str; int *iptr, delimiter, is_rhs, *lenptr; { register int si, i, j, k; char *s = (char *) NULL; i = *iptr; for (si = i; str[si] && str[si] != delimiter; si++) if (str[si] == '\\' && str[si + 1] == delimiter) si++; if (si > i || is_rhs) { s = xmalloc (si - i + 1); for (j = 0, k = i; k < si; j++, k++) { /* Remove a backslash quoting the search string delimiter. */ if (str[k] == '\\' && str[k + 1] == delimiter) k++; s[j] = str[k]; } s[j] = '\0'; if (lenptr) *lenptr = j; } i = si; if (str[i]) i++; *iptr = i; return s; } static void postproc_subst_rhs () { char *new; int i, j, new_size; new = xmalloc (new_size = subst_rhs_len + subst_lhs_len); for (i = j = 0; i < subst_rhs_len; i++) { if (subst_rhs[i] == '&') { if (j + subst_lhs_len >= new_size) new = xrealloc (new, (new_size = new_size * 2 + subst_lhs_len)); strcpy (new + j, subst_lhs); j += subst_lhs_len; } else { /* a single backslash protects the `&' from lhs interpolation */ if (subst_rhs[i] == '\\' && subst_rhs[i + 1] == '&') i++; if (j >= new_size) new = xrealloc (new, new_size *= 2); new[j++] = subst_rhs[i]; } } new[j] = '\0'; xfree (subst_rhs); subst_rhs = new; subst_rhs_len = j; } /* Expand the bulk of a history specifier starting at STRING[START]. Returns 0 if everything is OK, -1 if an error occurred, and 1 if the `p' modifier was supplied and the caller should just print the returned string. Returns the new index into string in *END_INDEX_PTR, and the expanded specifier in *RET_STRING. */ static int history_expand_internal (string, start, end_index_ptr, ret_string, current_line) char *string; int start, *end_index_ptr; char **ret_string; char *current_line; /* for !# */ { int i, n, starting_index; int substitute_globally, want_quotes, print_only; char *event, *temp, *result, *tstr, *t, c, *word_spec; int result_len; result = xmalloc (result_len = 128); i = start; /* If it is followed by something that starts a word specifier, then !! is implied as the event specifier. */ if (member (string[i + 1], ":$*%^")) { char fake_s[3]; int fake_i = 0; i++; fake_s[0] = fake_s[1] = history_expansion_char; fake_s[2] = '\0'; event = get_history_event (fake_s, &fake_i, 0); } else if (string[i + 1] == '#') { i += 2; event = current_line; } else { int quoted_search_delimiter = 0; /* If the character before this `!' is a double or single quote, then this expansion takes place inside of the quoted string. If we have to search for some text ("!foo"), allow the delimiter to end the search string. */ if (i && (string[i - 1] == '\'' || string[i - 1] == '"')) quoted_search_delimiter = string[i - 1]; event = get_history_event (string, &i, quoted_search_delimiter); } if (!event) { *ret_string = hist_error (string, start, i, EVENT_NOT_FOUND); xfree (result); return (-1); } /* If a word specifier is found, then do what that requires. */ starting_index = i; word_spec = get_history_word_specifier (string, event, &i); /* There is no such thing as a `malformed word specifier'. However, it is possible for a specifier that has no match. In that case, we complain. */ if (word_spec == (char *)&error_pointer) { *ret_string = hist_error (string, starting_index, i, BAD_WORD_SPEC); xfree (result); return (-1); } /* If no word specifier, than the thing of interest was the event. */ if (!word_spec) temp = savestring (event); else { temp = savestring (word_spec); xfree (word_spec); } /* Perhaps there are other modifiers involved. Do what they say. */ want_quotes = substitute_globally = print_only = 0; starting_index = i; while (string[i] == ':') { c = string[i + 1]; if (c == 'g') { substitute_globally = 1; i++; c = string[i + 1]; } switch (c) { default: *ret_string = hist_error (string, i+1, i+2, BAD_MODIFIER); xfree (result); xfree (temp); return -1; #if defined (SHELL) case 'q': want_quotes = 'q'; break; case 'x': want_quotes = 'x'; break; #endif /* SHELL */ /* :p means make this the last executed line. So we return an error state after adding this line to the history. */ case 'p': print_only++; break; /* :t discards all but the last part of the pathname. */ case 't': tstr = strrchr (temp, '/'); if (tstr) { tstr++; t = savestring (tstr); xfree (temp); temp = t; } break; /* :h discards the last part of a pathname. */ case 'h': tstr = strrchr (temp, '/'); if (tstr) *tstr = '\0'; break; /* :r discards the suffix. */ case 'r': tstr = strrchr (temp, '.'); if (tstr) *tstr = '\0'; break; /* :e discards everything but the suffix. */ case 'e': tstr = strrchr (temp, '.'); if (tstr) { t = savestring (tstr); xfree (temp); temp = t; } break; /* :s/this/that substitutes `that' for the first occurrence of `this'. :gs/this/that substitutes `that' for each occurrence of `this'. :& repeats the last substitution. :g& repeats the last substitution globally. */ case '&': case 's': { char *new_event, *t; int delimiter, failed, si, l_temp; if (c == 's') { if (i + 2 < (int)strlen (string)) delimiter = string[i + 2]; else break; /* no search delimiter */ i += 3; t = get_subst_pattern (string, &i, delimiter, 0, &subst_lhs_len); /* An empty substitution lhs with no previous substitution uses the last search string as the lhs. */ if (t) { if (subst_lhs) xfree (subst_lhs); subst_lhs = t; } else if (!subst_lhs) { if (search_string && *search_string) { subst_lhs = savestring (search_string); subst_lhs_len = strlen (subst_lhs); } else { subst_lhs = (char *) NULL; subst_lhs_len = 0; } } /* If there is no lhs, the substitution can't succeed. */ if (subst_lhs_len == 0) { *ret_string = hist_error (string, starting_index, i, SUBST_FAILED); xfree (result); xfree (temp); return -1; } if (subst_rhs) xfree (subst_rhs); subst_rhs = get_subst_pattern (string, &i, delimiter, 1, &subst_rhs_len); /* If `&' appears in the rhs, it's supposed to be replaced with the lhs. */ if (member ('&', subst_rhs)) postproc_subst_rhs (); } else i += 2; l_temp = strlen (temp); /* Ignore impossible cases. */ if (subst_lhs_len > l_temp) { *ret_string = hist_error (string, starting_index, i, SUBST_FAILED); xfree (result); xfree (temp); return (-1); } /* Find the first occurrence of THIS in TEMP. */ si = 0; for (failed = 1; (si + subst_lhs_len) <= l_temp; si++) if (STREQN (temp+si, subst_lhs, subst_lhs_len)) { int len = subst_rhs_len - subst_lhs_len + l_temp; new_event = xmalloc (1 + len); strncpy (new_event, temp, si); strncpy (new_event + si, subst_rhs, subst_rhs_len); strncpy (new_event + si + subst_rhs_len, temp + si + subst_lhs_len, l_temp - (si + subst_lhs_len)); new_event[len] = '\0'; xfree (temp); temp = new_event; failed = 0; if (substitute_globally) { si += subst_rhs_len; l_temp = strlen (temp); substitute_globally++; continue; } else break; } if (substitute_globally > 1) { substitute_globally = 0; continue; /* don't want to increment i */ } if (failed == 0) continue; /* don't want to increment i */ *ret_string = hist_error (string, starting_index, i, SUBST_FAILED); xfree (result); xfree (temp); return (-1); } } i += 2; } /* Done with modfiers. */ /* Believe it or not, we have to back the pointer up by one. */ --i; #if defined (SHELL) if (want_quotes) { char *x; if (want_quotes == 'q') x = single_quote (temp); else if (want_quotes == 'x') x = quote_breaks (temp); else x = savestring (temp); xfree (temp); temp = x; } #endif /* SHELL */ n = strlen (temp); if (n > result_len) result = xrealloc (result, n + 1); strcpy (result, temp); xfree (temp); *end_index_ptr = i; *ret_string = result; return (print_only); } /* Expand the string STRING, placing the result into OUTPUT, a pointer to a string. Returns: -1) If there was an error in expansion. 0) If no expansions took place (or, if the only change in the text was the de-slashifying of the history expansion character) 1) If expansions did take place 2) If the `p' modifier was given and the caller should print the result If an error ocurred in expansion, then OUTPUT contains a descriptive error message. */ #define ADD_STRING(s) \ do \ { \ int sl = strlen (s); \ j += sl; \ while (j >= result_len) \ result = xrealloc (result, result_len += 128); \ strcpy (result + j - sl, s); \ } \ while (0) #define ADD_CHAR(c) \ do \ { \ if (j >= result_len) \ result = xrealloc (result, result_len += 64); \ result[j++] = c; \ result[j] = '\0'; \ } \ while (0) int history_expand (hstring, output) char *hstring; char **output; { register int j; int i, r, l, passc, cc, modified, eindex, only_printing; char *string; /* The output string, and its length. */ int result_len; char *result; /* Used when adding the string. */ char *temp; /* Setting the history expansion character to 0 inhibits all history expansion. */ if (history_expansion_char == 0) { *output = savestring (hstring); return (0); } /* Prepare the buffer for printing error messages. */ result = xmalloc (result_len = 256); result[0] = '\0'; only_printing = modified = 0; l = strlen (hstring); /* Grovel the string. Only backslash can quote the history escape character. We also handle arg specifiers. */ /* Before we grovel forever, see if the history_expansion_char appears anywhere within the text. */ /* The quick substitution character is a history expansion all right. That is to say, "^this^that^" is equivalent to "!!:s^this^that^", and in fact, that is the substitution that we do. */ if (hstring[0] == history_subst_char) { string = xmalloc (l + 5); string[0] = string[1] = history_expansion_char; string[2] = ':'; string[3] = 's'; strcpy (string + 4, hstring); l += 4; } else { string = hstring; /* If not quick substitution, still maybe have to do expansion. */ /* `!' followed by one of the characters in history_no_expand_chars is NOT an expansion. */ for (i = 0; string[i]; i++) { cc = string[i + 1]; if (string[i] == history_expansion_char) { if (!cc || member (cc, history_no_expand_chars)) continue; #if defined (SHELL) /* The shell uses ! as a pattern negation character in globbing [...] expressions, so let those pass without expansion. */ else if (i > 0 && (string[i - 1] == '[') && member (']', string + i + 1)) continue; #endif /* SHELL */ else break; } #if defined (SHELL) else if (string[i] == '\'') { /* If this is bash, single quotes inhibit history expansion. */ i++; rl_string_extract_single_quoted (string, &i); } else if (string[i] == '\\') { /* If this is bash, allow backslashes to quote single quotes and the history expansion character. */ if (cc == '\'' || cc == history_expansion_char) i++; } #endif /* SHELL */ } if (string[i] != history_expansion_char) { xfree (result); *output = savestring (string); return (0); } } /* Extract and perform the substitution. */ for (passc = i = j = 0; i < l; i++) { int tchar = string[i]; if (passc) { passc = 0; ADD_CHAR (tchar); continue; } if (tchar == history_expansion_char) tchar = -3; switch (tchar) { default: ADD_CHAR (string[i]); break; case '\\': passc++; ADD_CHAR (tchar); break; #if defined (SHELL) case '\'': { /* If this is bash, single quotes inhibit history expansion. */ int quote, slen; quote = i++; rl_string_extract_single_quoted (string, &i); slen = i - quote + 2; temp = xmalloc (slen); strncpy (temp, string + quote, slen); temp[slen - 1] = '\0'; ADD_STRING (temp); xfree (temp); break; } #endif /* SHELL */ case -3: /* history_expansion_char */ cc = string[i + 1]; /* If the history_expansion_char is followed by one of the characters in history_no_expand_chars, then it is not a candidate for expansion of any kind. */ if (member (cc, history_no_expand_chars)) { ADD_CHAR (string[i]); break; } #if defined (NO_BANG_HASH_MODIFIERS) /* There is something that is listed as a `word specifier' in csh documentation which means `the expanded text to this point'. That is not a word specifier, it is an event specifier. If we don't want to allow modifiers with `!#', just stick the current output line in again. */ if (cc == '#') { if (result) { temp = xmalloc (1 + strlen (result)); strcpy (temp, result); ADD_STRING (temp); xfree (temp); } i++; break; } #endif r = history_expand_internal (string, i, &eindex, &temp, result); if (r < 0) { *output = temp; xfree (result); if (string != hstring) xfree (string); return -1; } else { if (temp) { modified++; if (*temp) ADD_STRING (temp); xfree (temp); } only_printing = r == 1; i = eindex; } break; } } *output = result; if (string != hstring) xfree (string); if (only_printing) { add_history (result); return (2); } return (modified != 0); } /* Return a consed string which is the word specified in SPEC, and found in FROM. NULL is returned if there is no spec. The address of ERROR_POINTER is returned if the word specified cannot be found. CALLER_INDEX is the offset in SPEC to start looking; it is updated to point to just after the last character parsed. */ static char * get_history_word_specifier (spec, from, caller_index) char *spec, *from; int *caller_index; { register int i = *caller_index; int first, last; int expecting_word_spec = 0; char *result; /* The range of words to return doesn't exist yet. */ first = last = 0; result = (char *)NULL; /* If we found a colon, then this *must* be a word specification. If it isn't, then it is an error. */ if (spec[i] == ':') { i++; expecting_word_spec++; } /* Handle special cases first. */ /* `%' is the word last searched for. */ if (spec[i] == '%') { *caller_index = i + 1; return (search_string ? savestring (search_string) : savestring ("")); } /* `*' matches all of the arguments, but not the command. */ if (spec[i] == '*') { *caller_index = i + 1; result = history_arg_extract (1, '$', from); return (result ? result : savestring ("")); } /* `$' is last arg. */ if (spec[i] == '$') { *caller_index = i + 1; return (history_arg_extract ('$', '$', from)); } /* Try to get FIRST and LAST figured out. */ if (spec[i] == '-') first = 0; else if (spec[i] == '^') first = 1; else if (digit (spec[i]) && expecting_word_spec) { for (first = 0; digit (spec[i]); i++) first = (first * 10) + digit_value (spec[i]); } else return ((char *)NULL); /* no valid `first' for word specifier */ if (spec[i] == '^' || spec[i] == '*') { last = (spec[i] == '^') ? 1 : '$'; /* x* abbreviates x-$ */ i++; } else if (spec[i] != '-') last = first; else { i++; if (digit (spec[i])) { for (last = 0; digit (spec[i]); i++) last = (last * 10) + digit_value (spec[i]); } else if (spec[i] == '$') { i++; last = '$'; } else if (!spec[i] || spec[i] == ':') /* could be modifier separator */ last = -1; /* x- abbreviates x-$ omitting word `$' */ } *caller_index = i; if (last >= first || last == '$' || last < 0) result = history_arg_extract (first, last, from); return (result ? result : (char *)&error_pointer); } /* Extract the args specified, starting at FIRST, and ending at LAST. The args are taken from STRING. If either FIRST or LAST is < 0, then make that arg count from the right (subtract from the number of tokens, so that FIRST = -1 means the next to last token on the line). If LAST is `$' the last arg from STRING is used. */ char * history_arg_extract (first, last, string) int first, last; char *string; { register int i, len; char *result = (char *)NULL; int size = 0, offset = 0; char **list; /* XXX - think about making history_tokenize return a struct array, each struct in array being a string and a length to avoid the calls to strlen below. */ if ((list = history_tokenize (string)) == NULL) return ((char *)NULL); for (len = 0; list[len]; len++) ; if (last < 0) last = len + last - 1; if (first < 0) first = len + first - 1; if (last == '$') last = len - 1; if (first == '$') first = len - 1; last++; if (first > len || last > len || first < 0 || last < 0) result = ((char *)NULL); else { for (size = 0, i = first; i < last; i++) size += strlen (list[i]) + 1; result = xmalloc (size + 1); for (i = first; i < last; i++) { strcpy (result + offset, list[i]); offset += strlen (list[i]); if (i + 1 < last) { result[offset++] = ' '; result[offset] = 0; } } } for (i = 0; i < len; i++) xfree (list[i]); xfree (list); return (result); } #define slashify_in_quotes "\\`\"$" /* Return an array of tokens, much as the shell might. The tokens are parsed out of STRING. */ char ** history_tokenize (string) char *string; { char **result = (char **)NULL; register int i, start, result_index, size; int len; i = result_index = size = 0; /* Get a token, and stuff it into RESULT. The tokens are split exactly where the shell would split them. */ while (string[i]) { int delimiter = 0; /* Skip leading whitespace. */ for (; string[i] && whitespace (string[i]); i++) ; if (!string[i] || string[i] == history_comment_char) return (result); start = i; if (member (string[i], "()\n")) { i++; goto got_token; } if (member (string[i], "<>;&|$")) { int peek = string[i + 1]; if (peek == string[i] && peek != '$') { if (peek == '<' && string[i + 2] == '-') i++; i += 2; goto got_token; } else { if ((peek == '&' && (string[i] == '>' || string[i] == '<')) || ((peek == '>') && (string[i] == '&')) || ((peek == '(') && (string[i] == '$'))) { i += 2; goto got_token; } } if (string[i] != '$') { i++; goto got_token; } } /* Get word from string + i; */ if (member (string[i], "\"'`")) delimiter = string[i++]; for (; string[i]; i++) { if (string[i] == '\\' && string[i + 1] == '\n') { i++; continue; } if (string[i] == '\\' && delimiter != '\'' && (delimiter != '"' || member (string[i], slashify_in_quotes))) { i++; continue; } if (delimiter && string[i] == delimiter) { delimiter = 0; continue; } if (!delimiter && (member (string[i], " \t\n;&()|<>"))) break; if (!delimiter && member (string[i], "\"'`")) delimiter = string[i]; } got_token: len = i - start; if (result_index + 2 >= size) result = (char **)xrealloc (result, ((size += 10) * sizeof (char *))); result[result_index] = xmalloc (1 + len); strncpy (result[result_index], string + start, len); result[result_index][len] = '\0'; result[++result_index] = (char *)NULL; } return (result); } gnuit-4.9.5/src/gitrgrep0000755000175000017500000000371511146671376012162 00000000000000#! /bin/sh ############################################################################### ### ### ### GNU Interactive Tools recursive grep script ### ### Copyright (C) 1994-2000, 2006-2007 Free Software Foundation, Inc ### ### ### ### This file is part of gnuit. ### ### ### ### gnuit 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 3 of the ### ### License, or (at your option) any later version. ### ### ### ### gnuit 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, see ### ### http://www.gnu.org/licenses/. ### ### ### ### Written by Tudor Hulubei and Andrei Pitis. ### ### ### ############################################################################### grep="grep" name=`basename "$0"` # Start grep/egrep/fgrep depending on argv[0] case $name in gitrgrep) grep="grep";; gitregrep) grep="egrep";; gitrfgrep) grep="fgrep";; esac find . -follow -type d -exec gitxgrep '{}'\ $grep "$1" "$2" "$3" "$4" "$5" "$6" "$7" "$8" "$9" ';' gnuit-4.9.5/src/.gdbinit0000644000175000017500000000006711146671376012027 00000000000000set env TERMCAP /etc/termcap set env EF_PROTECT_FREE 1 gnuit-4.9.5/src/xio.h0000644000175000017500000000313411146671376011354 00000000000000/* xio.h -- Function prototypes used in xio.c. */ /* Copyright (C) 1993-1999, 2006-2007 Free Software Foundation, Inc. This file is part of gnuit. gnuit 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 3 of the License, or (at your option) any later version. gnuit 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, see http://www.gnu.org/licenses/. */ /* Written by Tudor Hulubei and Andrei Pitis. */ #ifndef _GIT_XIO_H #define _GIT_XIO_H #include #ifdef HAVE_STDDEF_H #include #endif #include "stat.h" #include "stdc.h" extern int xread PROTO ((int, char *, size_t)); extern int xwrite PROTO ((int, const char *, size_t)); #ifndef HAVE_RENAME extern int rename PROTO ((const char *, const char *)); #endif /* HAVE_RENAME */ #ifndef HAVE_READLINK extern int readlink PROTO ((const char *, char *, size_t)); #endif /* HAVE_READLINK */ extern int xreadlink PROTO ((const char *)); extern int xfstat PROTO ((int, struct stat *)); extern int xstat PROTO ((const char *, struct stat *)); extern int xlstat PROTO ((const char *, struct stat *)); extern char *xgetcwd PROTO (()); extern char *xdirname PROTO ((char *)); extern char *xbasename PROTO ((char *)); #endif /* _GIT_XIO_H */ gnuit-4.9.5/src/xio.c0000644000175000017500000001127411146671376011353 00000000000000/* xio.c -- Safe versions of the system io primitives. It also includes a new version of the readlink system call that computes the number of characters required to hold the entire link. */ /* Copyright (C) 1993-1999, 2006-2007 Free Software Foundation, Inc. This file is part of gnuit. gnuit 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 3 of the License, or (at your option) any later version. gnuit 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, see http://www.gnu.org/licenses/. */ /* Written by Tudor Hulubei and Andrei Pitis. */ #ifdef HAVE_CONFIG_H #include #endif #include #ifdef HAVE_STDDEF_H #include #endif #ifdef HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ #ifndef HAVE_GETCWD #include #ifdef MAXPATHLEN #define MAXPATHSIZE MAXPATHLEN #else #ifdef PATH_MAX #define MAXPATHSIZE PATH_MAX #else #define MAXPATHSIZE 1024 #endif /* PATH_MAX */ #endif /* MAXPATHLEN */ #endif /* HAVE_GETCWD */ #include /* Not all systems declare ERRNO in errno.h... and some systems #define it! */ #if !defined (errno) extern int errno; #endif /* !errno */ #include "xmalloc.h" #include "xstring.h" #include "xio.h" int xread(fd, buf, count) int fd; char *buf; size_t count; { int chars; int old_errno = errno; if (count <= 0) return count; #ifdef EINTR do { errno = old_errno; chars = read(fd, buf, count); } while (chars < 0 && errno == EINTR); return chars; #else return read(fd, buf, count); #endif } int xwrite(fd, buf, count) int fd; const char *buf; size_t count; { int chars; int old_errno = errno; if (count <= 0) return count; #ifdef EINTR do { errno = old_errno; chars = write(fd, buf, count); } while (chars < 0 && errno == EINTR); return chars; #else return write(fd, buf, count); #endif } int __xreadlink(path, buf, size) const char *path; char *buf; size_t size; { int chars; int old_errno = errno; if (size <= 0) return size; #ifdef EINTR do { errno = old_errno; chars = readlink(path, buf, size); } while (chars < 0 && errno == EINTR); return chars; #else return read(fd, buf, count); #endif } int xreadlink(filename) const char *filename; { int size = 100; for (;;) { char *buffer = xmalloc(size); int nchars = __xreadlink(filename, buffer, (size_t)size); if (nchars < size) { xfree(buffer); return nchars; } xfree(buffer); size *= 2; } } int xfstat(filedes, buf) int filedes; struct stat *buf; { int result; int old_errno = errno; do { errno = old_errno; result = fstat(filedes, buf); } while (result < 0 && errno == EINTR); return result; } int xstat(filename, buf) const char *filename; struct stat *buf; { int result; int old_errno = errno; do { errno = old_errno; result = stat(filename, buf); } while (result < 0 && errno == EINTR); return result; } int xlstat(filename, buf) const char *filename; struct stat *buf; { int result; int old_errno = errno; do { errno = old_errno; #ifdef HAVE_LSTAT result = lstat(filename, buf); #else result = stat(filename, buf); #endif /* HAVE_LSTAT */ } while (result < 0 && errno == EINTR); return result; } char * xgetcwd() { char *result; char *cwd; errno = 0; #ifdef HAVE_GETCWD { size_t size; cwd = xmalloc(size = 64); while ((result = getcwd(cwd, size)) == NULL && errno == ERANGE) { cwd = xrealloc(cwd, size += 64); errno = 0; } } #else { /* No getcwd() -> getwd(): BSD style... bleah! */ cwd = xmalloc(MAXPATHSIZE + 2); result = getwd(cwd); if (result) cwd = xrealloc(cwd, strlen(cwd) + 1); } #endif /* HAVE_GETCWD */ if (result == NULL) { xfree(cwd); return NULL; } return cwd; } char * xdirname(name) char *name; { char *ptr = strrchr(name, '/'); if (ptr == NULL) return xstrdup("."); else { char *ptr2 = xstrdup(name); ptr2[ptr - name] = '0'; return ptr2; } } char * xbasename(name) char *name; { char *base; size_t len = strlen(name); if (name[len - 1] == '/') name[len - 1] = '\0'; base = strrchr(name, '/'); return base ? base + 1 : name; } gnuit-4.9.5/src/xstring.h0000644000175000017500000000317511146671376012260 00000000000000/* xstring.h -- Prototypes for the functions in xstring.c. */ /* Copyright (C) 1993-1999, 2006-2007 Free Software Foundation, Inc. This file is part of gnuit. gnuit 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 3 of the License, or (at your option) any later version. gnuit 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, see http://www.gnu.org/licenses/. */ /* Written by Tudor Hulubei and Andrei Pitis. */ #ifndef _GIT_XSTRING_H #define _GIT_XSTRING_H #include #ifdef HAVE_STDDEF_H #include #endif #if defined(STDC_HEADERS) || defined(HAVE_STRING_H) #include /* An ANSI string.h and pre-ANSI memory.h might conflict. */ #if !defined(STDC_HEADERS) && defined(HAVE_MEMORY_H) #include #endif /* !STDC_HEADERS and HAVE_MEMORY_H */ #else /* !STDC_HEADERS and !HAVE_STRING_H */ #include /* memory.h and strings.h conflict on some systems. */ #endif /* !STDC_HEADERS and !HAVE_STRING_H */ #include "stdc.h" #include "xalloc.h" #ifndef HAVE_STRCASECMP #include "strcase.h" #endif /* !HAVE_STRCASECMP */ #ifndef HAVE_STRNCASECMP #include "strcase.h" #endif /* !HAVE_STRNCASECMP */ #ifndef HAVE_STRSTR #include "strstr.h" #endif /* !HAVE_STRSTR */ #endif /* _GIT_XSTRING_H */ gnuit-4.9.5/src/tty.h0000644000175000017500000001045111146671376011375 00000000000000/* tty.h -- Data structures & function prototypes for tty.c stuff. */ /* Copyright (C) 1993-2000, 2006-2007 Free Software Foundation, Inc. This file is part of gnuit. gnuit 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 3 of the License, or (at your option) any later version. gnuit 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, see http://www.gnu.org/licenses/. */ /* Written by Tudor Hulubei and Andrei Pitis. */ #ifndef _GIT_TTY_H #define _GIT_TTY_H #include #ifdef HAVE_STDDEF_H #include #endif #ifdef HAVE_POSIX_TTY #include #else #ifdef HAVE_SYSTEMV_TTY #include #else #include #endif /* HAVE_SYSTEMV_TTY */ #endif /* HAVE_POSIX_TTY */ #include "window.h" #define OFF 0 #define ON 1 /* Color constants. */ #define BLACK 0 #define RED 1 #define GREEN 2 #define YELLOW 3 #define BLUE 4 #define MAGENTA 5 #define CYAN 6 #define WHITE 7 /* Some key aliases. */ #define key_CTRL_G 0x07 /* Ctrl-G */ #define key_CTRL_Z 0x1a /* Ctrl-Z */ #define key_CTRL_SPACE 0xff /* Ctrl-Space */ #define key_ENTER 0x0a /* Enter */ #define key_BACKSPACE 0x7f /* Backspace */ #define key_TAB 0x09 /* Tab */ #define key_ESC 0x1b /* Esc */ /* The interrupt character. */ #define key_INTERRUPT key_CTRL_G #define key_SUSPEND key_CTRL_Z /* Terminal modes. */ #define TTY_CANONIC 0 #define TTY_NONCANONIC 1 /* Terminal input modes. */ #define TTY_RESTRICTED_INPUT 0 #define TTY_FULL_INPUT 1 extern void (* tty_enter_idle_hook) PROTO (()); extern void (* tty_exit_idle_hook) PROTO (()); typedef struct tag_tty_key_t { unsigned char *key_seq; struct tag_tty_key_t *next; void *aux_data; } tty_key_t; typedef unsigned char tty_status_t; extern int tty_lines; extern int tty_columns; extern char *tty_type; extern char *tty_device; extern void tty_init PROTO ((int)); extern void tty_end PROTO ((char *)); extern void tty_resize PROTO (()); extern void tty_set_mode PROTO ((int)); extern int tty_get_mode PROTO (()); extern void tty_set_interrupt_char PROTO ((int)); extern void tty_clear PROTO (()); extern void tty_fill PROTO (()); extern void tty_touch PROTO (()); extern void tty_goto PROTO ((int, int)); extern void tty_get_cursor PROTO ((int *, int *)); extern void tty_brightness PROTO ((int)); extern void tty_foreground PROTO ((int)); extern void tty_background PROTO ((int)); extern void tty_colors PROTO ((int, int, int)); extern void tty_cursor PROTO ((int)); extern void tty_beep PROTO (()); extern void tty_defaults PROTO (()); extern void tty_save PROTO ((tty_status_t *)); extern void tty_restore PROTO ((tty_status_t *)); extern int tty_putc PROTO ((int)); extern int tty_puts PROTO ((char *, int)); extern int tty_getc PROTO (()); extern void tty_flush PROTO (()); extern void tty_update PROTO (()); extern void tty_get_screen PROTO ((char *)); extern void tty_put_screen PROTO ((char *)); extern int tty_get_color_index PROTO ((char *)); extern void tty_key_list_insert PROTO ((unsigned char *, void *)); extern void tty_key_search_restart PROTO (()); extern char *tty_key_human2machine PROTO ((unsigned char *)); extern unsigned char *tty_key_machine2human PROTO ((char *)); extern void tty_key_print PROTO ((char *)); extern void tty_key_print_async PROTO (()); extern char *tty_get_symbol_key_seq PROTO ((char *)); extern void tty_set_last_char_flag PROTO ((int)); extern int tty_set_optimization_level PROTO ((int)); extern void tty_update_title PROTO ((char *)); extern void tty_start_cursorapp PROTO (()); extern void tty_end_cursorapp PROTO (()); extern void tty_io_clear PROTO (()); /* extern void tty_key_list_delete PROTO (()); */ extern tty_key_t *tty_key_search PROTO ((char *)); extern tty_key_t *tty_get_key PROTO ((int *)); extern char *tty_get_previous_key_seq PROTO(()); #endif /* _GIT_TTY_H */ gnuit-4.9.5/src/tilde.h0000644000175000017500000000433011146671376011655 00000000000000/* tilde.h -- Externally available variables and function in tilde.c. */ /* Copyright (C) 1992 Free Software Foundation, Inc. This file contains the Readline Library (the Library), a set of routines for providing Emacs style line input to programs that ask for it. The Library 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 3 of the License, or (at your option) any later version. The Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/. */ #ifndef _TILDE_H_ #define _TILDE_H_ /* Function pointers can be declared as (Function *)foo. */ #if !defined (_FUNCTION_DEF) # define _FUNCTION_DEF typedef int Function (); typedef void VFunction (); typedef char *CPFunction (); typedef char **CPPFunction (); #endif /* _FUNCTION_DEF */ /* If non-null, this contains the address of a function to call if the standard meaning for expanding a tilde fails. The function is called with the text (sans tilde, as in "foo"), and returns a malloc()'ed string which is the expansion, or a NULL pointer if there is no expansion. */ extern CPFunction *tilde_expansion_failure_hook; /* When non-null, this is a NULL terminated array of strings which are duplicates for a tilde prefix. Bash uses this to expand `=~' and `:~'. */ extern char **tilde_additional_prefixes; /* When non-null, this is a NULL terminated array of strings which match the end of a username, instead of just "/". Bash sets this to `:' and `=~'. */ extern char **tilde_additional_suffixes; /* Return a new string which is the result of tilde expanding STRING. */ extern char *tilde_expand (); /* Do the work of tilde expansion on FILENAME. FILENAME starts with a tilde. If there is no expansion, call tilde_expansion_failure_hook. */ extern char *tilde_expand_word (); #endif /* _TILDE_H_ */ gnuit-4.9.5/src/signals.h0000644000175000017500000000226211146671376012216 00000000000000/* signal.h -- Function prototypes for those stupid functions in signal.c. */ /* Copyright (C) 1993-1999, 2006-2007 Free Software Foundation, Inc. This file is part of gnuit. gnuit 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 3 of the License, or (at your option) any later version. gnuit 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, see http://www.gnu.org/licenses/. */ /* Written by Tudor Hulubei and Andrei Pitis. */ #ifndef _GIT_SIGNAL_H #define _GIT_SIGNAL_H #include #ifdef HAVE_STDDEF_H #include #endif #include "stdc.h" extern int user_heart_attack; extern void signals_init PROTO (()); extern void signal_handlers PROTO ((int)); extern void signals PROTO ((int)); extern void service_pending_signals PROTO (()); #endif /* _GIT_SIGNAL_H */ gnuit-4.9.5/src/panel.h0000644000175000017500000001710711146671376011661 00000000000000/* panel.h -- The data structures and function prototypes used in panel.c. */ /* Copyright (C) 1993-2000, 2006-2007 Free Software Foundation, Inc. This file is part of gnuit. gnuit 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 3 of the License, or (at your option) any later version. gnuit 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, see http://www.gnu.org/licenses/. */ /* Written by Tudor Hulubei and Andrei Pitis. */ #ifndef _GIT_PANEL_H #define _GIT_PANEL_H #include #include #ifdef HAVE_STDDEF_H #include #endif #ifdef HAVE_UNISTD_H #include #endif #if HAVE_DIRENT_H #include #define NAMLEN(dirent) strlen((dirent)->d_name) #else /* !HAVE_DIRENT_H */ #define dirent direct #define NAMLEN(dirent) (dirent)->d_namlen #ifdef HAVE_SYS_NDIR_H #include #endif /* HAVE_SYS_NDIR_H */ #ifdef HAVE_SYS_DIR_H #include #endif /* HAVE_SYS_DIR_H */ #ifdef HAVE_NDIR_H #include #endif /* HAVE_NDIR_H */ #endif /* !HAVE_DIRENT_H */ #include "stdc.h" #include "xstack.h" #include "file.h" #define IS_SPECIAL(x) ( ! (S_ISLNK((x)) || S_ISDIR((x)) || S_ISREG((x)))) /* Panel actions. */ #define act_NOACTION 0 #define act_ENTER 1 #define act_COPY 2 #define act_DELETE 3 #define act_SELECT 4 #define act_SELECT_ALL 5 #define act_UNSELECT_ALL 6 #define act_TOGGLE 7 #define act_ENABLE_NEXT_MODE 8 #define act_ENABLE_OWNER_GROUP 9 #define act_ENABLE_DATE_TIME 10 #define act_ENABLE_SIZE 11 #define act_ENABLE_MODE 12 #define act_ENABLE_FULL_NAME 13 #define act_ENABLE_ALL 14 #define act_SORT_NEXT_METHOD 15 #define act_SORT_BY_NAME 16 #define act_SORT_BY_EXTENSION 17 #define act_SORT_BY_SIZE 18 #define act_SORT_BY_DATE 19 #define act_SORT_BY_MODE 20 #define act_SORT_BY_OWNER_ID 21 #define act_SORT_BY_GROUP_ID 22 #define act_SORT_BY_OWNER_NAME 23 #define act_SORT_BY_GROUP_NAME 24 #define act_MKDIR 25 #define act_MOVE 26 #define act_UP 27 #define act_DOWN 28 #define act_PGUP 29 #define act_PGDOWN 30 #define act_HOME 31 #define act_END 32 #define act_CHDIR 33 #define act_REGET 34 #define act_SWITCH 35 #define act_PATTERN_SELECT 36 #define act_PATTERN_UNSELECT 37 #define act_SET_SCROLL_STEP 38 #define act_ISEARCH_BEGIN 39 #define act_ISEARCH_BACKWARD 40 #define act_ISEARCH_FORWARD 41 #define act_ISEARCH_END 42 #define act_CMPDIR 43 #define act_CASE 44 #define act_UP_ONE_DIR 45 #define act_COMPARE 46 #define act_BIN_PACKING 47 #define act_HORIZONTAL_SCROLL_LEFT 48 #define act_HORIZONTAL_SCROLL_RIGHT 49 #define act_SELECT_EXTENSION 50 #define act_UNSELECT_EXTENSION 51 /* File sort methods. */ #define SORT_BY_NAME 0 #define SORT_BY_EXTENSION 1 #define SORT_BY_SIZE 2 #define SORT_BY_DATE 3 #define SORT_BY_MODE 4 #define SORT_BY_OWNER_ID 5 #define SORT_BY_GROUP_ID 6 #define SORT_BY_OWNER_NAME 7 #define SORT_BY_GROUP_NAME 8 /* File display modes. */ #define ENABLE_OWNER_GROUP 0 #define ENABLE_DATE_TIME 1 #define ENABLE_SIZE 2 #define ENABLE_ABBREVSIZE 3 #define ENABLE_MODE 4 #define ENABLE_FULL_NAME 5 #define ENABLE_ALL 6 /* File types. */ #define DIR_ENTRY 0 #define FILE_ENTRY 1 #define SYMLINK_ENTRY 2 #define FIFO_ENTRY 3 #define SOCKET_ENTRY 4 /* Current file marker types. */ #define ACTIVE_PANEL_MARKER '>' #define INACTIVE_PANEL_MARKER '*' /* Comparison types. */ #define CMPDIR_THOROUGH 0 #define CMPDIR_QUICK 1 /* Case conversion types. */ #define CASE_DOWN 0 #define CASE_UP 1 /* Internal structure, used by the push/pop functions to keep track of isearched entries. */ typedef struct { int entry; /* the panel entry number. */ size_t length; /* isearch_length at match time. See below. */ } isearch_t; /* Structure used to pass isearch-specific parameters to panel_action. */ typedef struct { int action; /* the action to be performed. */ char *string; /* the current isearched string. */ size_t length; /* the new length of the isearched string. */ } isearch_aux_t; typedef struct { char *name; off64_t size; mode_t mode; uid_t uid; gid_t gid; time_t mtime; char *owner; char *group; char date[16]; char type; char selected; char executable; char fti_loaded; char foreground; char background; char brightness; } dir_entry_t; typedef struct { DIR *dir; /* the current directory. */ window_t *window; /* the panel window. */ #ifdef HAVE_LINUX int msdosfs; /* the current panel directory resides on a MSDOG direrctory. Argh... */ #endif /* HAVE_LINUX */ int on_screen; /* # of files on the screen. */ char *path; /* The current path. */ char *temp; /* A temporary string. */ int current_entry; /* The current file entry #. */ int first_on_screen; /* The # of the entry displayed in the panel's first line. */ int maxname; /* Don't bother :-) */ dir_entry_t *dir_entry; /* A record for each file in the current directory. */ size_t isearch_length; /* The current length of the string used in incremental search. */ xstack_t *isearch_stack; /* The isearch stack. */ int last_index; /* Used in the iterator. */ int multiple_files; /* A flag used in the iterator. */ int x, y; /* The panel's position. */ int lines, columns; /* The panel is that big. */ int entries; /* The # of files/directories. */ char focus; /* The panel's focus flag. */ char visible; /* The panel's visible flag. */ char wrapped_isearch; /* The wrapped isearch_flag. */ int selected_entries; /* The # of selected entries. */ int horizontal_offset; /* The horizontal scroll offset. */ size_t pathlen; /* The path length. */ int display_mode; /* The current display mode. */ int sort_method; /* The current sort method. */ int scroll_step; /* The scroll step. */ int thumb; /* The position of the thumb. */ int chkdest; /* Don't bother :-). */ } panel_t; extern panel_t *panel_init PROTO ((char *)); extern void panel_end PROTO ((panel_t *)); extern void panel_init_iterator PROTO ((panel_t *)); extern void panel_select_all PROTO ((panel_t *)); extern void panel_unselect_all PROTO ((panel_t *)); extern int panel_get_next PROTO ((panel_t *)); extern void panel_set_focus PROTO ((panel_t *, int)); extern void panel_no_optimizations PROTO ((panel_t *)); extern int panel_action PROTO ((panel_t *, int, panel_t *, void *, int)); extern window_t *panel_window PROTO ((panel_t *)); extern char *panel_get_path PROTO ((panel_t *)); extern char *panel_get_current_file_name PROTO ((panel_t *)); extern uid_t panel_get_current_file_uid PROTO ((panel_t *)); extern gid_t panel_get_current_file_gid PROTO ((panel_t *)); extern mode_t panel_get_current_file_mode PROTO ((panel_t *)); extern int panel_get_current_file_type PROTO ((panel_t *)); extern void panel_resize PROTO ((panel_t *, size_t, size_t, size_t, size_t)); extern void panel_activate PROTO ((panel_t *)); extern void panel_deactivate PROTO ((panel_t *)); extern void panel_update PROTO ((panel_t *)); extern void panel_set_wrapped_isearch_flag PROTO ((panel_t *, int)); extern void panel_center_current_entry PROTO ((panel_t *)); #endif /* _GIT_PANEL_H */ gnuit-4.9.5/src/xmalloc.h0000644000175000017500000000226511146671376012220 00000000000000/* xmalloc.h -- Prototypes for the functions in xmalloc.c. */ /* Copyright (C) 1993-1999 Free Software Foundation, Inc. This file is part of gnuit. gnuit 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 3 of the License, or (at your option) any later version. gnuit 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, see http://www.gnu.org/licenses/. */ /* Written by Tudor Hulubei and Andrei Pitis. */ #ifndef _GIT_XMALLOC_H #define _GIT_XMALLOC_H #include #ifdef HAVE_STDDEF_H #include #endif #ifdef HAVE_STDLIB_H #include #else /* !HAVE_STDLIB_H */ #include "ansi_stdlib.h" #endif /* !HAVE_STDLIB_H */ #include "stdc.h" #include "xalloc.h" extern void xalloc_die PROTO ((void)); extern void xfree PROTO ((void *)); #endif /* _GIT_XMALLOC_H */ gnuit-4.9.5/gnuit.spec0000644000175000017500000000303611146672065011614 00000000000000Summary: A set of GNU Interactive Tools. Name: gnuit Version: 4.9.5 Release: 1 Copyright: GNU Group: Applications/File Source: ftp://ftp.gnu.org/gnu/gnuit/gnuit-%{version}.tar.gz URL: http://www.gnu.org/software/gnuit/ Packager: Ian Beckwith BuildRoot: /var/tmp/git-root Prereq: /sbin/install-info %description GNU Interactive Tools provides an extensible file system browser, an ASCII/hexadecimal file viewer, a process viewer/killer and other related utilities and shell scripts. GIT can be used to increase the speed and efficiency of copying and moving files and directories, invoking editors, compressing and uncompressing files, creating and expanding archives, compiling programs, sending mail and more. GIT uses standard ANSI color sequences, if they are available. You should install the gnuit package if you are interested in using its file management capabilities. %prep rm -rf $RPM_BUILD_ROOT %setup -q %build CFLAGS="$RPM_OPT_FLAGS" LDFLAGS='-s' ./configure --prefix=/usr --with-terminfo make %install make prefix=$RPM_BUILD_ROOT/usr/ install-strip gzip -9nf $RPM_BUILD_ROOT/usr/share/info/gnuit.info* %files %doc COPYING ChangeLog LSM NEWS PLATFORMS PROBLEMS README INSTALL doc/gnuit.html /usr/bin/* /usr/bin/.gitaction /usr/man/man1/* /usr/share/info/gnuit* /usr/share/gnuit/* /usr/share/doc/gnuit/* %clean rm -rf $RPM_BUILD_ROOT %post /sbin/install-info /usr/share/info/gnuit.info.gz /usr/share/info/dir %preun if [ "$1" = 0 ]; then /sbin/install-info --delete /usr/share/info/gnuit.info.gz /usr/share/info/dir fi gnuit-4.9.5/PROBLEMS0000644000175000017500000001521011146671375010760 00000000000000--*-outline-*-- * Known GNU Interactive Tools Problems ====================================== ** 1. Missing '.' directory problem ----------------------------------- While working on a previous version of git, I've tried to use it to read a NFS mounted directory. The file system was exported by a Ultrix system and mounted on a Linux system. When I've entered the directory where the NFS mounted file system was supposed to be, git received a SIGSEGV signal. Looking at that directory with 'ls', I've figured out that the directory was completely empty (the '.' & '..' directories were missing too) even thought the file system was reported as being succesfully mounted. A few days later I've experienced the same problem on our HP-UX workstation, trying to mount a NFS file system exported by a SGI workstation. Starting with that version of git, I've put two tests in the routine that reads the directory (panel_read_directory()) that check if the '.' and '..' directories have been found. If any of them is missing, git will refuse to enter the directory, in order to avoid further problems. Unfortunately, a few people have reported that git refuses to work on their machines because it can't find the '.' directory. One of them was using Solaris 2.3 with NFS, the other one SunOS. I recently installed NFS on a machine here and I tried to fix all the problems git had under NFS. There were lots of problems, all of them were being related to the fact that NFS does lots of strange things: 1) root can enter directories where it has no permission (remember, the root id is converted by NFS to -2 (an unprivileged user), and then is unable to read files (thus there is no ".." directory). 2) in some other circumstances (directories with rw- permission only) it can enter the directory, read the entries but it is unable to stat them. I don't know if the changes I've made will fix all the problems. I have tried to emulate the ".." directory and to recover whenever possible. Please let me know if it works for you. ** 2. cp problems ----------------- "cp -f" doesn't work on all systems, so directories that are in fact symbolic links will not be copied. If your cp does understand "-f", try modifying the panel_copy function in panel.c, replacing "cp -r" with "cp -r -f" or "cp -rf". ** 3. SCO 3.2 V 4.2 problems ---------------------------- Han Holl <100327.1632@compuserve.com> has reported a problem running git-4.3.5 on SCO Unix 3.2 V 4.2: > GIT didn't work with the ordinary malloc library: > I used './configure --with-terminfo', and added -lmalloc to the LIBS > variable (it crashed with the ordinary malloc library). I used gcc. ** 4. SLACKWARE Linux 1.2.0 / 2.0.0 termcap/terminfo problems ------------------------------------------------------------- a. The 'ms' flag (safe to move in standout mode) is missing from the console termcap database. It is available only in the console terminfo database (its terminfo name is 'msgr'). b. The 'sgr0' capability (according to the terminfo manual this is the terminfo name of the termcap 'me' capability) is missing from the console terminfo database but it is available in the termcap database. This is a problem for GIT when using terminfo because if we can't turn the reverse video mode or the brightness off, we should not turn them on at all. I've solved the problem by using a hard-coded 'me' for the Linux console if I can't find 'me' in the database, but I hate this method. This is one of the two reasons why I prefer using termcap under Linux (the second one is that the executable linked with the termcap library is a lot smaller). c. The 'smacs' and 'rmacs' ('as' and 'ae' in termcap) are missing from the console termcap database but are available in the console terminfo database. d. 'se' is \E[27m in termcap but 'rmso' (the terminfo equivalent) is \E[0m in terminfo. Are both ok ? ** 5. Linux color_xterm problems -------------------------------- Sometimes, when moving the cursor, color_xterm deletes useful informations on the screen. This is *NOT* an git bug because when hiding/repainting the window, the garbage disappears. I don't know how to handle this. The normal xterm (b/w) works fine. Other xterm terminal emulators (with color support) like Linux's rxvt and Ultrix's xterm work just fine. To reproduce the problem, start git, press the down arrow (or ^N), and then type a few spaces in the command line. Those spaces will be displayed with the wrong color, but if you hide and the re-expose the color_xterm window, everything will be redisplayed correctly. ** 6. File systems with no support for hard links ------------------------------------------------- We can't *really* move a file on such file systems. We have to copy the source file to the destination and then remove the it. MS-DOG programs can perform a real move by copying the directory entry in the destination directory but I don't think we can do this under UNIX and I don't feel like writing MS-DOG "file system" dependent code. Sorry. In fact, my real problem wasn't that stupid MS-DOG file system, but the impossibility of detecting such file systems. The 'move' command will normally fail on file systems with no support for hard links, but under Linux it *will* work with MS-DOG file systems because I know MS-DOG lacks working hard links and I've put a small test in the right place :-). ** 7. Sun's sun-cmd termcap problems ------------------------------------ If you are using the sun-cmd terminal emulator under SunOS 5.4, Solaris or similar systems, it seems that the termcap library fails to work as expected. because some capabilities are reported as missing even though they are available. This leads to git being unable to display the frame in reverse video. I've compiled git with the GNU termcap library and it works just fine, but the scrolling feature still has to be disabled. I recently (4.3.8) changed git to work with standout mode whenever possible. I don't know if this problem still exists. Please let me know if you can figure it out. Thanks. ** 8. Linux 2.0.x kernels ------------------------- If you are experiencing problems with gitview under Linux kernels > 2.0.0, try updating your termcap database to termcap 2.0.8. It seems that the sequence returned by the `End' key is given by the `@7' termcap capability in the latest termcap. GIT used to inspect `kH' for this... ** 9. UNIX System V Release 4 ----------------------------- If you're compiling with gcc, you're fine. With the native compiler you need to hand edit config.h _after_ running configure, comment out HAVE_DIRENT_H and define HAVE_SYS_DIR_H instead. While git will compile anyway, dirent will not work for some reason I haven't had the time to figure out. gnuit-4.9.5/depcomp0000755000175000017500000003710011146671375011171 00000000000000#! /bin/sh # depcomp - compile a program generating dependencies as side-effects scriptversion=2005-07-09.11 # Copyright (C) 1999, 2000, 2003, 2004, 2005 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. "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" 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" ;; 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 mecanism 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 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: gnuit-4.9.5/install-sh0000755000175000017500000002202111146671375011614 00000000000000#!/bin/sh # install - install a program, script, or datafile scriptversion=2005-05-14.22 # 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. It can only install one file at a time, a restriction # shared with many OS's install programs. # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit="${DOITPROG-}" # put in absolute paths if you don't have them in your path; or use env. 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}" chmodcmd="$chmodprog 0755" 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 -n "$1"; 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) chmodcmd="$chmodprog $2" shift shift 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 $?;; *) # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. test -n "$dir_arg$dstarg" && break # 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 break;; esac done if test -z "$1"; 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 for src do # Protect names starting with `-'. case $src in -*) src=./$src ;; esac if test -n "$dir_arg"; then dst=$src src= if test -d "$dst"; then mkdircmd=: chmodcmd= else mkdircmd=$mkdirprog fi 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 dst=$dst/`basename "$src"` fi fi # This sed command emulates the dirname command. dstdir=`echo "$dst" | sed -e 's,/*$,,;s,[^/]*$,,;s,/*$,,;s,^$,.,'` # Make sure that the destination directory exists. # Skip lots of stat calls in the usual case. if test ! -d "$dstdir"; then defaultIFS=' ' IFS="${IFS-$defaultIFS}" oIFS=$IFS # Some sh's can't handle IFS=/ for some reason. IFS='%' set x `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'` shift IFS=$oIFS pathcomp= while test $# -ne 0 ; do pathcomp=$pathcomp$1 shift if test ! -d "$pathcomp"; then $mkdirprog "$pathcomp" # mkdir can fail with a `File exist' error in case several # install-sh are creating the directory concurrently. This # is OK. test -d "$pathcomp" || exit fi pathcomp=$pathcomp/ done fi if test -n "$dir_arg"; then $doit $mkdircmd "$dst" \ && { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \ && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \ && { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \ && { test -z "$chmodcmd" || $doit $chmodcmd "$dst"; } else dstfile=`basename "$dst"` # 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 trap '(exit $?); exit' 1 2 13 15 # Copy the file name to the temp name. $doit $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 "$dsttmp"; } && # Now rename the file to the real destination. { $doit $mvcmd -f "$dsttmp" "$dstdir/$dstfile" 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 "$dstdir/$dstfile"; then $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null \ || $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \ || { echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2 (exit 1); exit 1 } else : fi } && # Now rename the file to the real destination. $doit $mvcmd "$dsttmp" "$dstdir/$dstfile" } } fi || { (exit 1); exit 1; } done # The final little trick to "correctly" pass the exit status to the exit trap. { (exit 0); 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: gnuit-4.9.5/config.sub0000755000175000017500000010115311146671375011577 00000000000000#! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 # Free Software Foundation, Inc. timestamp='2008-01-16' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software # can handle that machine. It does not imply ALL GNU software can. # # This file is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # 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 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. # Please send patches to . Submit a context # diff and a properly formatted ChangeLog entry. # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. # Each package is responsible for reporting which valid configurations # it does not support. The user should be able to distinguish # a failure to support a valid configuration from a meaningless # configuration. # The goal of this file is to map all the various variations of a given # machine specification into a single specification in the form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or in some cases, the newer four-part form: # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] CPU-MFR-OPSYS $0 [OPTION] ALIAS Canonicalize a configuration name. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.sub ($timestamp) Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" exit 1 ;; *local*) # First pass through any local machine types. echo $1 exit ;; * ) break ;; esac done case $# in 0) echo "$me: missing argument$help" >&2 exit 1;; 1) ;; *) echo "$me: too many arguments$help" >&2 exit 1;; esac # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; *) basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] then os=`echo $1 | sed 's/.*-/-/'` else os=; fi ;; esac ### Let's recognize common machines as not being operating systems so ### that things like config.sub decstation-3100 work. We also ### recognize some manufacturers as not being operating systems, so we ### can provide default operating systems below. case $os in -sun*os*) # Prevent following clause from handling this invalid input. ;; -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -apple | -axis | -knuth | -cray) os= basic_machine=$1 ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 ;; -scout) ;; -wrs) os=-vxworks basic_machine=$1 ;; -chorusos*) os=-chorusos basic_machine=$1 ;; -chorusrdb) os=-chorusrdb basic_machine=$1 ;; -hiux*) os=-hiuxwe2 ;; -sco6) os=-sco5v6 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5) os=-sco3.2v5 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco4) os=-sco3.2v4 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2.[4-9]*) os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2v[4-9]*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5v6*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco*) os=-sco3.2v2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -udk*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -isc) os=-isc2.2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -clix*) basic_machine=clipper-intergraph ;; -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -lynx*) os=-lynxos ;; -ptx*) basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` ;; -windowsnt*) os=`echo $os | sed -e 's/windowsnt/winnt/'` ;; -psos*) os=-psos ;; -mint | -mint[0-9]*) basic_machine=m68k-atari os=-mint ;; esac # Decode aliases for certain CPU-COMPANY combinations. case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. 1750a | 580 \ | a29k \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ | bfin \ | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ | fido | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ | maxq | mb | microblaze | mcore | mep \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ | mips64vr | mips64vrel \ | mips64orion | mips64orionel \ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | mt \ | msp430 \ | nios | nios2 \ | ns16k | ns32k \ | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | pyramid \ | score \ | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ | spu | strongarm \ | tahoe | thumb | tic4x | tic80 | tron \ | v850 | v850e \ | we32k \ | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ | z8k) basic_machine=$basic_machine-unknown ;; m6811 | m68hc11 | m6812 | m68hc12) # Motorola 68HC11/12. basic_machine=$basic_machine-unknown os=-none ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; ms1) basic_machine=mt-unknown ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. i*86 | x86_64) basic_machine=$basic_machine-pc ;; # Object if more than one company name word. *-*-*) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; # Recognize the basic CPU types with company name. 580-* \ | a29k-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | maxq-* | mcore-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ | mips64vr-* | mips64vrel-* \ | mips64orion-* | mips64orionel-* \ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | mt-* \ | msp430-* \ | nios-* | nios2-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ | pyramid-* \ | romp-* | rs6000-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | sparclite-* \ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ | tahoe-* | thumb-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tron-* \ | v850-* | v850e-* | vax-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ | xstormy16-* | xtensa*-* \ | ymp-* \ | z8k-*) ;; # Recognize the basic CPU types without company name, with glob match. xtensa*) basic_machine=$basic_machine-unknown ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) basic_machine=i386-unknown os=-bsd ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) basic_machine=m68000-att ;; 3b*) basic_machine=we32k-att ;; a29khif) basic_machine=a29k-amd os=-udi ;; abacus) basic_machine=abacus-unknown ;; adobe68k) basic_machine=m68010-adobe os=-scout ;; alliant | fx80) basic_machine=fx80-alliant ;; altos | altos3068) basic_machine=m68k-altos ;; am29k) basic_machine=a29k-none os=-bsd ;; amd64) basic_machine=x86_64-pc ;; amd64-*) basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; amdahl) basic_machine=580-amdahl os=-sysv ;; amiga | amiga-*) basic_machine=m68k-unknown ;; amigaos | amigados) basic_machine=m68k-unknown os=-amigaos ;; amigaunix | amix) basic_machine=m68k-unknown os=-sysv4 ;; apollo68) basic_machine=m68k-apollo os=-sysv ;; apollo68bsd) basic_machine=m68k-apollo os=-bsd ;; aux) basic_machine=m68k-apple os=-aux ;; balance) basic_machine=ns32k-sequent os=-dynix ;; blackfin) basic_machine=bfin-unknown os=-linux ;; blackfin-*) basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; c90) basic_machine=c90-cray os=-unicos ;; convex-c1) basic_machine=c1-convex os=-bsd ;; convex-c2) basic_machine=c2-convex os=-bsd ;; convex-c32) basic_machine=c32-convex os=-bsd ;; convex-c34) basic_machine=c34-convex os=-bsd ;; convex-c38) basic_machine=c38-convex os=-bsd ;; cray | j90) basic_machine=j90-cray os=-unicos ;; craynv) basic_machine=craynv-cray os=-unicosmp ;; cr16) basic_machine=cr16-unknown os=-elf ;; crds | unos) basic_machine=m68k-crds ;; crisv32 | crisv32-* | etraxfs*) basic_machine=crisv32-axis ;; cris | cris-* | etrax*) basic_machine=cris-axis ;; crx) basic_machine=crx-unknown os=-elf ;; da30 | da30-*) basic_machine=m68k-da30 ;; decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) basic_machine=mips-dec ;; decsystem10* | dec10*) basic_machine=pdp10-dec os=-tops10 ;; decsystem20* | dec20*) basic_machine=pdp10-dec os=-tops20 ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) basic_machine=m68k-motorola ;; delta88) basic_machine=m88k-motorola os=-sysv3 ;; djgpp) basic_machine=i586-pc os=-msdosdjgpp ;; dpx20 | dpx20-*) basic_machine=rs6000-bull os=-bosx ;; dpx2* | dpx2*-bull) basic_machine=m68k-bull os=-sysv3 ;; ebmon29k) basic_machine=a29k-amd os=-ebmon ;; elxsi) basic_machine=elxsi-elxsi os=-bsd ;; encore | umax | mmax) basic_machine=ns32k-encore ;; es1800 | OSE68k | ose68k | ose | OSE) basic_machine=m68k-ericsson os=-ose ;; fx2800) basic_machine=i860-alliant ;; genix) basic_machine=ns32k-ns ;; gmicro) basic_machine=tron-gmicro os=-sysv ;; go32) basic_machine=i386-pc os=-go32 ;; h3050r* | hiux*) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; h8300hms) basic_machine=h8300-hitachi os=-hms ;; h8300xray) basic_machine=h8300-hitachi os=-xray ;; h8500hms) basic_machine=h8500-hitachi os=-hms ;; harris) basic_machine=m88k-harris os=-sysv3 ;; hp300-*) basic_machine=m68k-hp ;; hp300bsd) basic_machine=m68k-hp os=-bsd ;; hp300hpux) basic_machine=m68k-hp os=-hpux ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) basic_machine=m68000-hp ;; hp9k3[2-9][0-9]) basic_machine=m68k-hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) basic_machine=hppa1.1-hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) basic_machine=hppa1.1-hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) basic_machine=hppa1.0-hp ;; hppa-next) os=-nextstep3 ;; hppaosf) basic_machine=hppa1.1-hp os=-osf ;; hppro) basic_machine=hppa1.1-hp os=-proelf ;; i370-ibm* | ibm*) basic_machine=i370-ibm ;; # I'm not sure what "Sysv32" means. Should this be sysv3.2? i*86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; i*86v4*) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; i*86v) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv ;; i*86sol2) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; i386mach) basic_machine=i386-mach os=-mach ;; i386-vsta | vsta) basic_machine=i386-unknown os=-vsta ;; iris | iris4d) basic_machine=mips-sgi case $os in -irix*) ;; *) os=-irix4 ;; esac ;; isi68 | isi) basic_machine=m68k-isi os=-sysv ;; m68knommu) basic_machine=m68k-unknown os=-linux ;; m68knommu-*) basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; m88k-omron*) basic_machine=m88k-omron ;; magnum | m3230) basic_machine=mips-mips os=-sysv ;; merlin) basic_machine=ns32k-utek os=-sysv ;; mingw32) basic_machine=i386-pc os=-mingw32 ;; mingw32ce) basic_machine=arm-unknown os=-mingw32ce ;; miniframe) basic_machine=m68000-convergent ;; *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) basic_machine=m68k-atari os=-mint ;; mips3*-*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` ;; mips3*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; monitor) basic_machine=m68k-rom68k os=-coff ;; morphos) basic_machine=powerpc-unknown os=-morphos ;; msdos) basic_machine=i386-pc os=-msdos ;; ms1-*) basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` ;; mvs) basic_machine=i370-ibm os=-mvs ;; ncr3000) basic_machine=i486-ncr os=-sysv4 ;; netbsd386) basic_machine=i386-unknown os=-netbsd ;; netwinder) basic_machine=armv4l-rebel os=-linux ;; news | news700 | news800 | news900) basic_machine=m68k-sony os=-newsos ;; news1000) basic_machine=m68030-sony os=-newsos ;; news-3600 | risc-news) basic_machine=mips-sony os=-newsos ;; necv70) basic_machine=v70-nec os=-sysv ;; next | m*-next ) basic_machine=m68k-next case $os in -nextstep* ) ;; -ns2*) os=-nextstep2 ;; *) os=-nextstep3 ;; esac ;; nh3000) basic_machine=m68k-harris os=-cxux ;; nh[45]000) basic_machine=m88k-harris os=-cxux ;; nindy960) basic_machine=i960-intel os=-nindy ;; mon960) basic_machine=i960-intel os=-mon960 ;; nonstopux) basic_machine=mips-compaq os=-nonstopux ;; np1) basic_machine=np1-gould ;; nsr-tandem) basic_machine=nsr-tandem ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf ;; openrisc | openrisc-*) basic_machine=or32-unknown ;; os400) basic_machine=powerpc-ibm os=-os400 ;; OSE68000 | ose68000) basic_machine=m68000-ericsson os=-ose ;; os68k) basic_machine=m68k-none os=-os68k ;; pa-hitachi) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; paragon) basic_machine=i860-intel os=-osf ;; parisc) basic_machine=hppa-unknown os=-linux ;; parisc-*) basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; pbd) basic_machine=sparc-tti ;; pbb) basic_machine=m68k-tti ;; pc532 | pc532-*) basic_machine=ns32k-pc532 ;; pc98) basic_machine=i386-pc ;; pc98-*) basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; pentiumpro | p6 | 6x86 | athlon | athlon_*) basic_machine=i686-pc ;; pentiumii | pentium2 | pentiumiii | pentium3) basic_machine=i686-pc ;; pentium4) basic_machine=i786-pc ;; pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-* | athlon-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium4-*) basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould ;; power) basic_machine=power-ibm ;; ppc) basic_machine=powerpc-unknown ;; ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown ;; ppcle-* | powerpclittle-*) basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64) basic_machine=powerpc64-unknown ;; ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64le | powerpc64little | ppc64-le | powerpc64-little) basic_machine=powerpc64le-unknown ;; ppc64le-* | powerpc64little-*) basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ps2) basic_machine=i386-ibm ;; pw32) basic_machine=i586-unknown os=-pw32 ;; rdos) basic_machine=i386-pc os=-rdos ;; rom68k) basic_machine=m68k-rom68k os=-coff ;; rm[46]00) basic_machine=mips-siemens ;; rtpc | rtpc-*) basic_machine=romp-ibm ;; s390 | s390-*) basic_machine=s390-ibm ;; s390x | s390x-*) basic_machine=s390x-ibm ;; sa29200) basic_machine=a29k-amd os=-udi ;; sb1) basic_machine=mipsisa64sb1-unknown ;; sb1el) basic_machine=mipsisa64sb1el-unknown ;; sde) basic_machine=mipsisa32-sde os=-elf ;; sei) basic_machine=mips-sei os=-seiux ;; sequent) basic_machine=i386-sequent ;; sh) basic_machine=sh-hitachi os=-hms ;; sh5el) basic_machine=sh5le-unknown ;; sh64) basic_machine=sh64-unknown ;; sparclite-wrs | simso-wrs) basic_machine=sparclite-wrs os=-vxworks ;; sps7) basic_machine=m68k-bull os=-sysv2 ;; spur) basic_machine=spur-unknown ;; st2000) basic_machine=m68k-tandem ;; stratus) basic_machine=i860-stratus os=-sysv4 ;; sun2) basic_machine=m68000-sun ;; sun2os3) basic_machine=m68000-sun os=-sunos3 ;; sun2os4) basic_machine=m68000-sun os=-sunos4 ;; sun3os3) basic_machine=m68k-sun os=-sunos3 ;; sun3os4) basic_machine=m68k-sun os=-sunos4 ;; sun4os3) basic_machine=sparc-sun os=-sunos3 ;; sun4os4) basic_machine=sparc-sun os=-sunos4 ;; sun4sol2) basic_machine=sparc-sun os=-solaris2 ;; sun3 | sun3-*) basic_machine=m68k-sun ;; sun4) basic_machine=sparc-sun ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun ;; sv1) basic_machine=sv1-cray os=-unicos ;; symmetry) basic_machine=i386-sequent os=-dynix ;; t3e) basic_machine=alphaev5-cray os=-unicos ;; t90) basic_machine=t90-cray os=-unicos ;; tic54x | c54x*) basic_machine=tic54x-unknown os=-coff ;; tic55x | c55x*) basic_machine=tic55x-unknown os=-coff ;; tic6x | c6x*) basic_machine=tic6x-unknown os=-coff ;; tile*) basic_machine=tile-unknown os=-linux-gnu ;; tx39) basic_machine=mipstx39-unknown ;; tx39el) basic_machine=mipstx39el-unknown ;; toad1) basic_machine=pdp10-xkl os=-tops20 ;; tower | tower-32) basic_machine=m68k-ncr ;; tpf) basic_machine=s390x-ibm os=-tpf ;; udi29k) basic_machine=a29k-amd os=-udi ;; ultra3) basic_machine=a29k-nyu os=-sym1 ;; v810 | necv810) basic_machine=v810-nec os=-none ;; vaxv) basic_machine=vax-dec os=-sysv ;; vms) basic_machine=vax-dec os=-vms ;; vpp*|vx|vx-*) basic_machine=f301-fujitsu ;; vxworks960) basic_machine=i960-wrs os=-vxworks ;; vxworks68) basic_machine=m68k-wrs os=-vxworks ;; vxworks29k) basic_machine=a29k-wrs os=-vxworks ;; w65*) basic_machine=w65-wdc os=-none ;; w89k-*) basic_machine=hppa1.1-winbond os=-proelf ;; xbox) basic_machine=i686-pc os=-mingw32 ;; xps | xps100) basic_machine=xps100-honeywell ;; ymp) basic_machine=ymp-cray os=-unicos ;; z8k-*-coff) basic_machine=z8k-unknown os=-sim ;; none) basic_machine=none-none os=-none ;; # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. w89k) basic_machine=hppa1.1-winbond ;; op50n) basic_machine=hppa1.1-oki ;; op60c) basic_machine=hppa1.1-oki ;; romp) basic_machine=romp-ibm ;; mmix) basic_machine=mmix-knuth ;; rs6000) basic_machine=rs6000-ibm ;; vax) basic_machine=vax-dec ;; pdp10) # there are many clones, so DEC is not a safe bet basic_machine=pdp10-unknown ;; pdp11) basic_machine=pdp11-dec ;; we32k) basic_machine=we32k-att ;; sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) basic_machine=sparc-sun ;; cydra) basic_machine=cydra-cydrome ;; orion) basic_machine=orion-highlevel ;; orion105) basic_machine=clipper-highlevel ;; mac | mpw | mac-mpw) basic_machine=m68k-apple ;; pmac | pmac-mpw) basic_machine=powerpc-apple ;; *-unknown) # Make sure to match an already-canonicalized machine name. ;; *) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; esac # Here we canonicalize certain aliases for manufacturers. case $basic_machine in *-digital*) basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` ;; *-commodore*) basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` ;; *) ;; esac # Decode manufacturer-specific aliases for certain operating systems. if [ x"$os" != x"" ] then case $os in # First match some system type aliases # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; -solaris) os=-solaris2 ;; -svr4*) os=-sysv4 ;; -unixware*) os=-sysv4.2uw ;; -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; # First accept the basic system types. # The portable systems comes first. # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ | -openbsd* | -solidbsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* \ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ | -skyos* | -haiku* | -rdos* | -toppers* | -drops*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) case $basic_machine in x86-* | i*86-*) ;; *) os=-nto$os ;; esac ;; -nto-qnx*) ;; -nto*) os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) os=`echo $os | sed -e 's|mac|macos|'` ;; -linux-dietlibc) os=-linux-dietlibc ;; -linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; -sunos5*) os=`echo $os | sed -e 's|sunos5|solaris2|'` ;; -sunos6*) os=`echo $os | sed -e 's|sunos6|solaris3|'` ;; -opened*) os=-openedition ;; -os400*) os=-os400 ;; -wince*) os=-wince ;; -osfrose*) os=-osfrose ;; -osf*) os=-osf ;; -utek*) os=-bsd ;; -dynix*) os=-bsd ;; -acis*) os=-aos ;; -atheos*) os=-atheos ;; -syllable*) os=-syllable ;; -386bsd) os=-bsd ;; -ctix* | -uts*) os=-sysv ;; -nova*) os=-rtmk-nova ;; -ns2 ) os=-nextstep2 ;; -nsk*) os=-nsk ;; # Preserve the version number of sinix5. -sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` ;; -sinix*) os=-sysv4 ;; -tpf*) os=-tpf ;; -triton*) os=-sysv3 ;; -oss*) os=-sysv3 ;; -svr4) os=-sysv4 ;; -svr3) os=-sysv3 ;; -sysvr4) os=-sysv4 ;; # This must come after -sysvr4. -sysv*) ;; -ose*) os=-ose ;; -es1800*) os=-ose ;; -xenix) os=-xenix ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) os=-mint ;; -aros*) os=-aros ;; -kaos*) os=-kaos ;; -zvmoe) os=-zvmoe ;; -none) ;; *) # Get rid of the `-' at the beginning of $os. os=`echo $os | sed 's/[^-]*-//'` echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 exit 1 ;; esac else # Here we handle the default operating systems that come with various machines. # The value should be what the vendor currently ships out the door with their # machine or put another way, the most popular os provided with the machine. # Note that if you're going to try to match "-MANUFACTURER" here (say, # "-sun"), then you have to tell the case statement up towards the top # that MANUFACTURER isn't an operating system. Otherwise, code above # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. case $basic_machine in score-*) os=-elf ;; spu-*) os=-elf ;; *-acorn) os=-riscix1.2 ;; arm*-rebel) os=-linux ;; arm*-semi) os=-aout ;; c4x-* | tic4x-*) os=-coff ;; # This must come before the *-dec entry. pdp10-*) os=-tops20 ;; pdp11-*) os=-none ;; *-dec | vax-*) os=-ultrix4.2 ;; m68*-apollo) os=-domain ;; i386-sun) os=-sunos4.0.2 ;; m68000-sun) os=-sunos3 # This also exists in the configure program, but was not the # default. # os=-sunos4 ;; m68*-cisco) os=-aout ;; mep-*) os=-elf ;; mips*-cisco) os=-elf ;; mips*-*) os=-elf ;; or32-*) os=-coff ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 ;; sparc-* | *-sun) os=-sunos4.1.1 ;; *-be) os=-beos ;; *-haiku) os=-haiku ;; *-ibm) os=-aix ;; *-knuth) os=-mmixware ;; *-wec) os=-proelf ;; *-winbond) os=-proelf ;; *-oki) os=-proelf ;; *-hp) os=-hpux ;; *-hitachi) os=-hiux ;; i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) os=-sysv ;; *-cbm) os=-amigaos ;; *-dg) os=-dgux ;; *-dolphin) os=-sysv3 ;; m68k-ccur) os=-rtu ;; m88k-omron*) os=-luna ;; *-next ) os=-nextstep ;; *-sequent) os=-ptx ;; *-crds) os=-unos ;; *-ns) os=-genix ;; i370-*) os=-mvs ;; *-next) os=-nextstep3 ;; *-gould) os=-sysv ;; *-highlevel) os=-bsd ;; *-encore) os=-bsd ;; *-sgi) os=-irix ;; *-siemens) os=-sysv4 ;; *-masscomp) os=-rtu ;; f30[01]-fujitsu | f700-fujitsu) os=-uxpv ;; *-rom68k) os=-coff ;; *-*bug) os=-coff ;; *-apple) os=-macos ;; *-atari*) os=-mint ;; *) os=-none ;; esac fi # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. vendor=unknown case $basic_machine in *-unknown) case $os in -riscix*) vendor=acorn ;; -sunos*) vendor=sun ;; -aix*) vendor=ibm ;; -beos*) vendor=be ;; -hpux*) vendor=hp ;; -mpeix*) vendor=hp ;; -hiux*) vendor=hitachi ;; -unos*) vendor=crds ;; -dgux*) vendor=dg ;; -luna*) vendor=omron ;; -genix*) vendor=ns ;; -mvs* | -opened*) vendor=ibm ;; -os400*) vendor=ibm ;; -ptx*) vendor=sequent ;; -tpf*) vendor=ibm ;; -vxsim* | -vxworks* | -windiss*) vendor=wrs ;; -aux*) vendor=apple ;; -hms*) vendor=hitachi ;; -mpw* | -macos*) vendor=apple ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) vendor=atari ;; -vos*) vendor=stratus ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; esac echo $basic_machine$os exit # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: gnuit-4.9.5/gnuit.spec.in0000644000175000017500000000304211146671375012221 00000000000000Summary: A set of GNU Interactive Tools. Name: gnuit Version: @VERSION@ Release: 1 Copyright: GNU Group: Applications/File Source: ftp://ftp.gnu.org/gnu/gnuit/gnuit-%{version}.tar.gz URL: http://www.gnu.org/software/gnuit/ Packager: Ian Beckwith BuildRoot: /var/tmp/git-root Prereq: /sbin/install-info %description GNU Interactive Tools provides an extensible file system browser, an ASCII/hexadecimal file viewer, a process viewer/killer and other related utilities and shell scripts. GIT can be used to increase the speed and efficiency of copying and moving files and directories, invoking editors, compressing and uncompressing files, creating and expanding archives, compiling programs, sending mail and more. GIT uses standard ANSI color sequences, if they are available. You should install the gnuit package if you are interested in using its file management capabilities. %prep rm -rf $RPM_BUILD_ROOT %setup -q %build CFLAGS="$RPM_OPT_FLAGS" LDFLAGS='-s' ./configure --prefix=/usr --with-terminfo make %install make prefix=$RPM_BUILD_ROOT/usr/ install-strip gzip -9nf $RPM_BUILD_ROOT/usr/share/info/gnuit.info* %files %doc COPYING ChangeLog LSM NEWS PLATFORMS PROBLEMS README INSTALL doc/gnuit.html /usr/bin/* /usr/bin/.gitaction /usr/man/man1/* /usr/share/info/gnuit* /usr/share/gnuit/* /usr/share/doc/gnuit/* %clean rm -rf $RPM_BUILD_ROOT %post /sbin/install-info /usr/share/info/gnuit.info.gz /usr/share/info/dir %preun if [ "$1" = 0 ]; then /sbin/install-info --delete /usr/share/info/gnuit.info.gz /usr/share/info/dir fi gnuit-4.9.5/LSM0000644000175000017500000000203311146672065010164 00000000000000Begin4 Title: GNU Interactive Tools (gnuit) Version: 4.9.5 Entered-date: 2008-04-13 Description: GNUIT (GNU Interactive Tools) provides an extensible file system browser, an ASCII/hexadecimal file viewer, a process viewer/killer and other related utilities and shell scripts. GNUIT can be used to increase the speed and efficiency of copying and moving files and directories, invoking editors, compressing and uncompressing files, creating and expanding archives, compiling programs, sending mail and more. GNUIT uses standard ANSI color sequences, if they are available. GNUIT was formerly called GIT, but the name has been changed to avoid confusion with the VCS. Keywords: File browser, Process viewer, Hex viewer, Interactive Tools, git Author: tudor@cs.unh.edu (Tudor Hulubei) pink@roedu.net (Andrei Pitis) ianb@erislabs.net (Ian Beckwith) Maintained-by: gnuit-dev@gnu.org Primary-site: ftp.gnu.org /gnu/gnuit 768k gnuit-4.9.5.tar.gz Original-site: Platforms: Copying-policy: GPL End gnuit-4.9.5/version.h.in0000644000175000017500000000020411146671376012053 00000000000000#define PRODUCT "@PRODUCT@" #define PACKAGE "@PACKAGE@" #define VERSION "@VERSION@" #define HOST "@HOST@" #define PREFIX "@prefix@" gnuit-4.9.5/lib/0000777000175000017500000000000011146672037010441 500000000000000gnuit-4.9.5/lib/strtol.c0000644000175000017500000002530411146671375012060 00000000000000/* Convert string representation of a number into an integer value. Copyright (C) 1991, 1992, 1994, 1995, 1996, 1997, 1998, 1999, 2003, 2005, 2006, 2007 Free Software Foundation, Inc. NOTE: The canonical source of this file is maintained with the GNU C Library. Bugs can be reported to bug-glibc@gnu.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 3 of the License, or 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, see . */ #ifdef _LIBC # define USE_NUMBER_GROUPING #else # include #endif #include #include #ifndef __set_errno # define __set_errno(Val) errno = (Val) #endif #include #include #include #include #ifdef USE_NUMBER_GROUPING # include "../locale/localeinfo.h" #endif /* Nonzero if we are defining `strtoul' or `strtoull', operating on unsigned integers. */ #ifndef UNSIGNED # define UNSIGNED 0 # define INT LONG int #else # define INT unsigned LONG int #endif /* Determine the name. */ #ifdef USE_IN_EXTENDED_LOCALE_MODEL # if UNSIGNED # ifdef USE_WIDE_CHAR # ifdef QUAD # define strtol __wcstoull_l # else # define strtol __wcstoul_l # endif # else # ifdef QUAD # define strtol __strtoull_l # else # define strtol __strtoul_l # endif # endif # else # ifdef USE_WIDE_CHAR # ifdef QUAD # define strtol __wcstoll_l # else # define strtol __wcstol_l # endif # else # ifdef QUAD # define strtol __strtoll_l # else # define strtol __strtol_l # endif # endif # endif #else # if UNSIGNED # ifdef USE_WIDE_CHAR # ifdef QUAD # define strtol wcstoull # else # define strtol wcstoul # endif # else # ifdef QUAD # define strtol strtoull # else # define strtol strtoul # endif # endif # else # ifdef USE_WIDE_CHAR # ifdef QUAD # define strtol wcstoll # else # define strtol wcstol # endif # else # ifdef QUAD # define strtol strtoll # endif # endif # endif #endif /* If QUAD is defined, we are defining `strtoll' or `strtoull', operating on `long long int's. */ #ifdef QUAD # define LONG long long # define STRTOL_LONG_MIN LONG_LONG_MIN # define STRTOL_LONG_MAX LONG_LONG_MAX # define STRTOL_ULONG_MAX ULONG_LONG_MAX /* The extra casts in the following macros work around compiler bugs, e.g., in Cray C 5.0.3.0. */ /* True if negative values of the signed integer type T use two's complement, ones' complement, or signed magnitude representation, respectively. Much GNU code assumes two's complement, but some people like to be portable to all possible C hosts. */ # define TYPE_TWOS_COMPLEMENT(t) ((t) ~ (t) 0 == (t) -1) # define TYPE_ONES_COMPLEMENT(t) ((t) ~ (t) 0 == 0) # define TYPE_SIGNED_MAGNITUDE(t) ((t) ~ (t) 0 < (t) -1) /* True if the arithmetic type T is signed. */ # define TYPE_SIGNED(t) (! ((t) 0 < (t) -1)) /* The maximum and minimum values for the integer type T. These macros have undefined behavior if T is signed and has padding bits. If this is a problem for you, please let us know how to fix it for your host. */ # define TYPE_MINIMUM(t) \ ((t) (! TYPE_SIGNED (t) \ ? (t) 0 \ : TYPE_SIGNED_MAGNITUDE (t) \ ? ~ (t) 0 \ : ~ (t) 0 << (sizeof (t) * CHAR_BIT - 1))) # define TYPE_MAXIMUM(t) \ ((t) (! TYPE_SIGNED (t) \ ? (t) -1 \ : ~ (~ (t) 0 << (sizeof (t) * CHAR_BIT - 1)))) # ifndef ULONG_LONG_MAX # define ULONG_LONG_MAX TYPE_MAXIMUM (unsigned long long) # endif # ifndef LONG_LONG_MAX # define LONG_LONG_MAX TYPE_MAXIMUM (long long int) # endif # ifndef LONG_LONG_MIN # define LONG_LONG_MIN TYPE_MINIMUM (long long int) # endif # if __GNUC__ == 2 && __GNUC_MINOR__ < 7 /* Work around gcc bug with using this constant. */ static const unsigned long long int maxquad = ULONG_LONG_MAX; # undef STRTOL_ULONG_MAX # define STRTOL_ULONG_MAX maxquad # endif #else # define LONG long # define STRTOL_LONG_MIN LONG_MIN # define STRTOL_LONG_MAX LONG_MAX # define STRTOL_ULONG_MAX ULONG_MAX #endif /* We use this code also for the extended locale handling where the function gets as an additional argument the locale which has to be used. To access the values we have to redefine the _NL_CURRENT macro. */ #ifdef USE_IN_EXTENDED_LOCALE_MODEL # undef _NL_CURRENT # define _NL_CURRENT(category, item) \ (current->values[_NL_ITEM_INDEX (item)].string) # define LOCALE_PARAM , loc # define LOCALE_PARAM_PROTO , __locale_t loc #else # define LOCALE_PARAM # define LOCALE_PARAM_PROTO #endif #include #ifdef USE_WIDE_CHAR # include # define L_(Ch) L##Ch # define UCHAR_TYPE wint_t # define STRING_TYPE wchar_t # ifdef USE_IN_EXTENDED_LOCALE_MODEL # define ISSPACE(Ch) __iswspace_l ((Ch), loc) # define ISALPHA(Ch) __iswalpha_l ((Ch), loc) # define TOUPPER(Ch) __towupper_l ((Ch), loc) # else # define ISSPACE(Ch) iswspace (Ch) # define ISALPHA(Ch) iswalpha (Ch) # define TOUPPER(Ch) towupper (Ch) # endif #else # define L_(Ch) Ch # define UCHAR_TYPE unsigned char # define STRING_TYPE char # ifdef USE_IN_EXTENDED_LOCALE_MODEL # define ISSPACE(Ch) __isspace_l ((Ch), loc) # define ISALPHA(Ch) __isalpha_l ((Ch), loc) # define TOUPPER(Ch) __toupper_l ((Ch), loc) # else # define ISSPACE(Ch) isspace (Ch) # define ISALPHA(Ch) isalpha (Ch) # define TOUPPER(Ch) toupper (Ch) # endif #endif #define INTERNAL(X) INTERNAL1(X) #define INTERNAL1(X) __##X##_internal #define WEAKNAME(X) WEAKNAME1(X) #ifdef USE_NUMBER_GROUPING /* This file defines a function to check for correct grouping. */ # include "grouping.h" #endif /* Convert NPTR to an `unsigned long int' or `long int' in base BASE. If BASE is 0 the base is determined by the presence of a leading zero, indicating octal or a leading "0x" or "0X", indicating hexadecimal. If BASE is < 2 or > 36, it is reset to 10. If ENDPTR is not NULL, a pointer to the character after the last one converted is stored in *ENDPTR. */ INT INTERNAL (strtol) (const STRING_TYPE *nptr, STRING_TYPE **endptr, int base, int group LOCALE_PARAM_PROTO) { int negative; register unsigned LONG int cutoff; register unsigned int cutlim; register unsigned LONG int i; register const STRING_TYPE *s; register UCHAR_TYPE c; const STRING_TYPE *save, *end; int overflow; #ifdef USE_NUMBER_GROUPING # ifdef USE_IN_EXTENDED_LOCALE_MODEL struct locale_data *current = loc->__locales[LC_NUMERIC]; # endif /* The thousands character of the current locale. */ wchar_t thousands = L'\0'; /* The numeric grouping specification of the current locale, in the format described in . */ const char *grouping; if (group) { grouping = _NL_CURRENT (LC_NUMERIC, GROUPING); if (*grouping <= 0 || *grouping == CHAR_MAX) grouping = NULL; else { /* Figure out the thousands separator character. */ # if defined _LIBC || defined _HAVE_BTOWC thousands = __btowc (*_NL_CURRENT (LC_NUMERIC, THOUSANDS_SEP)); if (thousands == WEOF) thousands = L'\0'; # endif if (thousands == L'\0') grouping = NULL; } } else grouping = NULL; #endif if (base < 0 || base == 1 || base > 36) { __set_errno (EINVAL); return 0; } save = s = nptr; /* Skip white space. */ while (ISSPACE (*s)) ++s; if (*s == L_('\0')) goto noconv; /* Check for a sign. */ if (*s == L_('-')) { negative = 1; ++s; } else if (*s == L_('+')) { negative = 0; ++s; } else negative = 0; /* Recognize number prefix and if BASE is zero, figure it out ourselves. */ if (*s == L_('0')) { if ((base == 0 || base == 16) && TOUPPER (s[1]) == L_('X')) { s += 2; base = 16; } else if (base == 0) base = 8; } else if (base == 0) base = 10; /* Save the pointer so we can check later if anything happened. */ save = s; #ifdef USE_NUMBER_GROUPING if (group) { /* Find the end of the digit string and check its grouping. */ end = s; for (c = *end; c != L_('\0'); c = *++end) if ((wchar_t) c != thousands && ((wchar_t) c < L_('0') || (wchar_t) c > L_('9')) && (!ISALPHA (c) || (int) (TOUPPER (c) - L_('A') + 10) >= base)) break; if (*s == thousands) end = s; else end = correctly_grouped_prefix (s, end, thousands, grouping); } else #endif end = NULL; cutoff = STRTOL_ULONG_MAX / (unsigned LONG int) base; cutlim = STRTOL_ULONG_MAX % (unsigned LONG int) base; overflow = 0; i = 0; for (c = *s; c != L_('\0'); c = *++s) { if (s == end) break; if (c >= L_('0') && c <= L_('9')) c -= L_('0'); else if (ISALPHA (c)) c = TOUPPER (c) - L_('A') + 10; else break; if ((int) c >= base) break; /* Check for overflow. */ if (i > cutoff || (i == cutoff && c > cutlim)) overflow = 1; else { i *= (unsigned LONG int) base; i += c; } } /* Check if anything actually happened. */ if (s == save) goto noconv; /* Store in ENDPTR the address of one character past the last character we converted. */ if (endptr != NULL) *endptr = (STRING_TYPE *) s; #if !UNSIGNED /* Check for a value that is within the range of `unsigned LONG int', but outside the range of `LONG int'. */ if (overflow == 0 && i > (negative ? -((unsigned LONG int) (STRTOL_LONG_MIN + 1)) + 1 : (unsigned LONG int) STRTOL_LONG_MAX)) overflow = 1; #endif if (overflow) { __set_errno (ERANGE); #if UNSIGNED return STRTOL_ULONG_MAX; #else return negative ? STRTOL_LONG_MIN : STRTOL_LONG_MAX; #endif } /* Return the result of the appropriate sign. */ return negative ? -i : i; noconv: /* We must handle a special case here: the base is 0 or 16 and the first two characters are '0' and 'x', but the rest are no hexadecimal digits. This is no error case. We return 0 and ENDPTR points to the `x`. */ if (endptr != NULL) { if (save - nptr >= 2 && TOUPPER (save[-1]) == L_('X') && save[-2] == L_('0')) *endptr = (STRING_TYPE *) &save[-1]; else /* There was no number to convert. */ *endptr = (STRING_TYPE *) nptr; } return 0L; } /* External user entry point. */ INT #ifdef weak_function weak_function #endif strtol (const STRING_TYPE *nptr, STRING_TYPE **endptr, int base LOCALE_PARAM_PROTO) { return INTERNAL (strtol) (nptr, endptr, base, 0 LOCALE_PARAM); } gnuit-4.9.5/lib/idcache.h0000644000175000017500000000035511146671375012115 00000000000000#ifndef IDCACHE_H # define IDCACHE_H 1 # include extern char *getuser (uid_t uid); extern char *getgroup (gid_t gid); extern uid_t *getuidbyname (const char *user); extern gid_t *getgidbyname (const char *group); #endif gnuit-4.9.5/lib/localcharset.h0000644000175000017500000000253011146671375013176 00000000000000/* Determine a canonical name for the current locale's character encoding. Copyright (C) 2000-2003 Free Software Foundation, Inc. This file is part of the GNU CHARSET Library. 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 3, 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. */ #ifndef _LOCALCHARSET_H #define _LOCALCHARSET_H #ifdef __cplusplus extern "C" { #endif /* Determine the current locale's character encoding, and canonicalize it into one of the canonical names listed in config.charset. The result must not be freed; it is statically allocated. If the canonical name cannot be determined, the result is a non-canonical name. */ extern const char * locale_charset (void); #ifdef __cplusplus } #endif #endif /* _LOCALCHARSET_H */ gnuit-4.9.5/lib/xstrtol.c0000644000175000017500000001217211146671375012247 00000000000000/* A more useful interface to strtol. Copyright (C) 1995, 1996, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007 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 3 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, see . */ /* Written by Jim Meyering. */ #ifndef __strtol # define __strtol strtol # define __strtol_t long int # define __xstrtol xstrtol # define STRTOL_T_MINIMUM LONG_MIN # define STRTOL_T_MAXIMUM LONG_MAX #endif #include #include "xstrtol.h" /* Some pre-ANSI implementations (e.g. SunOS 4) need stderr defined if assertion checking is enabled. */ #include #include #include #include #include #include #include #include "intprops.h" static strtol_error bkm_scale (__strtol_t *x, int scale_factor) { if (TYPE_SIGNED (__strtol_t) && *x < STRTOL_T_MINIMUM / scale_factor) { *x = STRTOL_T_MINIMUM; return LONGINT_OVERFLOW; } if (STRTOL_T_MAXIMUM / scale_factor < *x) { *x = STRTOL_T_MAXIMUM; return LONGINT_OVERFLOW; } *x *= scale_factor; return LONGINT_OK; } static strtol_error bkm_scale_by_power (__strtol_t *x, int base, int power) { strtol_error err = LONGINT_OK; while (power--) err |= bkm_scale (x, base); return err; } /* FIXME: comment. */ strtol_error __xstrtol (const char *s, char **ptr, int strtol_base, __strtol_t *val, const char *valid_suffixes) { char *t_ptr; char **p; __strtol_t tmp; strtol_error err = LONGINT_OK; assert (0 <= strtol_base && strtol_base <= 36); p = (ptr ? ptr : &t_ptr); if (! TYPE_SIGNED (__strtol_t)) { const char *q = s; unsigned char ch = *q; while (isspace (ch)) ch = *++q; if (ch == '-') return LONGINT_INVALID; } errno = 0; tmp = __strtol (s, p, strtol_base); if (*p == s) { /* If there is no number but there is a valid suffix, assume the number is 1. The string is invalid otherwise. */ if (valid_suffixes && **p && strchr (valid_suffixes, **p)) tmp = 1; else return LONGINT_INVALID; } else if (errno != 0) { if (errno != ERANGE) return LONGINT_INVALID; err = LONGINT_OVERFLOW; } /* Let valid_suffixes == NULL mean `allow any suffix'. */ /* FIXME: update all callers except the ones that allow suffixes after the number, changing last parameter NULL to `""'. */ if (!valid_suffixes) { *val = tmp; return err; } if (**p != '\0') { int base = 1024; int suffixes = 1; strtol_error overflow; if (!strchr (valid_suffixes, **p)) { *val = tmp; return err | LONGINT_INVALID_SUFFIX_CHAR; } if (strchr (valid_suffixes, '0')) { /* The ``valid suffix'' '0' is a special flag meaning that an optional second suffix is allowed, which can change the base. A suffix "B" (e.g. "100MB") stands for a power of 1000, whereas a suffix "iB" (e.g. "100MiB") stands for a power of 1024. If no suffix (e.g. "100M"), assume power-of-1024. */ switch (p[0][1]) { case 'i': if (p[0][2] == 'B') suffixes += 2; break; case 'B': case 'D': /* 'D' is obsolescent */ base = 1000; suffixes++; break; } } switch (**p) { case 'b': overflow = bkm_scale (&tmp, 512); break; case 'B': overflow = bkm_scale (&tmp, 1024); break; case 'c': overflow = 0; break; case 'E': /* exa or exbi */ overflow = bkm_scale_by_power (&tmp, base, 6); break; case 'G': /* giga or gibi */ case 'g': /* 'g' is undocumented; for compatibility only */ overflow = bkm_scale_by_power (&tmp, base, 3); break; case 'k': /* kilo */ case 'K': /* kibi */ overflow = bkm_scale_by_power (&tmp, base, 1); break; case 'M': /* mega or mebi */ case 'm': /* 'm' is undocumented; for compatibility only */ overflow = bkm_scale_by_power (&tmp, base, 2); break; case 'P': /* peta or pebi */ overflow = bkm_scale_by_power (&tmp, base, 5); break; case 'T': /* tera or tebi */ case 't': /* 't' is undocumented; for compatibility only */ overflow = bkm_scale_by_power (&tmp, base, 4); break; case 'w': overflow = bkm_scale (&tmp, 2); break; case 'Y': /* yotta or 2**80 */ overflow = bkm_scale_by_power (&tmp, base, 8); break; case 'Z': /* zetta or 2**70 */ overflow = bkm_scale_by_power (&tmp, base, 7); break; default: *val = tmp; return err | LONGINT_INVALID_SUFFIX_CHAR; } err |= overflow; *p += suffixes; if (**p) err |= LONGINT_INVALID_SUFFIX_CHAR; } *val = tmp; return err; } gnuit-4.9.5/lib/alloca.c0000644000175000017500000003320411146671375011762 00000000000000/* alloca.c -- allocate automatically reclaimed memory (Mostly) portable public-domain implementation -- D A Gwyn This implementation of the PWB library alloca function, which is used to allocate space off the run-time stack so that it is automatically reclaimed upon procedure exit, was inspired by discussions with J. Q. Johnson of Cornell. J.Otto Tennant contributed the Cray support. There are some preprocessor constants that can be defined when compiling for your specific system, for improved efficiency; however, the defaults should be okay. The general concept of this implementation is to keep track of all alloca-allocated blocks, and reclaim any that are found to be deeper in the stack than the current invocation. This heuristic does not reclaim storage as soon as it becomes invalid, but it will do so eventually. As a special case, alloca(0) reclaims storage without allocating any. It is a good idea to use alloca(0) in your main control loop, etc. to force garbage collection. */ #include #include #include #include #ifdef emacs # include "lisp.h" # include "blockinput.h" # ifdef EMACS_FREE # undef free # define free EMACS_FREE # endif #else # define memory_full() abort () #endif /* If compiling with GCC 2, this file's not needed. */ #if !defined (__GNUC__) || __GNUC__ < 2 /* If someone has defined alloca as a macro, there must be some other way alloca is supposed to work. */ # ifndef alloca # ifdef emacs # ifdef static /* actually, only want this if static is defined as "" -- this is for usg, in which emacs must undefine static in order to make unexec workable */ # ifndef STACK_DIRECTION you lose -- must know STACK_DIRECTION at compile-time /* Using #error here is not wise since this file should work for old and obscure compilers. */ # endif /* STACK_DIRECTION undefined */ # endif /* static */ # endif /* emacs */ /* If your stack is a linked list of frames, you have to provide an "address metric" ADDRESS_FUNCTION macro. */ # if defined (CRAY) && defined (CRAY_STACKSEG_END) long i00afunc (); # define ADDRESS_FUNCTION(arg) (char *) i00afunc (&(arg)) # else # define ADDRESS_FUNCTION(arg) &(arg) # endif /* Define STACK_DIRECTION if you know the direction of stack growth for your system; otherwise it will be automatically deduced at run-time. STACK_DIRECTION > 0 => grows toward higher addresses STACK_DIRECTION < 0 => grows toward lower addresses STACK_DIRECTION = 0 => direction of growth unknown */ # ifndef STACK_DIRECTION # define STACK_DIRECTION 0 /* Direction unknown. */ # endif # if STACK_DIRECTION != 0 # define STACK_DIR STACK_DIRECTION /* Known at compile-time. */ # else /* STACK_DIRECTION == 0; need run-time code. */ static int stack_dir; /* 1 or -1 once known. */ # define STACK_DIR stack_dir static void find_stack_direction (void) { static char *addr = NULL; /* Address of first `dummy', once known. */ auto char dummy; /* To get stack address. */ if (addr == NULL) { /* Initial entry. */ addr = ADDRESS_FUNCTION (dummy); find_stack_direction (); /* Recurse once. */ } else { /* Second entry. */ if (ADDRESS_FUNCTION (dummy) > addr) stack_dir = 1; /* Stack grew upward. */ else stack_dir = -1; /* Stack grew downward. */ } } # endif /* STACK_DIRECTION == 0 */ /* An "alloca header" is used to: (a) chain together all alloca'ed blocks; (b) keep track of stack depth. It is very important that sizeof(header) agree with malloc alignment chunk size. The following default should work okay. */ # ifndef ALIGN_SIZE # define ALIGN_SIZE sizeof(double) # endif typedef union hdr { char align[ALIGN_SIZE]; /* To force sizeof(header). */ struct { union hdr *next; /* For chaining headers. */ char *deep; /* For stack depth measure. */ } h; } header; static header *last_alloca_header = NULL; /* -> last alloca header. */ /* Return a pointer to at least SIZE bytes of storage, which will be automatically reclaimed upon exit from the procedure that called alloca. Originally, this space was supposed to be taken from the current stack frame of the caller, but that method cannot be made to work for some implementations of C, for example under Gould's UTX/32. */ void * alloca (size_t size) { auto char probe; /* Probes stack depth: */ register char *depth = ADDRESS_FUNCTION (probe); # if STACK_DIRECTION == 0 if (STACK_DIR == 0) /* Unknown growth direction. */ find_stack_direction (); # endif /* Reclaim garbage, defined as all alloca'd storage that was allocated from deeper in the stack than currently. */ { register header *hp; /* Traverses linked list. */ # ifdef emacs BLOCK_INPUT; # endif for (hp = last_alloca_header; hp != NULL;) if ((STACK_DIR > 0 && hp->h.deep > depth) || (STACK_DIR < 0 && hp->h.deep < depth)) { register header *np = hp->h.next; free (hp); /* Collect garbage. */ hp = np; /* -> next header. */ } else break; /* Rest are not deeper. */ last_alloca_header = hp; /* -> last valid storage. */ # ifdef emacs UNBLOCK_INPUT; # endif } if (size == 0) return NULL; /* No allocation required. */ /* Allocate combined header + user data storage. */ { /* Address of header. */ register header *new; size_t combined_size = sizeof (header) + size; if (combined_size < sizeof (header)) memory_full (); new = malloc (combined_size); if (! new) memory_full (); new->h.next = last_alloca_header; new->h.deep = depth; last_alloca_header = new; /* User storage begins just after header. */ return (void *) (new + 1); } } # if defined (CRAY) && defined (CRAY_STACKSEG_END) # ifdef DEBUG_I00AFUNC # include # endif # ifndef CRAY_STACK # define CRAY_STACK # ifndef CRAY2 /* Stack structures for CRAY-1, CRAY X-MP, and CRAY Y-MP */ struct stack_control_header { long shgrow:32; /* Number of times stack has grown. */ long shaseg:32; /* Size of increments to stack. */ long shhwm:32; /* High water mark of stack. */ long shsize:32; /* Current size of stack (all segments). */ }; /* The stack segment linkage control information occurs at the high-address end of a stack segment. (The stack grows from low addresses to high addresses.) The initial part of the stack segment linkage control information is 0200 (octal) words. This provides for register storage for the routine which overflows the stack. */ struct stack_segment_linkage { long ss[0200]; /* 0200 overflow words. */ long sssize:32; /* Number of words in this segment. */ long ssbase:32; /* Offset to stack base. */ long:32; long sspseg:32; /* Offset to linkage control of previous segment of stack. */ long:32; long sstcpt:32; /* Pointer to task common address block. */ long sscsnm; /* Private control structure number for microtasking. */ long ssusr1; /* Reserved for user. */ long ssusr2; /* Reserved for user. */ long sstpid; /* Process ID for pid based multi-tasking. */ long ssgvup; /* Pointer to multitasking thread giveup. */ long sscray[7]; /* Reserved for Cray Research. */ long ssa0; long ssa1; long ssa2; long ssa3; long ssa4; long ssa5; long ssa6; long ssa7; long sss0; long sss1; long sss2; long sss3; long sss4; long sss5; long sss6; long sss7; }; # else /* CRAY2 */ /* The following structure defines the vector of words returned by the STKSTAT library routine. */ struct stk_stat { long now; /* Current total stack size. */ long maxc; /* Amount of contiguous space which would be required to satisfy the maximum stack demand to date. */ long high_water; /* Stack high-water mark. */ long overflows; /* Number of stack overflow ($STKOFEN) calls. */ long hits; /* Number of internal buffer hits. */ long extends; /* Number of block extensions. */ long stko_mallocs; /* Block allocations by $STKOFEN. */ long underflows; /* Number of stack underflow calls ($STKRETN). */ long stko_free; /* Number of deallocations by $STKRETN. */ long stkm_free; /* Number of deallocations by $STKMRET. */ long segments; /* Current number of stack segments. */ long maxs; /* Maximum number of stack segments so far. */ long pad_size; /* Stack pad size. */ long current_address; /* Current stack segment address. */ long current_size; /* Current stack segment size. This number is actually corrupted by STKSTAT to include the fifteen word trailer area. */ long initial_address; /* Address of initial segment. */ long initial_size; /* Size of initial segment. */ }; /* The following structure describes the data structure which trails any stack segment. I think that the description in 'asdef' is out of date. I only describe the parts that I am sure about. */ struct stk_trailer { long this_address; /* Address of this block. */ long this_size; /* Size of this block (does not include this trailer). */ long unknown2; long unknown3; long link; /* Address of trailer block of previous segment. */ long unknown5; long unknown6; long unknown7; long unknown8; long unknown9; long unknown10; long unknown11; long unknown12; long unknown13; long unknown14; }; # endif /* CRAY2 */ # endif /* not CRAY_STACK */ # ifdef CRAY2 /* Determine a "stack measure" for an arbitrary ADDRESS. I doubt that "lint" will like this much. */ static long i00afunc (long *address) { struct stk_stat status; struct stk_trailer *trailer; long *block, size; long result = 0; /* We want to iterate through all of the segments. The first step is to get the stack status structure. We could do this more quickly and more directly, perhaps, by referencing the $LM00 common block, but I know that this works. */ STKSTAT (&status); /* Set up the iteration. */ trailer = (struct stk_trailer *) (status.current_address + status.current_size - 15); /* There must be at least one stack segment. Therefore it is a fatal error if "trailer" is null. */ if (trailer == 0) abort (); /* Discard segments that do not contain our argument address. */ while (trailer != 0) { block = (long *) trailer->this_address; size = trailer->this_size; if (block == 0 || size == 0) abort (); trailer = (struct stk_trailer *) trailer->link; if ((block <= address) && (address < (block + size))) break; } /* Set the result to the offset in this segment and add the sizes of all predecessor segments. */ result = address - block; if (trailer == 0) { return result; } do { if (trailer->this_size <= 0) abort (); result += trailer->this_size; trailer = (struct stk_trailer *) trailer->link; } while (trailer != 0); /* We are done. Note that if you present a bogus address (one not in any segment), you will get a different number back, formed from subtracting the address of the first block. This is probably not what you want. */ return (result); } # else /* not CRAY2 */ /* Stack address function for a CRAY-1, CRAY X-MP, or CRAY Y-MP. Determine the number of the cell within the stack, given the address of the cell. The purpose of this routine is to linearize, in some sense, stack addresses for alloca. */ static long i00afunc (long address) { long stkl = 0; long size, pseg, this_segment, stack; long result = 0; struct stack_segment_linkage *ssptr; /* Register B67 contains the address of the end of the current stack segment. If you (as a subprogram) store your registers on the stack and find that you are past the contents of B67, you have overflowed the segment. B67 also points to the stack segment linkage control area, which is what we are really interested in. */ stkl = CRAY_STACKSEG_END (); ssptr = (struct stack_segment_linkage *) stkl; /* If one subtracts 'size' from the end of the segment, one has the address of the first word of the segment. If this is not the first segment, 'pseg' will be nonzero. */ pseg = ssptr->sspseg; size = ssptr->sssize; this_segment = stkl - size; /* It is possible that calling this routine itself caused a stack overflow. Discard stack segments which do not contain the target address. */ while (!(this_segment <= address && address <= stkl)) { # ifdef DEBUG_I00AFUNC fprintf (stderr, "%011o %011o %011o\n", this_segment, address, stkl); # endif if (pseg == 0) break; stkl = stkl - pseg; ssptr = (struct stack_segment_linkage *) stkl; size = ssptr->sssize; pseg = ssptr->sspseg; this_segment = stkl - size; } result = address - this_segment; /* If you subtract pseg from the current end of the stack, you get the address of the previous stack segment's end. This seems a little convoluted to me, but I'll bet you save a cycle somewhere. */ while (pseg != 0) { # ifdef DEBUG_I00AFUNC fprintf (stderr, "%011o %011o\n", pseg, size); # endif stkl = stkl - pseg; ssptr = (struct stack_segment_linkage *) stkl; size = ssptr->sssize; pseg = ssptr->sspseg; result += size; } return (result); } # endif /* not CRAY2 */ # endif /* CRAY */ # endif /* no alloca */ #endif /* not GCC version 3 */ gnuit-4.9.5/lib/quote.h0000644000175000017500000000152311146671375011670 00000000000000/* quote.h - prototypes for quote.c Copyright (C) 1998, 1999, 2000, 2001, 2003 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 3 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, see . */ char const *quote_n (int n, char const *name); char const *quote (char const *name); gnuit-4.9.5/lib/strtoimax.c0000644000175000017500000000401711146671375012561 00000000000000/* Convert string representation of a number into an intmax_t value. Copyright (C) 1999, 2001, 2002, 2003, 2004, 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 3 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, see . */ /* Written by Paul Eggert. */ #include /* Verify interface. */ #include #include #include "verify.h" #ifdef UNSIGNED # ifndef HAVE_DECL_STRTOULL "this configure-time declaration test was not run" # endif # if !HAVE_DECL_STRTOULL && HAVE_UNSIGNED_LONG_LONG_INT unsigned long long int strtoull (char const *, char **, int); # endif #else # ifndef HAVE_DECL_STRTOLL "this configure-time declaration test was not run" # endif # if !HAVE_DECL_STRTOLL && HAVE_LONG_LONG_INT long long int strtoll (char const *, char **, int); # endif #endif #ifdef UNSIGNED # define Have_long_long HAVE_UNSIGNED_LONG_LONG_INT # define Int uintmax_t # define Unsigned unsigned # define strtoimax strtoumax # define strtol strtoul # define strtoll strtoull #else # define Have_long_long HAVE_LONG_LONG_INT # define Int intmax_t # define Unsigned #endif Int strtoimax (char const *ptr, char **endptr, int base) { #if Have_long_long verify (sizeof (Int) == sizeof (Unsigned long int) || sizeof (Int) == sizeof (Unsigned long long int)); if (sizeof (Int) != sizeof (Unsigned long int)) return strtoll (ptr, endptr, base); #else verify (sizeof (Int) == sizeof (Unsigned long int)); #endif return strtol (ptr, endptr, base); } gnuit-4.9.5/lib/Makefile.in0000644000175000017500000021175611146671375012442 00000000000000# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 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@ # Copyright (C) 2002-2009 Free Software Foundation, Inc. # # This file is free software, distributed under the terms of the GNU # General Public License. As a special exception to the GNU General # Public License, this file may be distributed as part of a program # that contains a configuration script generated by Autoconf, under # the same distribution terms as the rest of that program. # # Generated by gnulib-tool. # Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=. --no-libtool --macro-prefix=gl fnmatch fnmatch-gnu fsusage getopt human idcache mbsstr memmove mkstemp nanosleep putenv readlink rename strcase strcasestr utime xalloc srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. 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 = : build_triplet = @build@ host_triplet = @host@ subdir = lib DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in alloca.c ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \ $(top_srcdir)/m4/alloca.m4 $(top_srcdir)/m4/argmatch.m4 \ $(top_srcdir)/m4/clock_time.m4 $(top_srcdir)/m4/codeset.m4 \ $(top_srcdir)/m4/dirname.m4 $(top_srcdir)/m4/dos.m4 \ $(top_srcdir)/m4/double-slash-root.m4 \ $(top_srcdir)/m4/eealloc.m4 $(top_srcdir)/m4/errno_h.m4 \ $(top_srcdir)/m4/error.m4 $(top_srcdir)/m4/exitfail.m4 \ $(top_srcdir)/m4/extensions.m4 $(top_srcdir)/m4/fcntl_h.m4 \ $(top_srcdir)/m4/flexmember.m4 $(top_srcdir)/m4/fnmatch.m4 \ $(top_srcdir)/m4/fsusage.m4 $(top_srcdir)/m4/getopt.m4 \ $(top_srcdir)/m4/gettime.m4 $(top_srcdir)/m4/gettimeofday.m4 \ $(top_srcdir)/m4/glibc21.m4 $(top_srcdir)/m4/gnulib-common.m4 \ $(top_srcdir)/m4/gnulib-comp.m4 $(top_srcdir)/m4/human.m4 \ $(top_srcdir)/m4/idcache.m4 $(top_srcdir)/m4/include_next.m4 \ $(top_srcdir)/m4/inline.m4 $(top_srcdir)/m4/inttypes-pri.m4 \ $(top_srcdir)/m4/inttypes.m4 $(top_srcdir)/m4/localcharset.m4 \ $(top_srcdir)/m4/locale-fr.m4 $(top_srcdir)/m4/locale-ja.m4 \ $(top_srcdir)/m4/locale-zh.m4 $(top_srcdir)/m4/longlong.m4 \ $(top_srcdir)/m4/lstat.m4 $(top_srcdir)/m4/malloc.m4 \ $(top_srcdir)/m4/malloca.m4 $(top_srcdir)/m4/mbchar.m4 \ $(top_srcdir)/m4/mbiter.m4 $(top_srcdir)/m4/mbrtowc.m4 \ $(top_srcdir)/m4/mbsinit.m4 $(top_srcdir)/m4/mbslen.m4 \ $(top_srcdir)/m4/mbsstr.m4 $(top_srcdir)/m4/mbstate_t.m4 \ $(top_srcdir)/m4/memmove.m4 $(top_srcdir)/m4/mkstemp.m4 \ $(top_srcdir)/m4/multiarch.m4 $(top_srcdir)/m4/nanosleep.m4 \ $(top_srcdir)/m4/onceonly.m4 $(top_srcdir)/m4/open.m4 \ $(top_srcdir)/m4/putenv.m4 $(top_srcdir)/m4/quote.m4 \ $(top_srcdir)/m4/quotearg.m4 $(top_srcdir)/m4/readlink.m4 \ $(top_srcdir)/m4/rename.m4 $(top_srcdir)/m4/safe-read.m4 \ $(top_srcdir)/m4/safe-write.m4 $(top_srcdir)/m4/sigaction.m4 \ $(top_srcdir)/m4/signal_h.m4 \ $(top_srcdir)/m4/signalblocking.m4 $(top_srcdir)/m4/ssize_t.m4 \ $(top_srcdir)/m4/stdbool.m4 $(top_srcdir)/m4/stdint.m4 \ $(top_srcdir)/m4/stdlib_h.m4 $(top_srcdir)/m4/strcase.m4 \ $(top_srcdir)/m4/strcasestr.m4 $(top_srcdir)/m4/strerror.m4 \ $(top_srcdir)/m4/string_h.m4 $(top_srcdir)/m4/strings_h.m4 \ $(top_srcdir)/m4/strndup.m4 $(top_srcdir)/m4/strnlen.m4 \ $(top_srcdir)/m4/strtoimax.m4 $(top_srcdir)/m4/strtol.m4 \ $(top_srcdir)/m4/strtoll.m4 $(top_srcdir)/m4/strtoul.m4 \ $(top_srcdir)/m4/strtoull.m4 $(top_srcdir)/m4/strtoumax.m4 \ $(top_srcdir)/m4/sys_select_h.m4 \ $(top_srcdir)/m4/sys_socket_h.m4 \ $(top_srcdir)/m4/sys_stat_h.m4 $(top_srcdir)/m4/sys_time_h.m4 \ $(top_srcdir)/m4/tempname.m4 $(top_srcdir)/m4/time_h.m4 \ $(top_srcdir)/m4/timespec.m4 $(top_srcdir)/m4/unistd_h.m4 \ $(top_srcdir)/m4/utimbuf.m4 $(top_srcdir)/m4/utime.m4 \ $(top_srcdir)/m4/utimes-null.m4 $(top_srcdir)/m4/wchar.m4 \ $(top_srcdir)/m4/wchar_t.m4 $(top_srcdir)/m4/wctype.m4 \ $(top_srcdir)/m4/wcwidth.m4 $(top_srcdir)/m4/wint_t.m4 \ $(top_srcdir)/m4/write.m4 $(top_srcdir)/m4/xalloc.m4 \ $(top_srcdir)/m4/xstrndup.m4 $(top_srcdir)/m4/xstrtol.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = LIBRARIES = $(noinst_LIBRARIES) AR = ar ARFLAGS = cru libgnu_a_AR = $(AR) $(ARFLAGS) am__DEPENDENCIES_1 = am__dirstamp = $(am__leading_dot)dirstamp am_libgnu_a_OBJECTS = full-read.$(OBJEXT) full-write.$(OBJEXT) \ localcharset.$(OBJEXT) malloca.$(OBJEXT) mbchar.$(OBJEXT) \ mbslen.$(OBJEXT) mbsstr.$(OBJEXT) strnlen1.$(OBJEXT) \ uniwidth/width.$(OBJEXT) xalloc-die.$(OBJEXT) \ xstrndup.$(OBJEXT) xstrtoumax.$(OBJEXT) libgnu_a_OBJECTS = $(am_libgnu_a_OBJECTS) LTLIBRARIES = $(noinst_LTLIBRARIES) DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) 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 = $(libgnu_a_SOURCES) $(EXTRA_libgnu_a_SOURCES) DIST_SOURCES = $(libgnu_a_SOURCES) $(EXTRA_libgnu_a_SOURCES) RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-exec-recursive install-info-recursive \ install-recursive installcheck-recursive installdirs-recursive \ pdf-recursive ps-recursive uninstall-info-recursive \ uninstall-recursive HEADERS = $(noinst_HEADERS) ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) INSTALL = @INSTALL@ ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ ALLOCA_H = @ALLOCA_H@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BITSIZEOF_PTRDIFF_T = @BITSIZEOF_PTRDIFF_T@ BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@ BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@ BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@ BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CLEANFILES = configmake.h configmake.h-t charset.alias ref-add.sed \ ref-del.sed CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEBIAN_FALSE = @DEBIAN_FALSE@ DEBIAN_TRUE = @DEBIAN_TRUE@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EMULTIHOP_HIDDEN = @EMULTIHOP_HIDDEN@ EMULTIHOP_VALUE = @EMULTIHOP_VALUE@ ENOLINK_HIDDEN = @ENOLINK_HIDDEN@ ENOLINK_VALUE = @ENOLINK_VALUE@ EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@ EOVERFLOW_VALUE = @EOVERFLOW_VALUE@ ERRNO_H = @ERRNO_H@ EXEEXT = @EXEEXT@ FCNTL_H = @FCNTL_H@ FNMATCH_H = @FNMATCH_H@ GETOPT_H = @GETOPT_H@ GLIBC21 = @GLIBC21@ GL_COND_LIBTOOL_FALSE = @GL_COND_LIBTOOL_FALSE@ GL_COND_LIBTOOL_TRUE = @GL_COND_LIBTOOL_TRUE@ GNULIB_ACCEPT = @GNULIB_ACCEPT@ GNULIB_ATOLL = @GNULIB_ATOLL@ GNULIB_BIND = @GNULIB_BIND@ GNULIB_BTOWC = @GNULIB_BTOWC@ GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@ GNULIB_CHOWN = @GNULIB_CHOWN@ GNULIB_CLOSE = @GNULIB_CLOSE@ GNULIB_CONNECT = @GNULIB_CONNECT@ GNULIB_DUP2 = @GNULIB_DUP2@ GNULIB_ENVIRON = @GNULIB_ENVIRON@ GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@ GNULIB_FCHDIR = @GNULIB_FCHDIR@ GNULIB_FSYNC = @GNULIB_FSYNC@ GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@ GNULIB_GETCWD = @GNULIB_GETCWD@ GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@ GNULIB_GETDTABLESIZE = @GNULIB_GETDTABLESIZE@ GNULIB_GETHOSTNAME = @GNULIB_GETHOSTNAME@ GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@ GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@ GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@ GNULIB_GETPEERNAME = @GNULIB_GETPEERNAME@ GNULIB_GETSOCKNAME = @GNULIB_GETSOCKNAME@ GNULIB_GETSOCKOPT = @GNULIB_GETSOCKOPT@ GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@ GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@ GNULIB_IMAXABS = @GNULIB_IMAXABS@ GNULIB_IMAXDIV = @GNULIB_IMAXDIV@ GNULIB_LCHMOD = @GNULIB_LCHMOD@ GNULIB_LCHOWN = @GNULIB_LCHOWN@ GNULIB_LINK = @GNULIB_LINK@ GNULIB_LISTEN = @GNULIB_LISTEN@ GNULIB_LSEEK = @GNULIB_LSEEK@ GNULIB_LSTAT = @GNULIB_LSTAT@ GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@ GNULIB_MBRLEN = @GNULIB_MBRLEN@ GNULIB_MBRTOWC = @GNULIB_MBRTOWC@ GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@ GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@ GNULIB_MBSCHR = @GNULIB_MBSCHR@ GNULIB_MBSCSPN = @GNULIB_MBSCSPN@ GNULIB_MBSINIT = @GNULIB_MBSINIT@ GNULIB_MBSLEN = @GNULIB_MBSLEN@ GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@ GNULIB_MBSNLEN = @GNULIB_MBSNLEN@ GNULIB_MBSNRTOWCS = @GNULIB_MBSNRTOWCS@ GNULIB_MBSPBRK = @GNULIB_MBSPBRK@ GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@ GNULIB_MBSRCHR = @GNULIB_MBSRCHR@ GNULIB_MBSRTOWCS = @GNULIB_MBSRTOWCS@ GNULIB_MBSSEP = @GNULIB_MBSSEP@ GNULIB_MBSSPN = @GNULIB_MBSSPN@ GNULIB_MBSSTR = @GNULIB_MBSSTR@ GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@ GNULIB_MEMMEM = @GNULIB_MEMMEM@ GNULIB_MEMPCPY = @GNULIB_MEMPCPY@ GNULIB_MEMRCHR = @GNULIB_MEMRCHR@ GNULIB_MKDTEMP = @GNULIB_MKDTEMP@ GNULIB_MKSTEMP = @GNULIB_MKSTEMP@ GNULIB_OPEN = @GNULIB_OPEN@ GNULIB_PUTENV = @GNULIB_PUTENV@ GNULIB_RANDOM_R = @GNULIB_RANDOM_R@ GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@ GNULIB_READLINK = @GNULIB_READLINK@ GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@ GNULIB_RECV = @GNULIB_RECV@ GNULIB_RECVFROM = @GNULIB_RECVFROM@ GNULIB_RPMATCH = @GNULIB_RPMATCH@ GNULIB_SELECT = @GNULIB_SELECT@ GNULIB_SEND = @GNULIB_SEND@ GNULIB_SENDTO = @GNULIB_SENDTO@ GNULIB_SETENV = @GNULIB_SETENV@ GNULIB_SETSOCKOPT = @GNULIB_SETSOCKOPT@ GNULIB_SHUTDOWN = @GNULIB_SHUTDOWN@ GNULIB_SIGACTION = @GNULIB_SIGACTION@ GNULIB_SIGNAL_H_SIGPIPE = @GNULIB_SIGNAL_H_SIGPIPE@ GNULIB_SIGPROCMASK = @GNULIB_SIGPROCMASK@ GNULIB_SLEEP = @GNULIB_SLEEP@ GNULIB_SOCKET = @GNULIB_SOCKET@ GNULIB_STPCPY = @GNULIB_STPCPY@ GNULIB_STPNCPY = @GNULIB_STPNCPY@ GNULIB_STRCASESTR = @GNULIB_STRCASESTR@ GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@ GNULIB_STRDUP = @GNULIB_STRDUP@ GNULIB_STRERROR = @GNULIB_STRERROR@ GNULIB_STRNDUP = @GNULIB_STRNDUP@ GNULIB_STRNLEN = @GNULIB_STRNLEN@ GNULIB_STRPBRK = @GNULIB_STRPBRK@ GNULIB_STRSEP = @GNULIB_STRSEP@ GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@ GNULIB_STRSTR = @GNULIB_STRSTR@ GNULIB_STRTOD = @GNULIB_STRTOD@ GNULIB_STRTOIMAX = @GNULIB_STRTOIMAX@ GNULIB_STRTOK_R = @GNULIB_STRTOK_R@ GNULIB_STRTOLL = @GNULIB_STRTOLL@ GNULIB_STRTOULL = @GNULIB_STRTOULL@ GNULIB_STRTOUMAX = @GNULIB_STRTOUMAX@ GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@ GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@ GNULIB_UNSETENV = @GNULIB_UNSETENV@ GNULIB_WCRTOMB = @GNULIB_WCRTOMB@ GNULIB_WCSNRTOMBS = @GNULIB_WCSNRTOMBS@ GNULIB_WCSRTOMBS = @GNULIB_WCSRTOMBS@ GNULIB_WCTOB = @GNULIB_WCTOB@ GNULIB_WCWIDTH = @GNULIB_WCWIDTH@ GNULIB_WRITE = @GNULIB_WRITE@ GREP = @GREP@ HAVE_ATOLL = @HAVE_ATOLL@ HAVE_BTOWC = @HAVE_BTOWC@ HAVE_CALLOC_POSIX = @HAVE_CALLOC_POSIX@ HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@ HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@ HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@ HAVE_DECL_IMAXABS = @HAVE_DECL_IMAXABS@ HAVE_DECL_IMAXDIV = @HAVE_DECL_IMAXDIV@ HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@ HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@ HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@ HAVE_DECL_STRERROR = @HAVE_DECL_STRERROR@ HAVE_DECL_STRNCASECMP = @HAVE_DECL_STRNCASECMP@ HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@ HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@ HAVE_DECL_STRSIGNAL = @HAVE_DECL_STRSIGNAL@ HAVE_DECL_STRTOIMAX = @HAVE_DECL_STRTOIMAX@ HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@ HAVE_DECL_STRTOUMAX = @HAVE_DECL_STRTOUMAX@ HAVE_DECL_WCTOB = @HAVE_DECL_WCTOB@ HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@ HAVE_DUP2 = @HAVE_DUP2@ HAVE_EUIDACCESS = @HAVE_EUIDACCESS@ HAVE_FSYNC = @HAVE_FSYNC@ HAVE_FTRUNCATE = @HAVE_FTRUNCATE@ HAVE_GETDOMAINNAME = @HAVE_GETDOMAINNAME@ HAVE_GETDTABLESIZE = @HAVE_GETDTABLESIZE@ HAVE_GETHOSTNAME = @HAVE_GETHOSTNAME@ HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@ HAVE_GETSUBOPT = @HAVE_GETSUBOPT@ HAVE_GETUSERSHELL = @HAVE_GETUSERSHELL@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_ISWCNTRL = @HAVE_ISWCNTRL@ HAVE_LCHMOD = @HAVE_LCHMOD@ HAVE_LINK = @HAVE_LINK@ HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@ HAVE_LSTAT = @HAVE_LSTAT@ HAVE_MALLOC_POSIX = @HAVE_MALLOC_POSIX@ HAVE_MBRLEN = @HAVE_MBRLEN@ HAVE_MBRTOWC = @HAVE_MBRTOWC@ HAVE_MBSINIT = @HAVE_MBSINIT@ HAVE_MBSNRTOWCS = @HAVE_MBSNRTOWCS@ HAVE_MBSRTOWCS = @HAVE_MBSRTOWCS@ HAVE_MEMPCPY = @HAVE_MEMPCPY@ HAVE_MKDTEMP = @HAVE_MKDTEMP@ HAVE_OS_H = @HAVE_OS_H@ HAVE_POSIX_SIGNALBLOCKING = @HAVE_POSIX_SIGNALBLOCKING@ HAVE_RANDOM_H = @HAVE_RANDOM_H@ HAVE_RANDOM_R = @HAVE_RANDOM_R@ HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@ HAVE_READLINK = @HAVE_READLINK@ HAVE_REALLOC_POSIX = @HAVE_REALLOC_POSIX@ HAVE_RPMATCH = @HAVE_RPMATCH@ HAVE_SETENV = @HAVE_SETENV@ HAVE_SIGACTION = @HAVE_SIGACTION@ HAVE_SIGINFO_T = @HAVE_SIGINFO_T@ HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@ HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@ HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@ HAVE_SIGSET_T = @HAVE_SIGSET_T@ HAVE_SLEEP = @HAVE_SLEEP@ HAVE_STDINT_H = @HAVE_STDINT_H@ HAVE_STPCPY = @HAVE_STPCPY@ HAVE_STPNCPY = @HAVE_STPNCPY@ HAVE_STRCASECMP = @HAVE_STRCASECMP@ HAVE_STRCASESTR = @HAVE_STRCASESTR@ HAVE_STRCHRNUL = @HAVE_STRCHRNUL@ HAVE_STRNDUP = @HAVE_STRNDUP@ HAVE_STRPBRK = @HAVE_STRPBRK@ HAVE_STRSEP = @HAVE_STRSEP@ HAVE_STRTOD = @HAVE_STRTOD@ HAVE_STRTOLL = @HAVE_STRTOLL@ HAVE_STRTOULL = @HAVE_STRTOULL@ HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@ HAVE_STRUCT_SIGACTION_SA_SIGACTION = @HAVE_STRUCT_SIGACTION_SA_SIGACTION@ HAVE_STRUCT_TIMEVAL = @HAVE_STRUCT_TIMEVAL@ HAVE_STRVERSCMP = @HAVE_STRVERSCMP@ HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@ HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@ HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@ HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@ HAVE_SYS_SELECT_H = @HAVE_SYS_SELECT_H@ HAVE_SYS_SOCKET_H = @HAVE_SYS_SOCKET_H@ HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ HAVE_UNISTD_H = @HAVE_UNISTD_H@ HAVE_UNSETENV = @HAVE_UNSETENV@ HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@ HAVE_WCHAR_H = @HAVE_WCHAR_H@ HAVE_WCRTOMB = @HAVE_WCRTOMB@ HAVE_WCSNRTOMBS = @HAVE_WCSNRTOMBS@ HAVE_WCSRTOMBS = @HAVE_WCSRTOMBS@ HAVE_WCTYPE_H = @HAVE_WCTYPE_H@ HAVE_WINSOCK2_H = @HAVE_WINSOCK2_H@ HAVE_WINT_T = @HAVE_WINT_T@ HAVE_WS2TCPIP_H = @HAVE_WS2TCPIP_H@ HAVE__BOOL = @HAVE__BOOL@ HOST = @HOST@ HTMLDOCS_MAKEINFO_FALSE = @HTMLDOCS_MAKEINFO_FALSE@ HTMLDOCS_MAKEINFO_TRUE = @HTMLDOCS_MAKEINFO_TRUE@ HTMLDOCS_TEXI2HTML_FALSE = @HTMLDOCS_TEXI2HTML_FALSE@ HTMLDOCS_TEXI2HTML_TRUE = @HTMLDOCS_TEXI2HTML_TRUE@ INCLUDES = @INCLUDES@ INCLUDE_NEXT = @INCLUDE_NEXT@ INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INT32_MAX_LT_INTMAX_MAX = @INT32_MAX_LT_INTMAX_MAX@ INT64_MAX_EQ_LONG_MAX = @INT64_MAX_EQ_LONG_MAX@ INTTYPES_H = @INTTYPES_H@ LDFLAGS = @LDFLAGS@ LIBGNU_LIBDEPS = @LIBGNU_LIBDEPS@ LIBGNU_LTLIBDEPS = @LIBGNU_LTLIBDEPS@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@ LIB_NANOSLEEP = @LIB_NANOSLEEP@ LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@ LOCALE_FR_UTF8 = @LOCALE_FR_UTF8@ LOCALE_JA = @LOCALE_JA@ LOCALE_ZH_CN = @LOCALE_ZH_CN@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAKE = @MAKE@ MAKEINFO = @MAKEINFO@ NEXT_ERRNO_H = @NEXT_ERRNO_H@ NEXT_FCNTL_H = @NEXT_FCNTL_H@ NEXT_INTTYPES_H = @NEXT_INTTYPES_H@ NEXT_SIGNAL_H = @NEXT_SIGNAL_H@ NEXT_STDINT_H = @NEXT_STDINT_H@ NEXT_STDLIB_H = @NEXT_STDLIB_H@ NEXT_STRINGS_H = @NEXT_STRINGS_H@ NEXT_STRING_H = @NEXT_STRING_H@ NEXT_SYS_SELECT_H = @NEXT_SYS_SELECT_H@ NEXT_SYS_SOCKET_H = @NEXT_SYS_SOCKET_H@ NEXT_SYS_STAT_H = @NEXT_SYS_STAT_H@ NEXT_SYS_TIME_H = @NEXT_SYS_TIME_H@ NEXT_TIME_H = @NEXT_TIME_H@ NEXT_UNISTD_H = @NEXT_UNISTD_H@ NEXT_WCHAR_H = @NEXT_WCHAR_H@ NEXT_WCTYPE_H = @NEXT_WCTYPE_H@ 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@ PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@ PRIPTR_PREFIX = @PRIPTR_PREFIX@ PRI_MACROS_BROKEN = @PRI_MACROS_BROKEN@ PRODUCT = @PRODUCT@ PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@ RANLIB = @RANLIB@ REPLACE_BTOWC = @REPLACE_BTOWC@ REPLACE_CHOWN = @REPLACE_CHOWN@ REPLACE_CLOSE = @REPLACE_CLOSE@ REPLACE_FCHDIR = @REPLACE_FCHDIR@ REPLACE_GETCWD = @REPLACE_GETCWD@ REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@ REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@ REPLACE_ISWCNTRL = @REPLACE_ISWCNTRL@ REPLACE_LCHOWN = @REPLACE_LCHOWN@ REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@ REPLACE_LSEEK = @REPLACE_LSEEK@ REPLACE_LSTAT = @REPLACE_LSTAT@ REPLACE_MBRLEN = @REPLACE_MBRLEN@ REPLACE_MBRTOWC = @REPLACE_MBRTOWC@ REPLACE_MBSINIT = @REPLACE_MBSINIT@ REPLACE_MBSNRTOWCS = @REPLACE_MBSNRTOWCS@ REPLACE_MBSRTOWCS = @REPLACE_MBSRTOWCS@ REPLACE_MBSTATE_T = @REPLACE_MBSTATE_T@ REPLACE_MEMMEM = @REPLACE_MEMMEM@ REPLACE_MKDIR = @REPLACE_MKDIR@ REPLACE_MKSTEMP = @REPLACE_MKSTEMP@ REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@ REPLACE_OPEN = @REPLACE_OPEN@ REPLACE_PUTENV = @REPLACE_PUTENV@ REPLACE_STRCASESTR = @REPLACE_STRCASESTR@ REPLACE_STRDUP = @REPLACE_STRDUP@ REPLACE_STRERROR = @REPLACE_STRERROR@ REPLACE_STRPTIME = @REPLACE_STRPTIME@ REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@ REPLACE_STRSTR = @REPLACE_STRSTR@ REPLACE_STRTOD = @REPLACE_STRTOD@ REPLACE_TIMEGM = @REPLACE_TIMEGM@ REPLACE_WCRTOMB = @REPLACE_WCRTOMB@ REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@ REPLACE_WCTOB = @REPLACE_WCTOB@ REPLACE_WCWIDTH = @REPLACE_WCWIDTH@ REPLACE_WRITE = @REPLACE_WRITE@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@ SIZE_T_SUFFIX = @SIZE_T_SUFFIX@ STDBOOL_H = @STDBOOL_H@ STDINT_H = @STDINT_H@ STRIP = @STRIP@ SYS_SELECT_H = @SYS_SELECT_H@ SYS_SOCKET_H = @SYS_SOCKET_H@ SYS_STAT_H = @SYS_STAT_H@ SYS_TIME_H = @SYS_TIME_H@ SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ TEXI2DVI = @TEXI2DVI@ TEXI2HTML = @TEXI2HTML@ TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@ TRANSITION_FALSE = @TRANSITION_FALSE@ TRANSITION_TRUE = @TRANSITION_TRUE@ UINT32_MAX_LT_UINTMAX_MAX = @UINT32_MAX_LT_UINTMAX_MAX@ UINT64_MAX_EQ_ULONG_MAX = @UINT64_MAX_EQ_ULONG_MAX@ UNISTD_H_HAVE_WINSOCK2_H = @UNISTD_H_HAVE_WINSOCK2_H@ VERSION = @VERSION@ VOID_UNSETENV = @VOID_UNSETENV@ WCHAR_H = @WCHAR_H@ WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@ WCTYPE_H = @WCTYPE_H@ WINT_T_SUFFIX = @WINT_T_SUFFIX@ ac_ct_CC = @ac_ct_CC@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ 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 = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ gl_LIBOBJS = @gl_LIBOBJS@ gl_LTLIBOBJS = @gl_LTLIBOBJS@ gltests_LIBOBJS = @gltests_LIBOBJS@ gltests_LTLIBOBJS = @gltests_LTLIBOBJS@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ 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@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ AUTOMAKE_OPTIONS = 1.5 gnits subdir-objects SUBDIRS = noinst_HEADERS = noinst_LIBRARIES = libgnu.a noinst_LTLIBRARIES = EXTRA_DIST = alloca.c alloca.in.h argmatch.c argmatch.h basename.c \ dirname.c dirname.h stripslash.c errno.in.h error.c error.h \ exitfail.c exitfail.h fcntl.in.h fnmatch.c fnmatch.in.h \ fnmatch_loop.c fsusage.c fsusage.h getopt.c getopt.in.h \ getopt1.c getopt_int.h gettime.c gettimeofday.c human.c \ human.h idcache.c idcache.h intprops.h inttypes.in.h \ $(top_srcdir)/./link-warning.h config.charset ref-add.sin \ ref-del.sin lstat.c malloc.c malloca.h malloca.valgrind \ mbchar.h mbrtowc.c mbsinit.c str-kmp.h memmove.c mkstemp.c \ nanosleep.c open.c putenv.c quote.c quote.h quotearg.c \ quotearg.h readlink.c rename.c safe-read.c safe-read.h \ safe-write.c safe-write.h sig-handler.h sigaction.c \ signal.in.h sigprocmask.c stdbool.in.h stdint.in.h stdlib.in.h \ strcasecmp.c strncasecmp.c str-two-way.h strcasestr.c streq.h \ strerror.c string.in.h strings.in.h strndup.c strnlen.c \ strtoimax.c strtol.c strtoll.c strtoul.c strtoull.c \ strtoumax.c sys_select.in.h sys_socket.in.h sys_stat.in.h \ sys_time.in.h tempname.c tempname.h time.in.h timespec.h \ unistd.in.h unitypes.h localcharset.h uniwidth.h \ uniwidth/cjk.h utime.c wchar.in.h wctype.in.h wcwidth.c \ write.c xalloc.h xmalloc.c xstrtol-error.c xstrtol.c xstrtol.h \ xstrtoul.c BUILT_SOURCES = $(ALLOCA_H) configmake.h $(ERRNO_H) $(FCNTL_H) \ $(FNMATCH_H) $(GETOPT_H) $(INTTYPES_H) signal.h $(STDBOOL_H) \ $(STDINT_H) stdlib.h string.h strings.h $(SYS_SELECT_H) \ $(SYS_SOCKET_H) $(SYS_STAT_H) $(SYS_TIME_H) time.h unistd.h \ $(WCHAR_H) $(WCTYPE_H) SUFFIXES = .sed .sin MOSTLYCLEANFILES = core *.stackdump alloca.h alloca.h-t errno.h \ errno.h-t fcntl.h fcntl.h-t fnmatch.h fnmatch.h-t getopt.h \ getopt.h-t inttypes.h inttypes.h-t signal.h signal.h-t \ stdbool.h stdbool.h-t stdint.h stdint.h-t stdlib.h stdlib.h-t \ string.h string.h-t strings.h strings.h-t sys/select.h \ sys/select.h-t sys/socket.h sys/socket.h-t sys/stat.h \ sys/stat.h-t sys/time.h sys/time.h-t time.h time.h-t unistd.h \ unistd.h-t wchar.h wchar.h-t wctype.h wctype.h-t MOSTLYCLEANDIRS = sys sys sys DISTCLEANFILES = MAINTAINERCLEANFILES = AM_CPPFLAGS = libgnu_a_SOURCES = full-read.h full-read.c full-write.h full-write.c \ gettext.h localcharset.h localcharset.c malloca.c mbchar.c \ mbslen.c mbsstr.c mbuiter.h strnlen1.h strnlen1.c \ uniwidth/width.c verify.h xalloc-die.c xstrndup.h xstrndup.c \ xstrtoumax.c libgnu_a_LIBADD = $(gl_LIBOBJS) @ALLOCA@ libgnu_a_DEPENDENCIES = $(gl_LIBOBJS) @ALLOCA@ EXTRA_libgnu_a_SOURCES = alloca.c argmatch.c basename.c dirname.c \ stripslash.c error.c exitfail.c fnmatch.c fnmatch_loop.c \ fsusage.c getopt.c getopt1.c gettime.c gettimeofday.c human.c \ idcache.c lstat.c malloc.c mbrtowc.c mbsinit.c memmove.c \ mkstemp.c nanosleep.c open.c putenv.c quote.c quotearg.c \ readlink.c rename.c safe-read.c safe-write.c sigaction.c \ sigprocmask.c strcasecmp.c strncasecmp.c strcasestr.c \ strerror.c strndup.c strnlen.c strtoimax.c strtol.c strtoll.c \ strtoul.c strtoull.c strtoumax.c tempname.c utime.c wcwidth.c \ write.c xmalloc.c xstrtol-error.c xstrtol.c xstrtoul.c LINK_WARNING_H = $(top_srcdir)/./link-warning.h charset_alias = $(DESTDIR)$(libdir)/charset.alias charset_tmp = $(DESTDIR)$(libdir)/charset.tmp all: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: .SUFFIXES: .sed .sin .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) --gnits lib/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnits lib/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 clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) uniwidth/$(am__dirstamp): @$(mkdir_p) uniwidth @: > uniwidth/$(am__dirstamp) uniwidth/$(DEPDIR)/$(am__dirstamp): @$(mkdir_p) uniwidth/$(DEPDIR) @: > uniwidth/$(DEPDIR)/$(am__dirstamp) uniwidth/width.$(OBJEXT): uniwidth/$(am__dirstamp) \ uniwidth/$(DEPDIR)/$(am__dirstamp) libgnu.a: $(libgnu_a_OBJECTS) $(libgnu_a_DEPENDENCIES) -rm -f libgnu.a $(libgnu_a_AR) libgnu.a $(libgnu_a_OBJECTS) $(libgnu_a_LIBADD) $(RANLIB) libgnu.a clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done mostlyclean-compile: -rm -f *.$(OBJEXT) -rm -f uniwidth/width.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/alloca.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/alloca.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/argmatch.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/basename.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dirname.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/error.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exitfail.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fnmatch.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fnmatch_loop.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fsusage.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/full-read.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/full-write.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getopt.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getopt1.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gettime.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gettimeofday.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/human.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/idcache.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/localcharset.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lstat.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/malloc.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/malloca.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mbchar.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mbrtowc.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mbsinit.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mbslen.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mbsstr.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/memmove.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mkstemp.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nanosleep.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/open.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/putenv.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/quote.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/quotearg.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/readlink.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rename.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/safe-read.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/safe-write.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sigaction.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sigprocmask.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strcasecmp.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strcasestr.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strerror.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stripslash.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strncasecmp.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strndup.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strnlen.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strnlen1.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strtoimax.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strtol.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strtoll.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strtoul.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strtoull.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strtoumax.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tempname.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utime.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wcwidth.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/write.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xalloc-die.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xmalloc.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xstrndup.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xstrtol-error.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xstrtol.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xstrtoul.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xstrtoumax.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@uniwidth/$(DEPDIR)/width.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`; \ @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$$depbase.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$$depbase.Tpo" "$$depbase.Po"; else rm -f "$$depbase.Tpo"; exit 1; fi @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 -o $@ $< .c.obj: @am__fastdepCC_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`; \ @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$$depbase.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCC_TRUE@ then mv -f "$$depbase.Tpo" "$$depbase.Po"; else rm -f "$$depbase.Tpo"; exit 1; fi @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 -o $@ `$(CYGPATH_W) '$<'` uninstall-info-am: # 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" mostlyclean-recursive clean-recursive distclean-recursive \ maintainer-clean-recursive: @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) $(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) $(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) $(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) $(mkdir_p) $(distdir)/$(top_srcdir)/. $(distdir)/uniwidth @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ 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" \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) check-recursive all-am: Makefile $(LIBRARIES) $(LTLIBRARIES) $(HEADERS) all-local installdirs: installdirs-recursive installdirs-am: install: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) 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: -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES) clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -rm -f uniwidth/$(DEPDIR)/$(am__dirstamp) -rm -f uniwidth/$(am__dirstamp) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) 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 "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-recursive clean-am: clean-generic clean-noinstLIBRARIES clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-recursive -rm -rf $(DEPDIR) ./$(DEPDIR) uniwidth/$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive info: info-recursive info-am: install-data-am: install-exec-am: install-exec-local install-info: install-info-recursive install-man: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -rf $(DEPDIR) ./$(DEPDIR) uniwidth/$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-local pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-info-am uninstall-local uninstall-info: uninstall-info-recursive .PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am all-local check \ check-am clean clean-generic clean-noinstLIBRARIES \ clean-noinstLTLIBRARIES clean-recursive ctags ctags-recursive \ distclean distclean-compile distclean-generic \ distclean-recursive distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-exec install-exec-am \ install-exec-local install-info install-info-am install-man \ install-strip installcheck installcheck-am installdirs \ installdirs-am maintainer-clean maintainer-clean-generic \ maintainer-clean-recursive mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-local mostlyclean-recursive \ pdf pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \ uninstall-info-am uninstall-local # We need the following in order to create when the system # doesn't have one that works with the given compiler. alloca.h: alloca.in.h { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ cat $(srcdir)/alloca.in.h; \ } > $@-t mv -f $@-t $@ # Retrieve values of the variables through 'configure' followed by # 'make', not directly through 'configure', so that a user who # sets some of these variables consistently on the 'make' command # line gets correct results. # # One advantage of this approach, compared to the classical # approach of adding -DLIBDIR=\"$(libdir)\" etc. to AM_CPPFLAGS, # is that it protects against the use of undefined variables. # If, say, $(libdir) is not set in the Makefile, LIBDIR is not # defined by this module, and code using LIBDIR gives a # compilation error. # # Another advantage is that 'make' output is shorter. # # Listed in the same order as the GNU makefile conventions. # The Automake-defined pkg* macros are appended, in the order # listed in the Automake 1.10a+ documentation. configmake.h: Makefile rm -f $@-t $@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ echo '#define PREFIX "$(prefix)"'; \ echo '#define EXEC_PREFIX "$(exec_prefix)"'; \ echo '#define BINDIR "$(bindir)"'; \ echo '#define SBINDIR "$(sbindir)"'; \ echo '#define LIBEXECDIR "$(libexecdir)"'; \ echo '#define DATAROOTDIR "$(datarootdir)"'; \ echo '#define DATADIR "$(datadir)"'; \ echo '#define SYSCONFDIR "$(sysconfdir)"'; \ echo '#define SHAREDSTATEDIR "$(sharedstatedir)"'; \ echo '#define LOCALSTATEDIR "$(localstatedir)"'; \ echo '#define INCLUDEDIR "$(includedir)"'; \ echo '#define OLDINCLUDEDIR "$(oldincludedir)"'; \ echo '#define DOCDIR "$(docdir)"'; \ echo '#define INFODIR "$(infodir)"'; \ echo '#define HTMLDIR "$(htmldir)"'; \ echo '#define DVIDIR "$(dvidir)"'; \ echo '#define PDFDIR "$(pdfdir)"'; \ echo '#define PSDIR "$(psdir)"'; \ echo '#define LIBDIR "$(libdir)"'; \ echo '#define LISPDIR "$(lispdir)"'; \ echo '#define LOCALEDIR "$(localedir)"'; \ echo '#define MANDIR "$(mandir)"'; \ echo '#define MANEXT "$(manext)"'; \ echo '#define PKGDATADIR "$(pkgdatadir)"'; \ echo '#define PKGINCLUDEDIR "$(pkgincludedir)"'; \ echo '#define PKGLIBDIR "$(pkglibdir)"'; \ echo '#define PKGLIBEXECDIR "$(pkglibexecdir)"'; \ } | sed '/""/d' > $@-t mv $@-t $@ # We need the following in order to create when the system # doesn't have one that is POSIX compliant. errno.h: errno.in.h rm -f $@-t $@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''NEXT_ERRNO_H''@|$(NEXT_ERRNO_H)|g' \ -e 's|@''EMULTIHOP_HIDDEN''@|$(EMULTIHOP_HIDDEN)|g' \ -e 's|@''EMULTIHOP_VALUE''@|$(EMULTIHOP_VALUE)|g' \ -e 's|@''ENOLINK_HIDDEN''@|$(ENOLINK_HIDDEN)|g' \ -e 's|@''ENOLINK_VALUE''@|$(ENOLINK_VALUE)|g' \ -e 's|@''EOVERFLOW_HIDDEN''@|$(EOVERFLOW_HIDDEN)|g' \ -e 's|@''EOVERFLOW_VALUE''@|$(EOVERFLOW_VALUE)|g' \ < $(srcdir)/errno.in.h; \ } > $@-t mv $@-t $@ # We need the following in order to create when the system # doesn't have one that works with the given compiler. fcntl.h: fcntl.in.h rm -f $@-t $@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''NEXT_FCNTL_H''@|$(NEXT_FCNTL_H)|g' \ -e 's|@''GNULIB_OPEN''@|$(GNULIB_OPEN)|g' \ -e 's|@''REPLACE_OPEN''@|$(REPLACE_OPEN)|g' \ < $(srcdir)/fcntl.in.h; \ } > $@-t mv $@-t $@ # We need the following in order to create when the system # doesn't have one that supports the required API. fnmatch.h: fnmatch.in.h { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ cat $(srcdir)/fnmatch.in.h; \ } > $@-t mv -f $@-t $@ # We need the following in order to create when the system # doesn't have one that works with the given compiler. getopt.h: getopt.in.h { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ cat $(srcdir)/getopt.in.h; \ } > $@-t mv -f $@-t $@ # We need the following in order to create when the system # doesn't have one that works with the given compiler. inttypes.h: inttypes.in.h rm -f $@-t $@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's/@''HAVE_INTTYPES_H''@/$(HAVE_INTTYPES_H)/g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''NEXT_INTTYPES_H''@|$(NEXT_INTTYPES_H)|g' \ -e 's/@''PRI_MACROS_BROKEN''@/$(PRI_MACROS_BROKEN)/g' \ -e 's/@''APPLE_UNIVERSAL_BUILD''@/$(APPLE_UNIVERSAL_BUILD)/g' \ -e 's/@''HAVE_LONG_LONG_INT''@/$(HAVE_LONG_LONG_INT)/g' \ -e 's/@''HAVE_UNSIGNED_LONG_LONG_INT''@/$(HAVE_UNSIGNED_LONG_LONG_INT)/g' \ -e 's/@''PRIPTR_PREFIX''@/$(PRIPTR_PREFIX)/g' \ -e 's/@''GNULIB_IMAXABS''@/$(GNULIB_IMAXABS)/g' \ -e 's/@''GNULIB_IMAXDIV''@/$(GNULIB_IMAXDIV)/g' \ -e 's/@''GNULIB_STRTOIMAX''@/$(GNULIB_STRTOIMAX)/g' \ -e 's/@''GNULIB_STRTOUMAX''@/$(GNULIB_STRTOUMAX)/g' \ -e 's/@''HAVE_DECL_IMAXABS''@/$(HAVE_DECL_IMAXABS)/g' \ -e 's/@''HAVE_DECL_IMAXDIV''@/$(HAVE_DECL_IMAXDIV)/g' \ -e 's/@''HAVE_DECL_STRTOIMAX''@/$(HAVE_DECL_STRTOIMAX)/g' \ -e 's/@''HAVE_DECL_STRTOUMAX''@/$(HAVE_DECL_STRTOUMAX)/g' \ -e 's/@''INT32_MAX_LT_INTMAX_MAX''@/$(INT32_MAX_LT_INTMAX_MAX)/g' \ -e 's/@''INT64_MAX_EQ_LONG_MAX''@/$(INT64_MAX_EQ_LONG_MAX)/g' \ -e 's/@''UINT32_MAX_LT_UINTMAX_MAX''@/$(UINT32_MAX_LT_UINTMAX_MAX)/g' \ -e 's/@''UINT64_MAX_EQ_ULONG_MAX''@/$(UINT64_MAX_EQ_ULONG_MAX)/g' \ -e '/definition of GL_LINK_WARNING/r $(LINK_WARNING_H)' \ < $(srcdir)/inttypes.in.h; \ } > $@-t mv $@-t $@ # We need the following in order to install a simple file in $(libdir) # which is shared with other installed packages. We use a list of referencing # packages so that "make uninstall" will remove the file if and only if it # is not used by another installed package. # On systems with glibc-2.1 or newer, the file is redundant, therefore we # avoid installing it. all-local: charset.alias ref-add.sed ref-del.sed install-exec-local: all-local if test $(GLIBC21) = no; then \ case '$(host_os)' in \ darwin[56]*) \ need_charset_alias=true ;; \ darwin* | cygwin* | mingw* | pw32* | cegcc*) \ need_charset_alias=false ;; \ *) \ need_charset_alias=true ;; \ esac ; \ else \ need_charset_alias=false ; \ fi ; \ if $$need_charset_alias; then \ $(mkinstalldirs) $(DESTDIR)$(libdir) ; \ fi ; \ if test -f $(charset_alias); then \ sed -f ref-add.sed $(charset_alias) > $(charset_tmp) ; \ $(INSTALL_DATA) $(charset_tmp) $(charset_alias) ; \ rm -f $(charset_tmp) ; \ else \ if $$need_charset_alias; then \ sed -f ref-add.sed charset.alias > $(charset_tmp) ; \ $(INSTALL_DATA) $(charset_tmp) $(charset_alias) ; \ rm -f $(charset_tmp) ; \ fi ; \ fi uninstall-local: all-local if test -f $(charset_alias); then \ sed -f ref-del.sed $(charset_alias) > $(charset_tmp); \ if grep '^# Packages using this file: $$' $(charset_tmp) \ > /dev/null; then \ rm -f $(charset_alias); \ else \ $(INSTALL_DATA) $(charset_tmp) $(charset_alias); \ fi; \ rm -f $(charset_tmp); \ fi charset.alias: config.charset rm -f t-$@ $@ $(SHELL) $(srcdir)/config.charset '$(host)' > t-$@ mv t-$@ $@ .sin.sed: rm -f t-$@ $@ sed -e '/^#/d' -e 's/@''PACKAGE''@/$(PACKAGE)/g' $< > t-$@ mv t-$@ $@ # We need the following in order to create when the system # doesn't have a complete one. signal.h: signal.in.h rm -f $@-t $@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''NEXT_SIGNAL_H''@|$(NEXT_SIGNAL_H)|g' \ -e 's|@''GNULIB_SIGNAL_H_SIGPIPE''@|$(GNULIB_SIGNAL_H_SIGPIPE)|g' \ -e 's|@''GNULIB_SIGPROCMASK''@|$(GNULIB_SIGPROCMASK)|g' \ -e 's|@''GNULIB_SIGACTION''@|$(GNULIB_SIGACTION)|g' \ -e 's|@''HAVE_POSIX_SIGNALBLOCKING''@|$(HAVE_POSIX_SIGNALBLOCKING)|g' \ -e 's|@''HAVE_SIGSET_T''@|$(HAVE_SIGSET_T)|g' \ -e 's|@''HAVE_SIGINFO_T''@|$(HAVE_SIGINFO_T)|g' \ -e 's|@''HAVE_SIGACTION''@|$(HAVE_SIGACTION)|g' \ -e 's|@''HAVE_STRUCT_SIGACTION_SA_SIGACTION''@|$(HAVE_STRUCT_SIGACTION_SA_SIGACTION)|g' \ -e '/definition of GL_LINK_WARNING/r $(LINK_WARNING_H)' \ < $(srcdir)/signal.in.h; \ } > $@-t mv $@-t $@ # We need the following in order to create when the system # doesn't have one that works. stdbool.h: stdbool.in.h rm -f $@-t $@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's/@''HAVE__BOOL''@/$(HAVE__BOOL)/g' < $(srcdir)/stdbool.in.h; \ } > $@-t mv $@-t $@ # We need the following in order to create when the system # doesn't have one that works with the given compiler. stdint.h: stdint.in.h rm -f $@-t $@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's/@''HAVE_STDINT_H''@/$(HAVE_STDINT_H)/g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''NEXT_STDINT_H''@|$(NEXT_STDINT_H)|g' \ -e 's/@''HAVE_SYS_TYPES_H''@/$(HAVE_SYS_TYPES_H)/g' \ -e 's/@''HAVE_INTTYPES_H''@/$(HAVE_INTTYPES_H)/g' \ -e 's/@''HAVE_SYS_INTTYPES_H''@/$(HAVE_SYS_INTTYPES_H)/g' \ -e 's/@''HAVE_SYS_BITYPES_H''@/$(HAVE_SYS_BITYPES_H)/g' \ -e 's/@''HAVE_LONG_LONG_INT''@/$(HAVE_LONG_LONG_INT)/g' \ -e 's/@''HAVE_UNSIGNED_LONG_LONG_INT''@/$(HAVE_UNSIGNED_LONG_LONG_INT)/g' \ -e 's/@''APPLE_UNIVERSAL_BUILD''@/$(APPLE_UNIVERSAL_BUILD)/g' \ -e 's/@''BITSIZEOF_PTRDIFF_T''@/$(BITSIZEOF_PTRDIFF_T)/g' \ -e 's/@''PTRDIFF_T_SUFFIX''@/$(PTRDIFF_T_SUFFIX)/g' \ -e 's/@''BITSIZEOF_SIG_ATOMIC_T''@/$(BITSIZEOF_SIG_ATOMIC_T)/g' \ -e 's/@''HAVE_SIGNED_SIG_ATOMIC_T''@/$(HAVE_SIGNED_SIG_ATOMIC_T)/g' \ -e 's/@''SIG_ATOMIC_T_SUFFIX''@/$(SIG_ATOMIC_T_SUFFIX)/g' \ -e 's/@''BITSIZEOF_SIZE_T''@/$(BITSIZEOF_SIZE_T)/g' \ -e 's/@''SIZE_T_SUFFIX''@/$(SIZE_T_SUFFIX)/g' \ -e 's/@''BITSIZEOF_WCHAR_T''@/$(BITSIZEOF_WCHAR_T)/g' \ -e 's/@''HAVE_SIGNED_WCHAR_T''@/$(HAVE_SIGNED_WCHAR_T)/g' \ -e 's/@''WCHAR_T_SUFFIX''@/$(WCHAR_T_SUFFIX)/g' \ -e 's/@''BITSIZEOF_WINT_T''@/$(BITSIZEOF_WINT_T)/g' \ -e 's/@''HAVE_SIGNED_WINT_T''@/$(HAVE_SIGNED_WINT_T)/g' \ -e 's/@''WINT_T_SUFFIX''@/$(WINT_T_SUFFIX)/g' \ < $(srcdir)/stdint.in.h; \ } > $@-t mv $@-t $@ # We need the following in order to create when the system # doesn't have one that works with the given compiler. stdlib.h: stdlib.in.h rm -f $@-t $@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''NEXT_STDLIB_H''@|$(NEXT_STDLIB_H)|g' \ -e 's|@''HAVE_RANDOM_H''@|$(HAVE_RANDOM_H)|g' \ -e 's|@''GNULIB_MALLOC_POSIX''@|$(GNULIB_MALLOC_POSIX)|g' \ -e 's|@''GNULIB_REALLOC_POSIX''@|$(GNULIB_REALLOC_POSIX)|g' \ -e 's|@''GNULIB_CALLOC_POSIX''@|$(GNULIB_CALLOC_POSIX)|g' \ -e 's|@''GNULIB_ATOLL''@|$(GNULIB_ATOLL)|g' \ -e 's|@''GNULIB_GETLOADAVG''@|$(GNULIB_GETLOADAVG)|g' \ -e 's|@''GNULIB_GETSUBOPT''@|$(GNULIB_GETSUBOPT)|g' \ -e 's|@''GNULIB_MKDTEMP''@|$(GNULIB_MKDTEMP)|g' \ -e 's|@''GNULIB_MKSTEMP''@|$(GNULIB_MKSTEMP)|g' \ -e 's|@''GNULIB_PUTENV''@|$(GNULIB_PUTENV)|g' \ -e 's|@''GNULIB_RANDOM_R''@|$(GNULIB_RANDOM_R)|g' \ -e 's|@''GNULIB_RPMATCH''@|$(GNULIB_RPMATCH)|g' \ -e 's|@''GNULIB_SETENV''@|$(GNULIB_SETENV)|g' \ -e 's|@''GNULIB_STRTOD''@|$(GNULIB_STRTOD)|g' \ -e 's|@''GNULIB_STRTOLL''@|$(GNULIB_STRTOLL)|g' \ -e 's|@''GNULIB_STRTOULL''@|$(GNULIB_STRTOULL)|g' \ -e 's|@''GNULIB_UNSETENV''@|$(GNULIB_UNSETENV)|g' \ -e 's|@''HAVE_ATOLL''@|$(HAVE_ATOLL)|g' \ -e 's|@''HAVE_CALLOC_POSIX''@|$(HAVE_CALLOC_POSIX)|g' \ -e 's|@''HAVE_GETSUBOPT''@|$(HAVE_GETSUBOPT)|g' \ -e 's|@''HAVE_MALLOC_POSIX''@|$(HAVE_MALLOC_POSIX)|g' \ -e 's|@''HAVE_MKDTEMP''@|$(HAVE_MKDTEMP)|g' \ -e 's|@''HAVE_REALLOC_POSIX''@|$(HAVE_REALLOC_POSIX)|g' \ -e 's|@''HAVE_RANDOM_R''@|$(HAVE_RANDOM_R)|g' \ -e 's|@''HAVE_RPMATCH''@|$(HAVE_RPMATCH)|g' \ -e 's|@''HAVE_SETENV''@|$(HAVE_SETENV)|g' \ -e 's|@''HAVE_STRTOD''@|$(HAVE_STRTOD)|g' \ -e 's|@''HAVE_STRTOLL''@|$(HAVE_STRTOLL)|g' \ -e 's|@''HAVE_STRTOULL''@|$(HAVE_STRTOULL)|g' \ -e 's|@''HAVE_STRUCT_RANDOM_DATA''@|$(HAVE_STRUCT_RANDOM_DATA)|g' \ -e 's|@''HAVE_SYS_LOADAVG_H''@|$(HAVE_SYS_LOADAVG_H)|g' \ -e 's|@''HAVE_UNSETENV''@|$(HAVE_UNSETENV)|g' \ -e 's|@''HAVE_DECL_GETLOADAVG''@|$(HAVE_DECL_GETLOADAVG)|g' \ -e 's|@''REPLACE_MKSTEMP''@|$(REPLACE_MKSTEMP)|g' \ -e 's|@''REPLACE_PUTENV''@|$(REPLACE_PUTENV)|g' \ -e 's|@''REPLACE_STRTOD''@|$(REPLACE_STRTOD)|g' \ -e 's|@''VOID_UNSETENV''@|$(VOID_UNSETENV)|g' \ -e '/definition of GL_LINK_WARNING/r $(LINK_WARNING_H)' \ < $(srcdir)/stdlib.in.h; \ } > $@-t mv $@-t $@ # We need the following in order to create when the system # doesn't have one that works with the given compiler. string.h: string.in.h rm -f $@-t $@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''NEXT_STRING_H''@|$(NEXT_STRING_H)|g' \ -e 's|@''GNULIB_MBSLEN''@|$(GNULIB_MBSLEN)|g' \ -e 's|@''GNULIB_MBSNLEN''@|$(GNULIB_MBSNLEN)|g' \ -e 's|@''GNULIB_MBSCHR''@|$(GNULIB_MBSCHR)|g' \ -e 's|@''GNULIB_MBSRCHR''@|$(GNULIB_MBSRCHR)|g' \ -e 's|@''GNULIB_MBSSTR''@|$(GNULIB_MBSSTR)|g' \ -e 's|@''GNULIB_MBSCASECMP''@|$(GNULIB_MBSCASECMP)|g' \ -e 's|@''GNULIB_MBSNCASECMP''@|$(GNULIB_MBSNCASECMP)|g' \ -e 's|@''GNULIB_MBSPCASECMP''@|$(GNULIB_MBSPCASECMP)|g' \ -e 's|@''GNULIB_MBSCASESTR''@|$(GNULIB_MBSCASESTR)|g' \ -e 's|@''GNULIB_MBSCSPN''@|$(GNULIB_MBSCSPN)|g' \ -e 's|@''GNULIB_MBSPBRK''@|$(GNULIB_MBSPBRK)|g' \ -e 's|@''GNULIB_MBSSPN''@|$(GNULIB_MBSSPN)|g' \ -e 's|@''GNULIB_MBSSEP''@|$(GNULIB_MBSSEP)|g' \ -e 's|@''GNULIB_MBSTOK_R''@|$(GNULIB_MBSTOK_R)|g' \ -e 's|@''GNULIB_MEMMEM''@|$(GNULIB_MEMMEM)|g' \ -e 's|@''GNULIB_MEMPCPY''@|$(GNULIB_MEMPCPY)|g' \ -e 's|@''GNULIB_MEMRCHR''@|$(GNULIB_MEMRCHR)|g' \ -e 's|@''GNULIB_RAWMEMCHR''@|$(GNULIB_RAWMEMCHR)|g' \ -e 's|@''GNULIB_STPCPY''@|$(GNULIB_STPCPY)|g' \ -e 's|@''GNULIB_STPNCPY''@|$(GNULIB_STPNCPY)|g' \ -e 's|@''GNULIB_STRCHRNUL''@|$(GNULIB_STRCHRNUL)|g' \ -e 's|@''GNULIB_STRDUP''@|$(GNULIB_STRDUP)|g' \ -e 's|@''GNULIB_STRNDUP''@|$(GNULIB_STRNDUP)|g' \ -e 's|@''GNULIB_STRNLEN''@|$(GNULIB_STRNLEN)|g' \ -e 's|@''GNULIB_STRPBRK''@|$(GNULIB_STRPBRK)|g' \ -e 's|@''GNULIB_STRSEP''@|$(GNULIB_STRSEP)|g' \ -e 's|@''GNULIB_STRSTR''@|$(GNULIB_STRSTR)|g' \ -e 's|@''GNULIB_STRCASESTR''@|$(GNULIB_STRCASESTR)|g' \ -e 's|@''GNULIB_STRTOK_R''@|$(GNULIB_STRTOK_R)|g' \ -e 's|@''GNULIB_STRERROR''@|$(GNULIB_STRERROR)|g' \ -e 's|@''GNULIB_STRSIGNAL''@|$(GNULIB_STRSIGNAL)|g' \ -e 's|@''GNULIB_STRVERSCMP''@|$(GNULIB_STRVERSCMP)|g' \ -e 's|@''HAVE_DECL_MEMMEM''@|$(HAVE_DECL_MEMMEM)|g' \ -e 's|@''HAVE_MEMPCPY''@|$(HAVE_MEMPCPY)|g' \ -e 's|@''HAVE_DECL_MEMRCHR''@|$(HAVE_DECL_MEMRCHR)|g' \ -e 's|@''HAVE_RAWMEMCHR''@|$(HAVE_RAWMEMCHR)|g' \ -e 's|@''HAVE_STPCPY''@|$(HAVE_STPCPY)|g' \ -e 's|@''HAVE_STPNCPY''@|$(HAVE_STPNCPY)|g' \ -e 's|@''HAVE_STRCHRNUL''@|$(HAVE_STRCHRNUL)|g' \ -e 's|@''HAVE_DECL_STRDUP''@|$(HAVE_DECL_STRDUP)|g' \ -e 's|@''HAVE_STRNDUP''@|$(HAVE_STRNDUP)|g' \ -e 's|@''HAVE_DECL_STRNDUP''@|$(HAVE_DECL_STRNDUP)|g' \ -e 's|@''HAVE_DECL_STRNLEN''@|$(HAVE_DECL_STRNLEN)|g' \ -e 's|@''HAVE_STRPBRK''@|$(HAVE_STRPBRK)|g' \ -e 's|@''HAVE_STRSEP''@|$(HAVE_STRSEP)|g' \ -e 's|@''HAVE_STRCASESTR''@|$(HAVE_STRCASESTR)|g' \ -e 's|@''HAVE_DECL_STRTOK_R''@|$(HAVE_DECL_STRTOK_R)|g' \ -e 's|@''HAVE_DECL_STRERROR''@|$(HAVE_DECL_STRERROR)|g' \ -e 's|@''HAVE_DECL_STRSIGNAL''@|$(HAVE_DECL_STRSIGNAL)|g' \ -e 's|@''HAVE_STRVERSCMP''@|$(HAVE_STRVERSCMP)|g' \ -e 's|@''REPLACE_MEMMEM''@|$(REPLACE_MEMMEM)|g' \ -e 's|@''REPLACE_STRCASESTR''@|$(REPLACE_STRCASESTR)|g' \ -e 's|@''REPLACE_STRDUP''@|$(REPLACE_STRDUP)|g' \ -e 's|@''REPLACE_STRSTR''@|$(REPLACE_STRSTR)|g' \ -e 's|@''REPLACE_STRERROR''@|$(REPLACE_STRERROR)|g' \ -e 's|@''REPLACE_STRSIGNAL''@|$(REPLACE_STRSIGNAL)|g' \ -e '/definition of GL_LINK_WARNING/r $(LINK_WARNING_H)' \ < $(srcdir)/string.in.h; \ } > $@-t mv $@-t $@ # We need the following in order to create when the system # doesn't have one that works with the given compiler. strings.h: strings.in.h rm -f $@-t $@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''NEXT_STRINGS_H''@|$(NEXT_STRINGS_H)|g' \ -e 's|@''HAVE_STRCASECMP''@|$(HAVE_STRCASECMP)|g' \ -e 's|@''HAVE_DECL_STRNCASECMP''@|$(HAVE_DECL_STRNCASECMP)|g' \ -e '/definition of GL_LINK_WARNING/r $(LINK_WARNING_H)' \ < $(srcdir)/strings.in.h; \ } > $@-t mv $@-t $@ # We need the following in order to create when the system # doesn't have one that works with the given compiler. sys/select.h: sys_select.in.h @MKDIR_P@ sys rm -f $@-t $@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''NEXT_SYS_SELECT_H''@|$(NEXT_SYS_SELECT_H)|g' \ -e 's|@''HAVE_SYS_SELECT_H''@|$(HAVE_SYS_SELECT_H)|g' \ -e 's|@''GNULIB_SELECT''@|$(GNULIB_SELECT)|g' \ -e 's|@''HAVE_WINSOCK2_H''@|$(HAVE_WINSOCK2_H)|g' \ -e '/definition of GL_LINK_WARNING/r $(LINK_WARNING_H)' \ < $(srcdir)/sys_select.in.h; \ } > $@-t mv $@-t $@ # We need the following in order to create when the system # doesn't have one that works with the given compiler. sys/socket.h: sys_socket.in.h @MKDIR_P@ sys { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''NEXT_SYS_SOCKET_H''@|$(NEXT_SYS_SOCKET_H)|g' \ -e 's|@''HAVE_SYS_SOCKET_H''@|$(HAVE_SYS_SOCKET_H)|g' \ -e 's|@''GNULIB_CLOSE''@|$(GNULIB_CLOSE)|g' \ -e 's|@''GNULIB_SOCKET''@|$(GNULIB_SOCKET)|g' \ -e 's|@''GNULIB_CONNECT''@|$(GNULIB_CONNECT)|g' \ -e 's|@''GNULIB_ACCEPT''@|$(GNULIB_ACCEPT)|g' \ -e 's|@''GNULIB_BIND''@|$(GNULIB_BIND)|g' \ -e 's|@''GNULIB_GETPEERNAME''@|$(GNULIB_GETPEERNAME)|g' \ -e 's|@''GNULIB_GETSOCKNAME''@|$(GNULIB_GETSOCKNAME)|g' \ -e 's|@''GNULIB_GETSOCKOPT''@|$(GNULIB_GETSOCKOPT)|g' \ -e 's|@''GNULIB_LISTEN''@|$(GNULIB_LISTEN)|g' \ -e 's|@''GNULIB_RECV''@|$(GNULIB_RECV)|g' \ -e 's|@''GNULIB_SEND''@|$(GNULIB_SEND)|g' \ -e 's|@''GNULIB_RECVFROM''@|$(GNULIB_RECVFROM)|g' \ -e 's|@''GNULIB_SENDTO''@|$(GNULIB_SENDTO)|g' \ -e 's|@''GNULIB_SETSOCKOPT''@|$(GNULIB_SETSOCKOPT)|g' \ -e 's|@''GNULIB_SHUTDOWN''@|$(GNULIB_SHUTDOWN)|g' \ -e 's|@''HAVE_WINSOCK2_H''@|$(HAVE_WINSOCK2_H)|g' \ -e 's|@''HAVE_WS2TCPIP_H''@|$(HAVE_WS2TCPIP_H)|g' \ -e '/definition of GL_LINK_WARNING/r $(LINK_WARNING_H)' \ < $(srcdir)/sys_socket.in.h; \ } > $@-t mv -f $@-t $@ # We need the following in order to create when the system # has one that is incomplete. sys/stat.h: sys_stat.in.h @MKDIR_P@ sys rm -f $@-t $@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''NEXT_SYS_STAT_H''@|$(NEXT_SYS_STAT_H)|g' \ -e 's|@''GNULIB_LCHMOD''@|$(GNULIB_LCHMOD)|g' \ -e 's|@''GNULIB_LSTAT''@|$(GNULIB_LSTAT)|g' \ -e 's|@''HAVE_LCHMOD''@|$(HAVE_LCHMOD)|g' \ -e 's|@''HAVE_LSTAT''@|$(HAVE_LSTAT)|g' \ -e 's|@''REPLACE_LSTAT''@|$(REPLACE_LSTAT)|g' \ -e 's|@''REPLACE_MKDIR''@|$(REPLACE_MKDIR)|g' \ -e '/definition of GL_LINK_WARNING/r $(LINK_WARNING_H)' \ < $(srcdir)/sys_stat.in.h; \ } > $@-t mv $@-t $@ # We need the following in order to create when the system # doesn't have one that works with the given compiler. sys/time.h: sys_time.in.h @MKDIR_P@ sys rm -f $@-t $@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's/@''HAVE_SYS_TIME_H''@/$(HAVE_SYS_TIME_H)/g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''NEXT_SYS_TIME_H''@|$(NEXT_SYS_TIME_H)|g' \ -e 's/@''REPLACE_GETTIMEOFDAY''@/$(REPLACE_GETTIMEOFDAY)/g' \ -e 's/@''HAVE_STRUCT_TIMEVAL''@/$(HAVE_STRUCT_TIMEVAL)/g' \ < $(srcdir)/sys_time.in.h; \ } > $@-t mv $@-t $@ # We need the following in order to create when the system # doesn't have one that works with the given compiler. time.h: time.in.h rm -f $@-t $@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@NEXT_TIME_H''@|$(NEXT_TIME_H)|g' \ -e 's|@REPLACE_LOCALTIME_R''@|$(REPLACE_LOCALTIME_R)|g' \ -e 's|@REPLACE_NANOSLEEP''@|$(REPLACE_NANOSLEEP)|g' \ -e 's|@REPLACE_STRPTIME''@|$(REPLACE_STRPTIME)|g' \ -e 's|@REPLACE_TIMEGM''@|$(REPLACE_TIMEGM)|g' \ -e 's|@SYS_TIME_H_DEFINES_STRUCT_TIMESPEC''@|$(SYS_TIME_H_DEFINES_STRUCT_TIMESPEC)|g' \ -e 's|@TIME_H_DEFINES_STRUCT_TIMESPEC''@|$(TIME_H_DEFINES_STRUCT_TIMESPEC)|g' \ < $(srcdir)/time.in.h; \ } > $@-t mv $@-t $@ # We need the following in order to create an empty placeholder for # when the system doesn't have one. unistd.h: unistd.in.h rm -f $@-t $@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's|@''HAVE_UNISTD_H''@|$(HAVE_UNISTD_H)|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''NEXT_UNISTD_H''@|$(NEXT_UNISTD_H)|g' \ -e 's|@''GNULIB_CHOWN''@|$(GNULIB_CHOWN)|g' \ -e 's|@''GNULIB_CLOSE''@|$(GNULIB_CLOSE)|g' \ -e 's|@''GNULIB_DUP2''@|$(GNULIB_DUP2)|g' \ -e 's|@''GNULIB_ENVIRON''@|$(GNULIB_ENVIRON)|g' \ -e 's|@''GNULIB_EUIDACCESS''@|$(GNULIB_EUIDACCESS)|g' \ -e 's|@''GNULIB_FCHDIR''@|$(GNULIB_FCHDIR)|g' \ -e 's|@''GNULIB_FSYNC''@|$(GNULIB_FSYNC)|g' \ -e 's|@''GNULIB_FTRUNCATE''@|$(GNULIB_FTRUNCATE)|g' \ -e 's|@''GNULIB_GETCWD''@|$(GNULIB_GETCWD)|g' \ -e 's|@''GNULIB_GETDOMAINNAME''@|$(GNULIB_GETDOMAINNAME)|g' \ -e 's|@''GNULIB_GETDTABLESIZE''@|$(GNULIB_GETDTABLESIZE)|g' \ -e 's|@''GNULIB_GETHOSTNAME''@|$(GNULIB_GETHOSTNAME)|g' \ -e 's|@''GNULIB_GETLOGIN_R''@|$(GNULIB_GETLOGIN_R)|g' \ -e 's|@''GNULIB_GETPAGESIZE''@|$(GNULIB_GETPAGESIZE)|g' \ -e 's|@''GNULIB_GETUSERSHELL''@|$(GNULIB_GETUSERSHELL)|g' \ -e 's|@''GNULIB_LCHOWN''@|$(GNULIB_LCHOWN)|g' \ -e 's|@''GNULIB_LINK''@|$(GNULIB_LINK)|g' \ -e 's|@''GNULIB_LSEEK''@|$(GNULIB_LSEEK)|g' \ -e 's|@''GNULIB_READLINK''@|$(GNULIB_READLINK)|g' \ -e 's|@''GNULIB_SLEEP''@|$(GNULIB_SLEEP)|g' \ -e 's|@''GNULIB_UNISTD_H_SIGPIPE''@|$(GNULIB_UNISTD_H_SIGPIPE)|g' \ -e 's|@''GNULIB_WRITE''@|$(GNULIB_WRITE)|g' \ -e 's|@''HAVE_DUP2''@|$(HAVE_DUP2)|g' \ -e 's|@''HAVE_EUIDACCESS''@|$(HAVE_EUIDACCESS)|g' \ -e 's|@''HAVE_FSYNC''@|$(HAVE_FSYNC)|g' \ -e 's|@''HAVE_FTRUNCATE''@|$(HAVE_FTRUNCATE)|g' \ -e 's|@''HAVE_GETDOMAINNAME''@|$(HAVE_GETDOMAINNAME)|g' \ -e 's|@''HAVE_GETDTABLESIZE''@|$(HAVE_GETDTABLESIZE)|g' \ -e 's|@''HAVE_GETHOSTNAME''@|$(HAVE_GETHOSTNAME)|g' \ -e 's|@''HAVE_GETPAGESIZE''@|$(HAVE_GETPAGESIZE)|g' \ -e 's|@''HAVE_GETUSERSHELL''@|$(HAVE_GETUSERSHELL)|g' \ -e 's|@''HAVE_LINK''@|$(HAVE_LINK)|g' \ -e 's|@''HAVE_READLINK''@|$(HAVE_READLINK)|g' \ -e 's|@''HAVE_SLEEP''@|$(HAVE_SLEEP)|g' \ -e 's|@''HAVE_DECL_ENVIRON''@|$(HAVE_DECL_ENVIRON)|g' \ -e 's|@''HAVE_DECL_GETLOGIN_R''@|$(HAVE_DECL_GETLOGIN_R)|g' \ -e 's|@''HAVE_OS_H''@|$(HAVE_OS_H)|g' \ -e 's|@''HAVE_SYS_PARAM_H''@|$(HAVE_SYS_PARAM_H)|g' \ -e 's|@''REPLACE_CHOWN''@|$(REPLACE_CHOWN)|g' \ -e 's|@''REPLACE_CLOSE''@|$(REPLACE_CLOSE)|g' \ -e 's|@''REPLACE_FCHDIR''@|$(REPLACE_FCHDIR)|g' \ -e 's|@''REPLACE_GETCWD''@|$(REPLACE_GETCWD)|g' \ -e 's|@''REPLACE_GETPAGESIZE''@|$(REPLACE_GETPAGESIZE)|g' \ -e 's|@''REPLACE_LCHOWN''@|$(REPLACE_LCHOWN)|g' \ -e 's|@''REPLACE_LSEEK''@|$(REPLACE_LSEEK)|g' \ -e 's|@''REPLACE_WRITE''@|$(REPLACE_WRITE)|g' \ -e 's|@''UNISTD_H_HAVE_WINSOCK2_H''@|$(UNISTD_H_HAVE_WINSOCK2_H)|g' \ -e '/definition of GL_LINK_WARNING/r $(LINK_WARNING_H)' \ < $(srcdir)/unistd.in.h; \ } > $@-t mv $@-t $@ # We need the following in order to create when the system # version does not work standalone. wchar.h: wchar.in.h rm -f $@-t $@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''NEXT_WCHAR_H''@|$(NEXT_WCHAR_H)|g' \ -e 's|@''HAVE_WCHAR_H''@|$(HAVE_WCHAR_H)|g' \ -e 's|@''GNULIB_BTOWC''@|$(GNULIB_BTOWC)|g' \ -e 's|@''GNULIB_WCTOB''@|$(GNULIB_WCTOB)|g' \ -e 's|@''GNULIB_MBSINIT''@|$(GNULIB_MBSINIT)|g' \ -e 's|@''GNULIB_MBRTOWC''@|$(GNULIB_MBRTOWC)|g' \ -e 's|@''GNULIB_MBRLEN''@|$(GNULIB_MBRLEN)|g' \ -e 's|@''GNULIB_MBSRTOWCS''@|$(GNULIB_MBSRTOWCS)|g' \ -e 's|@''GNULIB_MBSNRTOWCS''@|$(GNULIB_MBSNRTOWCS)|g' \ -e 's|@''GNULIB_WCRTOMB''@|$(GNULIB_WCRTOMB)|g' \ -e 's|@''GNULIB_WCSRTOMBS''@|$(GNULIB_WCSRTOMBS)|g' \ -e 's|@''GNULIB_WCSNRTOMBS''@|$(GNULIB_WCSNRTOMBS)|g' \ -e 's|@''GNULIB_WCWIDTH''@|$(GNULIB_WCWIDTH)|g' \ -e 's|@''HAVE_WINT_T''@|$(HAVE_WINT_T)|g' \ -e 's|@''HAVE_BTOWC''@|$(HAVE_BTOWC)|g' \ -e 's|@''HAVE_MBSINIT''@|$(HAVE_MBSINIT)|g' \ -e 's|@''HAVE_MBRTOWC''@|$(HAVE_MBRTOWC)|g' \ -e 's|@''HAVE_MBRLEN''@|$(HAVE_MBRLEN)|g' \ -e 's|@''HAVE_MBSRTOWCS''@|$(HAVE_MBSRTOWCS)|g' \ -e 's|@''HAVE_MBSNRTOWCS''@|$(HAVE_MBSNRTOWCS)|g' \ -e 's|@''HAVE_WCRTOMB''@|$(HAVE_WCRTOMB)|g' \ -e 's|@''HAVE_WCSRTOMBS''@|$(HAVE_WCSRTOMBS)|g' \ -e 's|@''HAVE_WCSNRTOMBS''@|$(HAVE_WCSNRTOMBS)|g' \ -e 's|@''HAVE_DECL_WCTOB''@|$(HAVE_DECL_WCTOB)|g' \ -e 's|@''HAVE_DECL_WCWIDTH''@|$(HAVE_DECL_WCWIDTH)|g' \ -e 's|@''REPLACE_MBSTATE_T''@|$(REPLACE_MBSTATE_T)|g' \ -e 's|@''REPLACE_BTOWC''@|$(REPLACE_BTOWC)|g' \ -e 's|@''REPLACE_WCTOB''@|$(REPLACE_WCTOB)|g' \ -e 's|@''REPLACE_MBSINIT''@|$(REPLACE_MBSINIT)|g' \ -e 's|@''REPLACE_MBRTOWC''@|$(REPLACE_MBRTOWC)|g' \ -e 's|@''REPLACE_MBRLEN''@|$(REPLACE_MBRLEN)|g' \ -e 's|@''REPLACE_MBSRTOWCS''@|$(REPLACE_MBSRTOWCS)|g' \ -e 's|@''REPLACE_MBSNRTOWCS''@|$(REPLACE_MBSNRTOWCS)|g' \ -e 's|@''REPLACE_WCRTOMB''@|$(REPLACE_WCRTOMB)|g' \ -e 's|@''REPLACE_WCSRTOMBS''@|$(REPLACE_WCSRTOMBS)|g' \ -e 's|@''REPLACE_WCWIDTH''@|$(REPLACE_WCWIDTH)|g' \ -e '/definition of GL_LINK_WARNING/r $(LINK_WARNING_H)' \ < $(srcdir)/wchar.in.h; \ } > $@-t mv $@-t $@ # We need the following in order to create when the system # doesn't have one that works with the given compiler. wctype.h: wctype.in.h rm -f $@-t $@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's/@''HAVE_WCTYPE_H''@/$(HAVE_WCTYPE_H)/g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''NEXT_WCTYPE_H''@|$(NEXT_WCTYPE_H)|g' \ -e 's/@''HAVE_ISWCNTRL''@/$(HAVE_ISWCNTRL)/g' \ -e 's/@''HAVE_WINT_T''@/$(HAVE_WINT_T)/g' \ -e 's/@''REPLACE_ISWCNTRL''@/$(REPLACE_ISWCNTRL)/g' \ < $(srcdir)/wctype.in.h; \ } > $@-t mv $@-t $@ mostlyclean-local: mostlyclean-generic @for dir in '' $(MOSTLYCLEANDIRS); do \ if test -n "$$dir" && test -d $$dir; then \ echo "rmdir $$dir"; rmdir $$dir; \ fi; \ done; \ : # 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: gnuit-4.9.5/lib/xstrtoul.c0000644000175000017500000000025411146671375012432 00000000000000#define __strtol strtoul #define __strtol_t unsigned long int #define __xstrtol xstrtoul #define STRTOL_T_MINIMUM 0 #define STRTOL_T_MAXIMUM ULONG_MAX #include "xstrtol.c" gnuit-4.9.5/lib/dirname.c0000644000175000017500000000564411146671375012155 00000000000000/* dirname.c -- return all but the last element in a file name Copyright (C) 1990, 1998, 2000, 2001, 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 3 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, see . */ #include #include "dirname.h" #include #include "xalloc.h" /* Return the length of the prefix of FILE that will be used by dir_name. If FILE is in the working directory, this returns zero even though `dir_name (FILE)' will return ".". Works properly even if there are trailing slashes (by effectively ignoring them). */ size_t dir_len (char const *file) { size_t prefix_length = FILE_SYSTEM_PREFIX_LEN (file); size_t length; /* Advance prefix_length beyond important leading slashes. */ prefix_length += (prefix_length != 0 ? (FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE && ISSLASH (file[prefix_length])) : (ISSLASH (file[0]) ? ((DOUBLE_SLASH_IS_DISTINCT_ROOT && ISSLASH (file[1]) && ! ISSLASH (file[2]) ? 2 : 1)) : 0)); /* Strip the basename and any redundant slashes before it. */ for (length = last_component (file) - file; prefix_length < length; length--) if (! ISSLASH (file[length - 1])) break; return length; } /* In general, we can't use the builtin `dirname' function if available, since it has different meanings in different environments. In some environments the builtin `dirname' modifies its argument. Return the leading directories part of FILE, allocated with xmalloc. Works properly even if there are trailing slashes (by effectively ignoring them). Unlike POSIX dirname(), FILE cannot be NULL. If lstat (FILE) would succeed, then { chdir (dir_name (FILE)); lstat (base_name (FILE)); } will access the same file. Likewise, if the sequence { chdir (dir_name (FILE)); rename (base_name (FILE), "foo"); } succeeds, you have renamed FILE to "foo" in the same directory FILE was in. */ char * dir_name (char const *file) { size_t length = dir_len (file); bool append_dot = (length == 0 || (FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE && length == FILE_SYSTEM_PREFIX_LEN (file) && file[2] != '\0' && ! ISSLASH (file[2]))); char *dir = xmalloc (length + append_dot + 1); memcpy (dir, file, length); if (append_dot) dir[length++] = '.'; dir[length] = '\0'; return dir; } gnuit-4.9.5/lib/mbrtowc.c0000644000175000017500000002003711146671375012204 00000000000000/* Convert multibyte character to wide character. Copyright (C) 1999-2002, 2005-2009 Free Software Foundation, Inc. Written by Bruno Haible , 2008. 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 3 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, see . */ #include /* Specification. */ #include #if GNULIB_defined_mbstate_t /* Implement mbrtowc() on top of mbtowc(). */ # include # include # include "localcharset.h" # include "streq.h" # include "verify.h" verify (sizeof (mbstate_t) >= 4); static char internal_state[4]; size_t mbrtowc (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps) { char *pstate = (char *)ps; if (pstate == NULL) pstate = internal_state; if (s == NULL) { pwc = NULL; s = ""; n = 1; } if (n == 0) return (size_t)(-2); /* Here n > 0. */ { size_t nstate = pstate[0]; char buf[4]; const char *p; size_t m; switch (nstate) { case 0: p = s; m = n; break; case 3: buf[2] = pstate[3]; /*FALLTHROUGH*/ case 2: buf[1] = pstate[2]; /*FALLTHROUGH*/ case 1: buf[0] = pstate[1]; p = buf; m = nstate; buf[m++] = s[0]; if (n >= 2 && m < 4) { buf[m++] = s[1]; if (n >= 3 && m < 4) buf[m++] = s[2]; } break; default: errno = EINVAL; return (size_t)(-1); } /* Here 0 < m ≤ 4. */ # if __GLIBC__ /* Work around bug */ mbtowc (NULL, NULL, 0); # endif { int res = mbtowc (pwc, p, m); if (res >= 0) { if (pwc != NULL && ((*pwc == 0) != (res == 0))) abort (); if (nstate >= (res > 0 ? res : 1)) abort (); res -= nstate; pstate[0] = 0; return res; } /* mbtowc does not distinguish between invalid and incomplete multibyte sequences. But mbrtowc needs to make this distinction. There are two possible approaches: - Use iconv() and its return value. - Use built-in knowledge about the possible encodings. Given the low quality of implementation of iconv() on the systems that lack mbrtowc(), we use the second approach. The possible encodings are: - 8-bit encodings, - EUC-JP, EUC-KR, GB2312, EUC-TW, BIG5, GB18030, SJIS, - UTF-8. Use specialized code for each. */ if (m >= 4 || m >= MB_CUR_MAX) goto invalid; /* Here MB_CUR_MAX > 1 and 0 < m < 4. */ { const char *encoding = locale_charset (); if (STREQ (encoding, "UTF-8", 'U', 'T', 'F', '-', '8', 0, 0, 0, 0)) { /* Cf. unistr/u8-mblen.c. */ unsigned char c = (unsigned char) p[0]; if (c >= 0xc2) { if (c < 0xe0) { if (m == 1) goto incomplete; } else if (c < 0xf0) { if (m == 1) goto incomplete; if (m == 2) { unsigned char c2 = (unsigned char) p[1]; if ((c2 ^ 0x80) < 0x40 && (c >= 0xe1 || c2 >= 0xa0) && (c != 0xed || c2 < 0xa0)) goto incomplete; } } else if (c <= 0xf4) { if (m == 1) goto incomplete; else /* m == 2 || m == 3 */ { unsigned char c2 = (unsigned char) p[1]; if ((c2 ^ 0x80) < 0x40 && (c >= 0xf1 || c2 >= 0x90) && (c < 0xf4 || (c == 0xf4 && c2 < 0x90))) { if (m == 2) goto incomplete; else /* m == 3 */ { unsigned char c3 = (unsigned char) p[2]; if ((c3 ^ 0x80) < 0x40) goto incomplete; } } } } } goto invalid; } /* As a reference for this code, you can use the GNU libiconv implementation. Look for uses of the RET_TOOFEW macro. */ if (STREQ (encoding, "EUC-JP", 'E', 'U', 'C', '-', 'J', 'P', 0, 0, 0)) { if (m == 1) { unsigned char c = (unsigned char) p[0]; if ((c >= 0xa1 && c < 0xff) || c == 0x8e || c == 0x8f) goto incomplete; } if (m == 2) { unsigned char c = (unsigned char) p[0]; if (c == 0x8f) { unsigned char c2 = (unsigned char) p[1]; if (c2 >= 0xa1 && c2 < 0xff) goto incomplete; } } goto invalid; } if (STREQ (encoding, "EUC-KR", 'E', 'U', 'C', '-', 'K', 'R', 0, 0, 0) || STREQ (encoding, "GB2312", 'G', 'B', '2', '3', '1', '2', 0, 0, 0) || STREQ (encoding, "BIG5", 'B', 'I', 'G', '5', 0, 0, 0, 0, 0)) { if (m == 1) { unsigned char c = (unsigned char) p[0]; if (c >= 0xa1 && c < 0xff) goto incomplete; } goto invalid; } if (STREQ (encoding, "EUC-TW", 'E', 'U', 'C', '-', 'T', 'W', 0, 0, 0)) { if (m == 1) { unsigned char c = (unsigned char) p[0]; if ((c >= 0xa1 && c < 0xff) || c == 0x8e) goto incomplete; } else /* m == 2 || m == 3 */ { unsigned char c = (unsigned char) p[0]; if (c == 0x8e) goto incomplete; } goto invalid; } if (STREQ (encoding, "GB18030", 'G', 'B', '1', '8', '0', '3', '0', 0, 0)) { if (m == 1) { unsigned char c = (unsigned char) p[0]; if ((c >= 0x90 && c <= 0xe3) || (c >= 0xf8 && c <= 0xfe)) goto incomplete; } else /* m == 2 || m == 3 */ { unsigned char c = (unsigned char) p[0]; if (c >= 0x90 && c <= 0xe3) { unsigned char c2 = (unsigned char) p[1]; if (c2 >= 0x30 && c2 <= 0x39) { if (m == 2) goto incomplete; else /* m == 3 */ { unsigned char c3 = (unsigned char) p[2]; if (c3 >= 0x81 && c3 <= 0xfe) goto incomplete; } } } } goto invalid; } if (STREQ (encoding, "SJIS", 'S', 'J', 'I', 'S', 0, 0, 0, 0, 0)) { if (m == 1) { unsigned char c = (unsigned char) p[0]; if ((c >= 0x81 && c <= 0x9f) || (c >= 0xe0 && c <= 0xea) || (c >= 0xf0 && c <= 0xf9)) goto incomplete; } goto invalid; } /* An unknown multibyte encoding. */ goto incomplete; } incomplete: { size_t k = nstate; /* Here 0 <= k < m < 4. */ pstate[++k] = s[0]; if (k < m) { pstate[++k] = s[1]; if (k < m) pstate[++k] = s[2]; } if (k != m) abort (); } pstate[0] = m; return (size_t)(-2); invalid: errno = EILSEQ; /* The conversion state is undefined, says POSIX. */ return (size_t)(-1); } } } #else /* Override the system's mbrtowc() function. */ # undef mbrtowc size_t rpl_mbrtowc (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps) { # if MBRTOWC_NULL_ARG_BUG || MBRTOWC_RETVAL_BUG if (s == NULL) { pwc = NULL; s = ""; n = 1; } # endif # if MBRTOWC_RETVAL_BUG { static mbstate_t internal_state; /* Override mbrtowc's internal state. We can not call mbsinit() on the hidden internal state, but we can call it on our variable. */ if (ps == NULL) ps = &internal_state; if (!mbsinit (ps)) { /* Parse the rest of the multibyte character byte for byte. */ size_t count = 0; for (; n > 0; s++, n--) { wchar_t wc; size_t ret = mbrtowc (&wc, s, 1, ps); if (ret == (size_t)(-1)) return (size_t)(-1); count++; if (ret != (size_t)(-2)) { /* The multibyte character has been completed. */ if (pwc != NULL) *pwc = wc; return (wc == 0 ? 0 : count); } } return (size_t)(-2); } } # endif # if MBRTOWC_NUL_RETVAL_BUG { wchar_t wc; size_t ret = mbrtowc (&wc, s, n, ps); if (ret != (size_t)(-1) && ret != (size_t)(-2)) { if (pwc != NULL) *pwc = wc; if (wc == 0) ret = 0; } return ret; } # else return mbrtowc (pwc, s, n, ps); # endif } #endif gnuit-4.9.5/lib/rename.c0000644000175000017500000000304211146671375011773 00000000000000/* Work around the bug in some systems whereby rename fails when the source file has a trailing slash. The rename functions of SunOS 4.1.1_U1 and mips-dec-ultrix4.4 have this bug. Copyright (C) 2001, 2002, 2003, 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 3 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, see . */ /* written by Volker Borchert */ #include #undef rename #include #include #include #include "dirname.h" #include "xalloc.h" /* Rename the file SRC to DST, removing any trailing slashes from SRC. Needed for SunOS 4.1.1_U1. */ int rpl_rename (char const *src, char const *dst) { char *src_temp; int ret_val; size_t s_len = strlen (src); if (s_len && src[s_len - 1] == '/') { src_temp = xstrdup (src); strip_trailing_slashes (src_temp); } else src_temp = (char *) src; ret_val = rename (src_temp, dst); if (src_temp != src) free (src_temp); return ret_val; } gnuit-4.9.5/lib/xmalloc.c0000644000175000017500000000637711146671375012201 00000000000000/* xmalloc.c -- malloc with out of memory checking Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2002, 2003, 2004, 2005, 2006, 2008 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 3 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, see . */ #include #if ! HAVE_INLINE # define static_inline #endif #include "xalloc.h" #undef static_inline #include #include #ifndef SIZE_MAX # define SIZE_MAX ((size_t) -1) #endif /* 1 if calloc is known to be compatible with GNU calloc. This matters if we are not also using the calloc module, which defines HAVE_CALLOC and supports the GNU API even on non-GNU platforms. */ #if defined HAVE_CALLOC || defined __GLIBC__ enum { HAVE_GNU_CALLOC = 1 }; #else enum { HAVE_GNU_CALLOC = 0 }; #endif /* Allocate N bytes of memory dynamically, with error checking. */ void * xmalloc (size_t n) { void *p = malloc (n); if (!p && n != 0) xalloc_die (); return p; } /* Change the size of an allocated block of memory P to N bytes, with error checking. */ void * xrealloc (void *p, size_t n) { p = realloc (p, n); if (!p && n != 0) xalloc_die (); return p; } /* If P is null, allocate a block of at least *PN bytes; otherwise, reallocate P so that it contains more than *PN bytes. *PN must be nonzero unless P is null. Set *PN to the new block's size, and return the pointer to the new block. *PN is never set to zero, and the returned pointer is never null. */ void * x2realloc (void *p, size_t *pn) { return x2nrealloc (p, pn, 1); } /* Allocate S bytes of zeroed memory dynamically, with error checking. There's no need for xnzalloc (N, S), since it would be equivalent to xcalloc (N, S). */ void * xzalloc (size_t s) { return memset (xmalloc (s), 0, s); } /* Allocate zeroed memory for N elements of S bytes, with error checking. S must be nonzero. */ void * xcalloc (size_t n, size_t s) { void *p; /* Test for overflow, since some calloc implementations don't have proper overflow checks. But omit overflow and size-zero tests if HAVE_GNU_CALLOC, since GNU calloc catches overflow and never returns NULL if successful. */ if ((! HAVE_GNU_CALLOC && xalloc_oversized (n, s)) || (! (p = calloc (n, s)) && (HAVE_GNU_CALLOC || n != 0))) xalloc_die (); return p; } /* Clone an object P of size S, with error checking. There's no need for xnmemdup (P, N, S), since xmemdup (P, N * S) works without any need for an arithmetic overflow check. */ void * xmemdup (void const *p, size_t s) { return memcpy (xmalloc (s), p, s); } /* Clone STRING. */ char * xstrdup (char const *string) { return xmemdup (string, strlen (string) + 1); } gnuit-4.9.5/lib/mbchar.h0000644000175000017500000003102311146671375011765 00000000000000/* Multibyte character data type. Copyright (C) 2001, 2005-2007 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 3 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, see . */ /* Written by Bruno Haible . */ /* A multibyte character is a short subsequence of a char* string, representing a single wide character. We use multibyte characters instead of wide characters because of the following goals: 1) correct multibyte handling, i.e. operate according to the LC_CTYPE locale, 2) ease of maintenance, i.e. the maintainer needs not know all details of the ISO C 99 standard, 3) don't fail grossly if the input is not in the encoding set by the locale, because often different encodings are in use in the same countries (ISO-8859-1/UTF-8, EUC-JP/Shift_JIS, ...), 4) fast in the case of ASCII characters, 5) portability, i.e. don't make unportable assumptions about wchar_t. Multibyte characters are only accessed through the mb* macros. mb_ptr (mbc) return a pointer to the beginning of the multibyte sequence. mb_len (mbc) returns the number of bytes occupied by the multibyte sequence. Always > 0. mb_iseq (mbc, sc) returns true if mbc is the standard ASCII character sc. mb_isnul (mbc) returns true if mbc is the nul character. mb_cmp (mbc1, mbc2) returns a positive, zero, or negative value depending on whether mbc1 sorts after, same or before mbc2. mb_casecmp (mbc1, mbc2) returns a positive, zero, or negative value depending on whether mbc1 sorts after, same or before mbc2, modulo upper/lowercase conversion. mb_equal (mbc1, mbc2) returns true if mbc1 and mbc2 are equal. mb_caseequal (mbc1, mbc2) returns true if mbc1 and mbc2 are equal modulo upper/lowercase conversion. mb_isalnum (mbc) returns true if mbc is alphanumeric. mb_isalpha (mbc) returns true if mbc is alphabetic. mb_isascii(mbc) returns true if mbc is plain ASCII. mb_isblank (mbc) returns true if mbc is a blank. mb_iscntrl (mbc) returns true if mbc is a control character. mb_isdigit (mbc) returns true if mbc is a decimal digit. mb_isgraph (mbc) returns true if mbc is a graphic character. mb_islower (mbc) returns true if mbc is lowercase. mb_isprint (mbc) returns true if mbc is a printable character. mb_ispunct (mbc) returns true if mbc is a punctuation character. mb_isspace (mbc) returns true if mbc is a space character. mb_isupper (mbc) returns true if mbc is uppercase. mb_isxdigit (mbc) returns true if mbc is a hexadecimal digit. mb_width (mbc) returns the number of columns on the output device occupied by mbc. Always >= 0. mb_putc (mbc, stream) outputs mbc on stream, a byte oriented FILE stream opened for output. mb_setascii (&mbc, sc) assigns the standard ASCII character sc to mbc. mb_copy (&destmbc, &srcmbc) copies srcmbc to destmbc. Here are the function prototypes of the macros. extern const char * mb_ptr (const mbchar_t mbc); extern size_t mb_len (const mbchar_t mbc); extern bool mb_iseq (const mbchar_t mbc, char sc); extern bool mb_isnul (const mbchar_t mbc); extern int mb_cmp (const mbchar_t mbc1, const mbchar_t mbc2); extern int mb_casecmp (const mbchar_t mbc1, const mbchar_t mbc2); extern bool mb_equal (const mbchar_t mbc1, const mbchar_t mbc2); extern bool mb_caseequal (const mbchar_t mbc1, const mbchar_t mbc2); extern bool mb_isalnum (const mbchar_t mbc); extern bool mb_isalpha (const mbchar_t mbc); extern bool mb_isascii (const mbchar_t mbc); extern bool mb_isblank (const mbchar_t mbc); extern bool mb_iscntrl (const mbchar_t mbc); extern bool mb_isdigit (const mbchar_t mbc); extern bool mb_isgraph (const mbchar_t mbc); extern bool mb_islower (const mbchar_t mbc); extern bool mb_isprint (const mbchar_t mbc); extern bool mb_ispunct (const mbchar_t mbc); extern bool mb_isspace (const mbchar_t mbc); extern bool mb_isupper (const mbchar_t mbc); extern bool mb_isxdigit (const mbchar_t mbc); extern int mb_width (const mbchar_t mbc); extern void mb_putc (const mbchar_t mbc, FILE *stream); extern void mb_setascii (mbchar_t *new, char sc); extern void mb_copy (mbchar_t *new, const mbchar_t *old); */ #ifndef _MBCHAR_H #define _MBCHAR_H 1 #include #include /* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.1 has a bug: and must be included before . */ #include #include #include #include #define MBCHAR_BUF_SIZE 24 struct mbchar { const char *ptr; /* pointer to current character */ size_t bytes; /* number of bytes of current character, > 0 */ bool wc_valid; /* true if wc is a valid wide character */ wchar_t wc; /* if wc_valid: the current character */ char buf[MBCHAR_BUF_SIZE]; /* room for the bytes, used for file input only */ }; /* EOF (not a real character) is represented with bytes = 0 and wc_valid = false. */ typedef struct mbchar mbchar_t; /* Access the current character. */ #define mb_ptr(mbc) ((mbc).ptr) #define mb_len(mbc) ((mbc).bytes) /* Comparison of characters. */ #define mb_iseq(mbc, sc) ((mbc).wc_valid && (mbc).wc == (sc)) #define mb_isnul(mbc) ((mbc).wc_valid && (mbc).wc == 0) #define mb_cmp(mbc1, mbc2) \ ((mbc1).wc_valid \ ? ((mbc2).wc_valid \ ? (int) (mbc1).wc - (int) (mbc2).wc \ : -1) \ : ((mbc2).wc_valid \ ? 1 \ : (mbc1).bytes == (mbc2).bytes \ ? memcmp ((mbc1).ptr, (mbc2).ptr, (mbc1).bytes) \ : (mbc1).bytes < (mbc2).bytes \ ? (memcmp ((mbc1).ptr, (mbc2).ptr, (mbc1).bytes) > 0 ? 1 : -1) \ : (memcmp ((mbc1).ptr, (mbc2).ptr, (mbc2).bytes) >= 0 ? 1 : -1))) #define mb_casecmp(mbc1, mbc2) \ ((mbc1).wc_valid \ ? ((mbc2).wc_valid \ ? (int) towlower ((mbc1).wc) - (int) towlower ((mbc2).wc) \ : -1) \ : ((mbc2).wc_valid \ ? 1 \ : (mbc1).bytes == (mbc2).bytes \ ? memcmp ((mbc1).ptr, (mbc2).ptr, (mbc1).bytes) \ : (mbc1).bytes < (mbc2).bytes \ ? (memcmp ((mbc1).ptr, (mbc2).ptr, (mbc1).bytes) > 0 ? 1 : -1) \ : (memcmp ((mbc1).ptr, (mbc2).ptr, (mbc2).bytes) >= 0 ? 1 : -1))) #define mb_equal(mbc1, mbc2) \ ((mbc1).wc_valid && (mbc2).wc_valid \ ? (mbc1).wc == (mbc2).wc \ : (mbc1).bytes == (mbc2).bytes \ && memcmp ((mbc1).ptr, (mbc2).ptr, (mbc1).bytes) == 0) #define mb_caseequal(mbc1, mbc2) \ ((mbc1).wc_valid && (mbc2).wc_valid \ ? towlower ((mbc1).wc) == towlower ((mbc2).wc) \ : (mbc1).bytes == (mbc2).bytes \ && memcmp ((mbc1).ptr, (mbc2).ptr, (mbc1).bytes) == 0) /* , classification. */ #define mb_isascii(mbc) \ ((mbc).wc_valid && (mbc).wc >= 0 && (mbc).wc <= 127) #define mb_isalnum(mbc) ((mbc).wc_valid && iswalnum ((mbc).wc)) #define mb_isalpha(mbc) ((mbc).wc_valid && iswalpha ((mbc).wc)) #define mb_isblank(mbc) ((mbc).wc_valid && iswblank ((mbc).wc)) #define mb_iscntrl(mbc) ((mbc).wc_valid && iswcntrl ((mbc).wc)) #define mb_isdigit(mbc) ((mbc).wc_valid && iswdigit ((mbc).wc)) #define mb_isgraph(mbc) ((mbc).wc_valid && iswgraph ((mbc).wc)) #define mb_islower(mbc) ((mbc).wc_valid && iswlower ((mbc).wc)) #define mb_isprint(mbc) ((mbc).wc_valid && iswprint ((mbc).wc)) #define mb_ispunct(mbc) ((mbc).wc_valid && iswpunct ((mbc).wc)) #define mb_isspace(mbc) ((mbc).wc_valid && iswspace ((mbc).wc)) #define mb_isupper(mbc) ((mbc).wc_valid && iswupper ((mbc).wc)) #define mb_isxdigit(mbc) ((mbc).wc_valid && iswxdigit ((mbc).wc)) /* Extra function. */ /* Unprintable characters appear as a small box of width 1. */ #define MB_UNPRINTABLE_WIDTH 1 static inline int mb_width_aux (wint_t wc) { int w = wcwidth (wc); /* For unprintable characters, arbitrarily return 0 for control characters and MB_UNPRINTABLE_WIDTH otherwise. */ return (w >= 0 ? w : iswcntrl (wc) ? 0 : MB_UNPRINTABLE_WIDTH); } #define mb_width(mbc) \ ((mbc).wc_valid ? mb_width_aux ((mbc).wc) : MB_UNPRINTABLE_WIDTH) /* Output. */ #define mb_putc(mbc, stream) fwrite ((mbc).ptr, 1, (mbc).bytes, (stream)) /* Assignment. */ #define mb_setascii(mbc, sc) \ ((mbc)->ptr = (mbc)->buf, (mbc)->bytes = 1, (mbc)->wc_valid = 1, \ (mbc)->wc = (mbc)->buf[0] = (sc)) /* Copying a character. */ static inline void mb_copy (mbchar_t *new_mbc, const mbchar_t *old_mbc) { if (old_mbc->ptr == &old_mbc->buf[0]) { memcpy (&new_mbc->buf[0], &old_mbc->buf[0], old_mbc->bytes); new_mbc->ptr = &new_mbc->buf[0]; } else new_mbc->ptr = old_mbc->ptr; new_mbc->bytes = old_mbc->bytes; if ((new_mbc->wc_valid = old_mbc->wc_valid)) new_mbc->wc = old_mbc->wc; } /* is_basic(c) tests whether the single-byte character c is in the ISO C "basic character set". This is a convenience function, and is in this file only to share code between mbiter_multi.h and mbfile_multi.h. */ #if (' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \ && ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \ && (')' == 41) && ('*' == 42) && ('+' == 43) && (',' == 44) \ && ('-' == 45) && ('.' == 46) && ('/' == 47) && ('0' == 48) \ && ('1' == 49) && ('2' == 50) && ('3' == 51) && ('4' == 52) \ && ('5' == 53) && ('6' == 54) && ('7' == 55) && ('8' == 56) \ && ('9' == 57) && (':' == 58) && (';' == 59) && ('<' == 60) \ && ('=' == 61) && ('>' == 62) && ('?' == 63) && ('A' == 65) \ && ('B' == 66) && ('C' == 67) && ('D' == 68) && ('E' == 69) \ && ('F' == 70) && ('G' == 71) && ('H' == 72) && ('I' == 73) \ && ('J' == 74) && ('K' == 75) && ('L' == 76) && ('M' == 77) \ && ('N' == 78) && ('O' == 79) && ('P' == 80) && ('Q' == 81) \ && ('R' == 82) && ('S' == 83) && ('T' == 84) && ('U' == 85) \ && ('V' == 86) && ('W' == 87) && ('X' == 88) && ('Y' == 89) \ && ('Z' == 90) && ('[' == 91) && ('\\' == 92) && (']' == 93) \ && ('^' == 94) && ('_' == 95) && ('a' == 97) && ('b' == 98) \ && ('c' == 99) && ('d' == 100) && ('e' == 101) && ('f' == 102) \ && ('g' == 103) && ('h' == 104) && ('i' == 105) && ('j' == 106) \ && ('k' == 107) && ('l' == 108) && ('m' == 109) && ('n' == 110) \ && ('o' == 111) && ('p' == 112) && ('q' == 113) && ('r' == 114) \ && ('s' == 115) && ('t' == 116) && ('u' == 117) && ('v' == 118) \ && ('w' == 119) && ('x' == 120) && ('y' == 121) && ('z' == 122) \ && ('{' == 123) && ('|' == 124) && ('}' == 125) && ('~' == 126) /* The character set is ISO-646, not EBCDIC. */ # define IS_BASIC_ASCII 1 extern const unsigned int is_basic_table[]; static inline bool is_basic (char c) { return (is_basic_table [(unsigned char) c >> 5] >> ((unsigned char) c & 31)) & 1; } #else static inline bool is_basic (char c) { switch (c) { case '\t': case '\v': case '\f': case ' ': case '!': case '"': case '#': case '%': case '&': case '\'': case '(': case ')': case '*': case '+': case ',': case '-': case '.': case '/': case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': case ':': case ';': case '<': case '=': case '>': case '?': case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': case 'G': case 'H': case 'I': case 'J': case 'K': case 'L': case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R': case 'S': case 'T': case 'U': case 'V': case 'W': case 'X': case 'Y': case 'Z': case '[': case '\\': case ']': case '^': case '_': case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': case 'g': case 'h': case 'i': case 'j': case 'k': case 'l': case 'm': case 'n': case 'o': case 'p': case 'q': case 'r': case 's': case 't': case 'u': case 'v': case 'w': case 'x': case 'y': case 'z': case '{': case '|': case '}': case '~': return 1; default: return 0; } } #endif #endif /* _MBCHAR_H */ gnuit-4.9.5/lib/fcntl.in.h0000644000175000017500000000545311146671375012254 00000000000000/* Like , but with non-working flags defined to 0. Copyright (C) 2006-2008 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 3 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, see . */ /* written by Paul Eggert */ #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif #if defined __need_system_fcntl_h /* Special invocation convention. */ #include #include #include #@INCLUDE_NEXT@ @NEXT_FCNTL_H@ #else /* Normal invocation convention. */ #ifndef _GL_FCNTL_H #include #include #include /* The include_next requires a split double-inclusion guard. */ #@INCLUDE_NEXT@ @NEXT_FCNTL_H@ #ifndef _GL_FCNTL_H #define _GL_FCNTL_H /* Declare overridden functions. */ #ifdef __cplusplus extern "C" { #endif #if @GNULIB_OPEN@ # if @REPLACE_OPEN@ # undef open # define open rpl_open extern int open (const char *filename, int flags, ...); # endif #endif #ifdef FCHDIR_REPLACEMENT /* gnulib internal function. */ extern void _gl_register_fd (int fd, const char *filename); #endif #ifdef __cplusplus } #endif /* Fix up the O_* macros. */ #if !defined O_DIRECT && defined O_DIRECTIO /* Tru64 spells it `O_DIRECTIO'. */ # define O_DIRECT O_DIRECTIO #endif #ifndef O_DIRECT # define O_DIRECT 0 #endif #ifndef O_DIRECTORY # define O_DIRECTORY 0 #endif #ifndef O_DSYNC # define O_DSYNC 0 #endif #ifndef O_NDELAY # define O_NDELAY 0 #endif #ifndef O_NOATIME # define O_NOATIME 0 #endif #ifndef O_NONBLOCK # define O_NONBLOCK O_NDELAY #endif #ifndef O_NOCTTY # define O_NOCTTY 0 #endif #ifndef O_NOFOLLOW # define O_NOFOLLOW 0 #endif #ifndef O_NOLINKS # define O_NOLINKS 0 #endif #ifndef O_RSYNC # define O_RSYNC 0 #endif #ifndef O_SYNC # define O_SYNC 0 #endif /* For systems that distinguish between text and binary I/O. O_BINARY is usually declared in fcntl.h */ #if !defined O_BINARY && defined _O_BINARY /* For MSC-compatible compilers. */ # define O_BINARY _O_BINARY # define O_TEXT _O_TEXT #endif #if defined __BEOS__ || defined __HAIKU__ /* BeOS 5 and Haiku have O_BINARY and O_TEXT, but they have no effect. */ # undef O_BINARY # undef O_TEXT #endif #ifndef O_BINARY # define O_BINARY 0 # define O_TEXT 0 #endif #endif /* _GL_FCNTL_H */ #endif /* _GL_FCNTL_H */ #endif gnuit-4.9.5/lib/lstat.c0000644000175000017500000000526411146671375011663 00000000000000/* Work around a bug of lstat on some systems Copyright (C) 1997-1999, 2000-2006, 2008 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 3 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, see . */ /* written by Jim Meyering */ #include /* Get the original definition of open. It might be defined as a macro. */ #define __need_system_sys_stat_h #include #include #undef __need_system_sys_stat_h static inline int orig_lstat (const char *filename, struct stat *buf) { return lstat (filename, buf); } /* Specification. */ #include #include #include /* lstat works differently on Linux and Solaris systems. POSIX (see `pathname resolution' in the glossary) requires that programs like `ls' take into consideration the fact that FILE has a trailing slash when FILE is a symbolic link. On Linux and Solaris 10 systems, the lstat function already has the desired semantics (in treating `lstat ("symlink/", sbuf)' just like `lstat ("symlink/.", sbuf)', but on Solaris 9 and earlier it does not. If FILE has a trailing slash and specifies a symbolic link, then use stat() to get more info on the referent of FILE. If the referent is a non-directory, then set errno to ENOTDIR and return -1. Otherwise, return stat's result. */ int rpl_lstat (const char *file, struct stat *sbuf) { size_t len; int lstat_result = orig_lstat (file, sbuf); if (lstat_result != 0 || !S_ISLNK (sbuf->st_mode)) return lstat_result; len = strlen (file); if (len == 0 || file[len - 1] != '/') return 0; /* FILE refers to a symbolic link and the name ends with a slash. Call stat() to get info about the link's referent. */ /* If stat fails, then we do the same. */ if (stat (file, sbuf) != 0) return -1; /* If FILE references a directory, return 0. */ if (S_ISDIR (sbuf->st_mode)) return 0; /* Here, we know stat succeeded and FILE references a non-directory. But it was specified via a name including a trailing slash. Fail with errno set to ENOTDIR to indicate the contradiction. */ errno = ENOTDIR; return -1; } gnuit-4.9.5/lib/config.charset0000755000175000017500000005156611146671375013221 00000000000000#! /bin/sh # Output a system dependent table of character encoding aliases. # # Copyright (C) 2000-2004, 2006-2009 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 3, 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. # # The table consists of lines of the form # ALIAS CANONICAL # # ALIAS is the (system dependent) result of "nl_langinfo (CODESET)". # ALIAS is compared in a case sensitive way. # # CANONICAL is the GNU canonical name for this character encoding. # It must be an encoding supported by libiconv. Support by GNU libc is # also desirable. CANONICAL is case insensitive. Usually an upper case # MIME charset name is preferred. # The current list of GNU canonical charset names is as follows. # # name MIME? used by which systems # ASCII, ANSI_X3.4-1968 glibc solaris freebsd netbsd darwin # ISO-8859-1 Y glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin # ISO-8859-2 Y glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin # ISO-8859-3 Y glibc solaris # ISO-8859-4 Y osf solaris freebsd netbsd openbsd darwin # ISO-8859-5 Y glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin # ISO-8859-6 Y glibc aix hpux solaris # ISO-8859-7 Y glibc aix hpux irix osf solaris netbsd openbsd darwin # ISO-8859-8 Y glibc aix hpux osf solaris # ISO-8859-9 Y glibc aix hpux irix osf solaris darwin # ISO-8859-13 glibc netbsd openbsd darwin # ISO-8859-14 glibc # ISO-8859-15 glibc aix osf solaris freebsd netbsd openbsd darwin # KOI8-R Y glibc solaris freebsd netbsd openbsd darwin # KOI8-U Y glibc freebsd netbsd openbsd darwin # KOI8-T glibc # CP437 dos # CP775 dos # CP850 aix osf dos # CP852 dos # CP855 dos # CP856 aix # CP857 dos # CP861 dos # CP862 dos # CP864 dos # CP865 dos # CP866 freebsd netbsd openbsd darwin dos # CP869 dos # CP874 woe32 dos # CP922 aix # CP932 aix woe32 dos # CP943 aix # CP949 osf darwin woe32 dos # CP950 woe32 dos # CP1046 aix # CP1124 aix # CP1125 dos # CP1129 aix # CP1131 darwin # CP1250 woe32 # CP1251 glibc solaris netbsd openbsd darwin woe32 # CP1252 aix woe32 # CP1253 woe32 # CP1254 woe32 # CP1255 glibc woe32 # CP1256 woe32 # CP1257 woe32 # GB2312 Y glibc aix hpux irix solaris freebsd netbsd darwin # EUC-JP Y glibc aix hpux irix osf solaris freebsd netbsd darwin # EUC-KR Y glibc aix hpux irix osf solaris freebsd netbsd darwin # EUC-TW glibc aix hpux irix osf solaris netbsd # BIG5 Y glibc aix hpux osf solaris freebsd netbsd darwin # BIG5-HKSCS glibc solaris darwin # GBK glibc aix osf solaris darwin woe32 dos # GB18030 glibc solaris netbsd darwin # SHIFT_JIS Y hpux osf solaris freebsd netbsd darwin # JOHAB glibc solaris woe32 # TIS-620 glibc aix hpux osf solaris # VISCII Y glibc # TCVN5712-1 glibc # ARMSCII-8 glibc darwin # GEORGIAN-PS glibc # PT154 glibc # HP-ROMAN8 hpux # HP-ARABIC8 hpux # HP-GREEK8 hpux # HP-HEBREW8 hpux # HP-TURKISH8 hpux # HP-KANA8 hpux # DEC-KANJI osf # DEC-HANYU osf # UTF-8 Y glibc aix hpux osf solaris netbsd darwin # # Note: Names which are not marked as being a MIME name should not be used in # Internet protocols for information interchange (mail, news, etc.). # # Note: ASCII and ANSI_X3.4-1968 are synonymous canonical names. Applications # must understand both names and treat them as equivalent. # # The first argument passed to this file is the canonical host specification, # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM host="$1" os=`echo "$host" | sed -e 's/^[^-]*-[^-]*-\(.*\)$/\1/'` echo "# This file contains a table of character encoding aliases," echo "# suitable for operating system '${os}'." echo "# It was automatically generated from config.charset." # List of references, updated during installation: echo "# Packages using this file: " case "$os" in linux-gnulibc1*) # Linux libc5 doesn't have nl_langinfo(CODESET); therefore # localcharset.c falls back to using the full locale name # from the environment variables. echo "C ASCII" echo "POSIX ASCII" for l in af af_ZA ca ca_ES da da_DK de de_AT de_BE de_CH de_DE de_LU \ en en_AU en_BW en_CA en_DK en_GB en_IE en_NZ en_US en_ZA \ en_ZW es es_AR es_BO es_CL es_CO es_DO es_EC es_ES es_GT \ es_HN es_MX es_PA es_PE es_PY es_SV es_US es_UY es_VE et \ et_EE eu eu_ES fi fi_FI fo fo_FO fr fr_BE fr_CA fr_CH fr_FR \ fr_LU ga ga_IE gl gl_ES id id_ID in in_ID is is_IS it it_CH \ it_IT kl kl_GL nl nl_BE nl_NL no no_NO pt pt_BR pt_PT sv \ sv_FI sv_SE; do echo "$l ISO-8859-1" echo "$l.iso-8859-1 ISO-8859-1" echo "$l.iso-8859-15 ISO-8859-15" echo "$l.iso-8859-15@euro ISO-8859-15" echo "$l@euro ISO-8859-15" echo "$l.cp-437 CP437" echo "$l.cp-850 CP850" echo "$l.cp-1252 CP1252" echo "$l.cp-1252@euro CP1252" #echo "$l.atari-st ATARI-ST" # not a commonly used encoding echo "$l.utf-8 UTF-8" echo "$l.utf-8@euro UTF-8" done for l in cs cs_CZ hr hr_HR hu hu_HU pl pl_PL ro ro_RO sk sk_SK sl \ sl_SI sr sr_CS sr_YU; do echo "$l ISO-8859-2" echo "$l.iso-8859-2 ISO-8859-2" echo "$l.cp-852 CP852" echo "$l.cp-1250 CP1250" echo "$l.utf-8 UTF-8" done for l in mk mk_MK ru ru_RU; do echo "$l ISO-8859-5" echo "$l.iso-8859-5 ISO-8859-5" echo "$l.koi8-r KOI8-R" echo "$l.cp-866 CP866" echo "$l.cp-1251 CP1251" echo "$l.utf-8 UTF-8" done for l in ar ar_SA; do echo "$l ISO-8859-6" echo "$l.iso-8859-6 ISO-8859-6" echo "$l.cp-864 CP864" #echo "$l.cp-868 CP868" # not a commonly used encoding echo "$l.cp-1256 CP1256" echo "$l.utf-8 UTF-8" done for l in el el_GR gr gr_GR; do echo "$l ISO-8859-7" echo "$l.iso-8859-7 ISO-8859-7" echo "$l.cp-869 CP869" echo "$l.cp-1253 CP1253" echo "$l.cp-1253@euro CP1253" echo "$l.utf-8 UTF-8" echo "$l.utf-8@euro UTF-8" done for l in he he_IL iw iw_IL; do echo "$l ISO-8859-8" echo "$l.iso-8859-8 ISO-8859-8" echo "$l.cp-862 CP862" echo "$l.cp-1255 CP1255" echo "$l.utf-8 UTF-8" done for l in tr tr_TR; do echo "$l ISO-8859-9" echo "$l.iso-8859-9 ISO-8859-9" echo "$l.cp-857 CP857" echo "$l.cp-1254 CP1254" echo "$l.utf-8 UTF-8" done for l in lt lt_LT lv lv_LV; do #echo "$l BALTIC" # not a commonly used encoding, wrong encoding name echo "$l ISO-8859-13" done for l in ru_UA uk uk_UA; do echo "$l KOI8-U" done for l in zh zh_CN; do #echo "$l GB_2312-80" # not a commonly used encoding, wrong encoding name echo "$l GB2312" done for l in ja ja_JP ja_JP.EUC; do echo "$l EUC-JP" done for l in ko ko_KR; do echo "$l EUC-KR" done for l in th th_TH; do echo "$l TIS-620" done for l in fa fa_IR; do #echo "$l ISIRI-3342" # a broken encoding echo "$l.utf-8 UTF-8" done ;; linux* | *-gnu*) # With glibc-2.1 or newer, we don't need any canonicalization, # because glibc has iconv and both glibc and libiconv support all # GNU canonical names directly. Therefore, the Makefile does not # need to install the alias file at all. # The following applies only to glibc-2.0.x and older libcs. echo "ISO_646.IRV:1983 ASCII" ;; aix*) echo "ISO8859-1 ISO-8859-1" echo "ISO8859-2 ISO-8859-2" echo "ISO8859-5 ISO-8859-5" echo "ISO8859-6 ISO-8859-6" echo "ISO8859-7 ISO-8859-7" echo "ISO8859-8 ISO-8859-8" echo "ISO8859-9 ISO-8859-9" echo "ISO8859-15 ISO-8859-15" echo "IBM-850 CP850" echo "IBM-856 CP856" echo "IBM-921 ISO-8859-13" echo "IBM-922 CP922" echo "IBM-932 CP932" echo "IBM-943 CP943" echo "IBM-1046 CP1046" echo "IBM-1124 CP1124" echo "IBM-1129 CP1129" echo "IBM-1252 CP1252" echo "IBM-eucCN GB2312" echo "IBM-eucJP EUC-JP" echo "IBM-eucKR EUC-KR" echo "IBM-eucTW EUC-TW" echo "big5 BIG5" echo "GBK GBK" echo "TIS-620 TIS-620" echo "UTF-8 UTF-8" ;; hpux*) echo "iso88591 ISO-8859-1" echo "iso88592 ISO-8859-2" echo "iso88595 ISO-8859-5" echo "iso88596 ISO-8859-6" echo "iso88597 ISO-8859-7" echo "iso88598 ISO-8859-8" echo "iso88599 ISO-8859-9" echo "iso885915 ISO-8859-15" echo "roman8 HP-ROMAN8" echo "arabic8 HP-ARABIC8" echo "greek8 HP-GREEK8" echo "hebrew8 HP-HEBREW8" echo "turkish8 HP-TURKISH8" echo "kana8 HP-KANA8" echo "tis620 TIS-620" echo "big5 BIG5" echo "eucJP EUC-JP" echo "eucKR EUC-KR" echo "eucTW EUC-TW" echo "hp15CN GB2312" #echo "ccdc ?" # what is this? echo "SJIS SHIFT_JIS" echo "utf8 UTF-8" ;; irix*) echo "ISO8859-1 ISO-8859-1" echo "ISO8859-2 ISO-8859-2" echo "ISO8859-5 ISO-8859-5" echo "ISO8859-7 ISO-8859-7" echo "ISO8859-9 ISO-8859-9" echo "eucCN GB2312" echo "eucJP EUC-JP" echo "eucKR EUC-KR" echo "eucTW EUC-TW" ;; osf*) echo "ISO8859-1 ISO-8859-1" echo "ISO8859-2 ISO-8859-2" echo "ISO8859-4 ISO-8859-4" echo "ISO8859-5 ISO-8859-5" echo "ISO8859-7 ISO-8859-7" echo "ISO8859-8 ISO-8859-8" echo "ISO8859-9 ISO-8859-9" echo "ISO8859-15 ISO-8859-15" echo "cp850 CP850" echo "big5 BIG5" echo "dechanyu DEC-HANYU" echo "dechanzi GB2312" echo "deckanji DEC-KANJI" echo "deckorean EUC-KR" echo "eucJP EUC-JP" echo "eucKR EUC-KR" echo "eucTW EUC-TW" echo "GBK GBK" echo "KSC5601 CP949" echo "sdeckanji EUC-JP" echo "SJIS SHIFT_JIS" echo "TACTIS TIS-620" echo "UTF-8 UTF-8" ;; solaris*) echo "646 ASCII" echo "ISO8859-1 ISO-8859-1" echo "ISO8859-2 ISO-8859-2" echo "ISO8859-3 ISO-8859-3" echo "ISO8859-4 ISO-8859-4" echo "ISO8859-5 ISO-8859-5" echo "ISO8859-6 ISO-8859-6" echo "ISO8859-7 ISO-8859-7" echo "ISO8859-8 ISO-8859-8" echo "ISO8859-9 ISO-8859-9" echo "ISO8859-15 ISO-8859-15" echo "koi8-r KOI8-R" echo "ansi-1251 CP1251" echo "BIG5 BIG5" echo "Big5-HKSCS BIG5-HKSCS" echo "gb2312 GB2312" echo "GBK GBK" echo "GB18030 GB18030" echo "cns11643 EUC-TW" echo "5601 EUC-KR" echo "ko_KR.johap92 JOHAB" echo "eucJP EUC-JP" echo "PCK SHIFT_JIS" echo "TIS620.2533 TIS-620" #echo "sun_eu_greek ?" # what is this? echo "UTF-8 UTF-8" ;; freebsd* | os2*) # FreeBSD 4.2 doesn't have nl_langinfo(CODESET); therefore # localcharset.c falls back to using the full locale name # from the environment variables. # Likewise for OS/2. OS/2 has XFree86 just like FreeBSD. Just # reuse FreeBSD's locale data for OS/2. echo "C ASCII" echo "US-ASCII ASCII" for l in la_LN lt_LN; do echo "$l.ASCII ASCII" done for l in da_DK de_AT de_CH de_DE en_AU en_CA en_GB en_US es_ES \ fi_FI fr_BE fr_CA fr_CH fr_FR is_IS it_CH it_IT la_LN \ lt_LN nl_BE nl_NL no_NO pt_PT sv_SE; do echo "$l.ISO_8859-1 ISO-8859-1" echo "$l.DIS_8859-15 ISO-8859-15" done for l in cs_CZ hr_HR hu_HU la_LN lt_LN pl_PL sl_SI; do echo "$l.ISO_8859-2 ISO-8859-2" done for l in la_LN lt_LT; do echo "$l.ISO_8859-4 ISO-8859-4" done for l in ru_RU ru_SU; do echo "$l.KOI8-R KOI8-R" echo "$l.ISO_8859-5 ISO-8859-5" echo "$l.CP866 CP866" done echo "uk_UA.KOI8-U KOI8-U" echo "zh_TW.BIG5 BIG5" echo "zh_TW.Big5 BIG5" echo "zh_CN.EUC GB2312" echo "ja_JP.EUC EUC-JP" echo "ja_JP.SJIS SHIFT_JIS" echo "ja_JP.Shift_JIS SHIFT_JIS" echo "ko_KR.EUC EUC-KR" ;; netbsd*) echo "646 ASCII" echo "ISO8859-1 ISO-8859-1" echo "ISO8859-2 ISO-8859-2" echo "ISO8859-4 ISO-8859-4" echo "ISO8859-5 ISO-8859-5" echo "ISO8859-7 ISO-8859-7" echo "ISO8859-13 ISO-8859-13" echo "ISO8859-15 ISO-8859-15" echo "eucCN GB2312" echo "eucJP EUC-JP" echo "eucKR EUC-KR" echo "eucTW EUC-TW" echo "BIG5 BIG5" echo "SJIS SHIFT_JIS" ;; openbsd*) echo "646 ASCII" echo "ISO8859-1 ISO-8859-1" echo "ISO8859-2 ISO-8859-2" echo "ISO8859-4 ISO-8859-4" echo "ISO8859-5 ISO-8859-5" echo "ISO8859-7 ISO-8859-7" echo "ISO8859-13 ISO-8859-13" echo "ISO8859-15 ISO-8859-15" ;; darwin[56]*) # Darwin 6.8 doesn't have nl_langinfo(CODESET); therefore # localcharset.c falls back to using the full locale name # from the environment variables. echo "C ASCII" for l in en_AU en_CA en_GB en_US la_LN; do echo "$l.US-ASCII ASCII" done for l in da_DK de_AT de_CH de_DE en_AU en_CA en_GB en_US es_ES \ fi_FI fr_BE fr_CA fr_CH fr_FR is_IS it_CH it_IT nl_BE \ nl_NL no_NO pt_PT sv_SE; do echo "$l ISO-8859-1" echo "$l.ISO8859-1 ISO-8859-1" echo "$l.ISO8859-15 ISO-8859-15" done for l in la_LN; do echo "$l.ISO8859-1 ISO-8859-1" echo "$l.ISO8859-15 ISO-8859-15" done for l in cs_CZ hr_HR hu_HU la_LN pl_PL sl_SI; do echo "$l.ISO8859-2 ISO-8859-2" done for l in la_LN lt_LT; do echo "$l.ISO8859-4 ISO-8859-4" done for l in ru_RU; do echo "$l.KOI8-R KOI8-R" echo "$l.ISO8859-5 ISO-8859-5" echo "$l.CP866 CP866" done for l in bg_BG; do echo "$l.CP1251 CP1251" done echo "uk_UA.KOI8-U KOI8-U" echo "zh_TW.BIG5 BIG5" echo "zh_TW.Big5 BIG5" echo "zh_CN.EUC GB2312" echo "ja_JP.EUC EUC-JP" echo "ja_JP.SJIS SHIFT_JIS" echo "ko_KR.EUC EUC-KR" ;; darwin*) # Darwin 7.5 has nl_langinfo(CODESET), but sometimes its value is # useless: # - It returns the empty string when LANG is set to a locale of the # form ll_CC, although ll_CC/LC_CTYPE is a symlink to an UTF-8 # LC_CTYPE file. # - The environment variables LANG, LC_CTYPE, LC_ALL are not set by # the system; nl_langinfo(CODESET) returns "US-ASCII" in this case. # - The documentation says: # "... all code that calls BSD system routines should ensure # that the const *char parameters of these routines are in UTF-8 # encoding. All BSD system functions expect their string # parameters to be in UTF-8 encoding and nothing else." # It also says # "An additional caveat is that string parameters for files, # paths, and other file-system entities must be in canonical # UTF-8. In a canonical UTF-8 Unicode string, all decomposable # characters are decomposed ..." # but this is not true: You can pass non-decomposed UTF-8 strings # to file system functions, and it is the OS which will convert # them to decomposed UTF-8 before accessing the file system. # - The Apple Terminal application displays UTF-8 by default. # - However, other applications are free to use different encodings: # - xterm uses ISO-8859-1 by default. # - TextEdit uses MacRoman by default. # We prefer UTF-8 over decomposed UTF-8-MAC because one should # minimize the use of decomposed Unicode. Unfortunately, through the # Darwin file system, decomposed UTF-8 strings are leaked into user # space nevertheless. # Then there are also the locales with encodings other than US-ASCII # and UTF-8. These locales can be occasionally useful to users (e.g. # when grepping through ISO-8859-1 encoded text files), when all their # file names are in US-ASCII. echo "ISO8859-1 ISO-8859-1" echo "ISO8859-2 ISO-8859-2" echo "ISO8859-4 ISO-8859-4" echo "ISO8859-5 ISO-8859-5" echo "ISO8859-7 ISO-8859-7" echo "ISO8859-9 ISO-8859-9" echo "ISO8859-13 ISO-8859-13" echo "ISO8859-15 ISO-8859-15" echo "KOI8-R KOI8-R" echo "KOI8-U KOI8-U" echo "CP866 CP866" echo "CP949 CP949" echo "CP1131 CP1131" echo "CP1251 CP1251" echo "eucCN GB2312" echo "GB2312 GB2312" echo "eucJP EUC-JP" echo "eucKR EUC-KR" echo "Big5 BIG5" echo "Big5HKSCS BIG5-HKSCS" echo "GBK GBK" echo "GB18030 GB18030" echo "SJIS SHIFT_JIS" echo "ARMSCII-8 ARMSCII-8" echo "PT154 PT154" #echo "ISCII-DEV ?" echo "* UTF-8" ;; beos* | haiku*) # BeOS and Haiku have a single locale, and it has UTF-8 encoding. echo "* UTF-8" ;; msdosdjgpp*) # DJGPP 2.03 doesn't have nl_langinfo(CODESET); therefore # localcharset.c falls back to using the full locale name # from the environment variables. echo "#" echo "# The encodings given here may not all be correct." echo "# If you find that the encoding given for your language and" echo "# country is not the one your DOS machine actually uses, just" echo "# correct it in this file, and send a mail to" echo "# Juan Manuel Guerrero " echo "# and Bruno Haible ." echo "#" echo "C ASCII" # ISO-8859-1 languages echo "ca CP850" echo "ca_ES CP850" echo "da CP865" # not CP850 ?? echo "da_DK CP865" # not CP850 ?? echo "de CP850" echo "de_AT CP850" echo "de_CH CP850" echo "de_DE CP850" echo "en CP850" echo "en_AU CP850" # not CP437 ?? echo "en_CA CP850" echo "en_GB CP850" echo "en_NZ CP437" echo "en_US CP437" echo "en_ZA CP850" # not CP437 ?? echo "es CP850" echo "es_AR CP850" echo "es_BO CP850" echo "es_CL CP850" echo "es_CO CP850" echo "es_CR CP850" echo "es_CU CP850" echo "es_DO CP850" echo "es_EC CP850" echo "es_ES CP850" echo "es_GT CP850" echo "es_HN CP850" echo "es_MX CP850" echo "es_NI CP850" echo "es_PA CP850" echo "es_PY CP850" echo "es_PE CP850" echo "es_SV CP850" echo "es_UY CP850" echo "es_VE CP850" echo "et CP850" echo "et_EE CP850" echo "eu CP850" echo "eu_ES CP850" echo "fi CP850" echo "fi_FI CP850" echo "fr CP850" echo "fr_BE CP850" echo "fr_CA CP850" echo "fr_CH CP850" echo "fr_FR CP850" echo "ga CP850" echo "ga_IE CP850" echo "gd CP850" echo "gd_GB CP850" echo "gl CP850" echo "gl_ES CP850" echo "id CP850" # not CP437 ?? echo "id_ID CP850" # not CP437 ?? echo "is CP861" # not CP850 ?? echo "is_IS CP861" # not CP850 ?? echo "it CP850" echo "it_CH CP850" echo "it_IT CP850" echo "lt CP775" echo "lt_LT CP775" echo "lv CP775" echo "lv_LV CP775" echo "nb CP865" # not CP850 ?? echo "nb_NO CP865" # not CP850 ?? echo "nl CP850" echo "nl_BE CP850" echo "nl_NL CP850" echo "nn CP865" # not CP850 ?? echo "nn_NO CP865" # not CP850 ?? echo "no CP865" # not CP850 ?? echo "no_NO CP865" # not CP850 ?? echo "pt CP850" echo "pt_BR CP850" echo "pt_PT CP850" echo "sv CP850" echo "sv_SE CP850" # ISO-8859-2 languages echo "cs CP852" echo "cs_CZ CP852" echo "hr CP852" echo "hr_HR CP852" echo "hu CP852" echo "hu_HU CP852" echo "pl CP852" echo "pl_PL CP852" echo "ro CP852" echo "ro_RO CP852" echo "sk CP852" echo "sk_SK CP852" echo "sl CP852" echo "sl_SI CP852" echo "sq CP852" echo "sq_AL CP852" echo "sr CP852" # CP852 or CP866 or CP855 ?? echo "sr_CS CP852" # CP852 or CP866 or CP855 ?? echo "sr_YU CP852" # CP852 or CP866 or CP855 ?? # ISO-8859-3 languages echo "mt CP850" echo "mt_MT CP850" # ISO-8859-5 languages echo "be CP866" echo "be_BE CP866" echo "bg CP866" # not CP855 ?? echo "bg_BG CP866" # not CP855 ?? echo "mk CP866" # not CP855 ?? echo "mk_MK CP866" # not CP855 ?? echo "ru CP866" echo "ru_RU CP866" echo "uk CP1125" echo "uk_UA CP1125" # ISO-8859-6 languages echo "ar CP864" echo "ar_AE CP864" echo "ar_DZ CP864" echo "ar_EG CP864" echo "ar_IQ CP864" echo "ar_IR CP864" echo "ar_JO CP864" echo "ar_KW CP864" echo "ar_MA CP864" echo "ar_OM CP864" echo "ar_QA CP864" echo "ar_SA CP864" echo "ar_SY CP864" # ISO-8859-7 languages echo "el CP869" echo "el_GR CP869" # ISO-8859-8 languages echo "he CP862" echo "he_IL CP862" # ISO-8859-9 languages echo "tr CP857" echo "tr_TR CP857" # Japanese echo "ja CP932" echo "ja_JP CP932" # Chinese echo "zh_CN GBK" echo "zh_TW CP950" # not CP938 ?? # Korean echo "kr CP949" # not CP934 ?? echo "kr_KR CP949" # not CP934 ?? # Thai echo "th CP874" echo "th_TH CP874" # Other echo "eo CP850" echo "eo_EO CP850" ;; esac gnuit-4.9.5/lib/str-kmp.h0000644000175000017500000001133211146671375012127 00000000000000/* Substring search in a NUL terminated string of 'char' elements, using the Knuth-Morris-Pratt algorithm. Copyright (C) 2005-2008 Free Software Foundation, Inc. Written by Bruno Haible , 2005. 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 3, 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. */ /* Before including this file, you need to define: CANON_ELEMENT(c) A macro that canonicalizes an element right after it has been fetched from one of the two strings. The argument is an 'unsigned char'; the result must be an 'unsigned char' as well. */ /* Knuth-Morris-Pratt algorithm. See http://en.wikipedia.org/wiki/Knuth-Morris-Pratt_algorithm Return a boolean indicating success: Return true and set *RESULTP if the search was completed. Return false if it was aborted because not enough memory was available. */ static bool knuth_morris_pratt_unibyte (const char *haystack, const char *needle, const char **resultp) { size_t m = strlen (needle); /* Allocate the table. */ size_t *table = (size_t *) nmalloca (m, sizeof (size_t)); if (table == NULL) return false; /* Fill the table. For 0 < i < m: 0 < table[i] <= i is defined such that forall 0 < x < table[i]: needle[x..i-1] != needle[0..i-1-x], and table[i] is as large as possible with this property. This implies: 1) For 0 < i < m: If table[i] < i, needle[table[i]..i-1] = needle[0..i-1-table[i]]. 2) For 0 < i < m: rhaystack[0..i-1] == needle[0..i-1] and exists h, i <= h < m: rhaystack[h] != needle[h] implies forall 0 <= x < table[i]: rhaystack[x..x+m-1] != needle[0..m-1]. table[0] remains uninitialized. */ { size_t i, j; /* i = 1: Nothing to verify for x = 0. */ table[1] = 1; j = 0; for (i = 2; i < m; i++) { /* Here: j = i-1 - table[i-1]. The inequality needle[x..i-1] != needle[0..i-1-x] is known to hold for x < table[i-1], by induction. Furthermore, if j>0: needle[i-1-j..i-2] = needle[0..j-1]. */ unsigned char b = CANON_ELEMENT ((unsigned char) needle[i - 1]); for (;;) { /* Invariants: The inequality needle[x..i-1] != needle[0..i-1-x] is known to hold for x < i-1-j. Furthermore, if j>0: needle[i-1-j..i-2] = needle[0..j-1]. */ if (b == CANON_ELEMENT ((unsigned char) needle[j])) { /* Set table[i] := i-1-j. */ table[i] = i - ++j; break; } /* The inequality needle[x..i-1] != needle[0..i-1-x] also holds for x = i-1-j, because needle[i-1] != needle[j] = needle[i-1-x]. */ if (j == 0) { /* The inequality holds for all possible x. */ table[i] = i; break; } /* The inequality needle[x..i-1] != needle[0..i-1-x] also holds for i-1-j < x < i-1-j+table[j], because for these x: needle[x..i-2] = needle[x-(i-1-j)..j-1] != needle[0..j-1-(x-(i-1-j))] (by definition of table[j]) = needle[0..i-2-x], hence needle[x..i-1] != needle[0..i-1-x]. Furthermore needle[i-1-j+table[j]..i-2] = needle[table[j]..j-1] = needle[0..j-1-table[j]] (by definition of table[j]). */ j = j - table[j]; } /* Here: j = i - table[i]. */ } } /* Search, using the table to accelerate the processing. */ { size_t j; const char *rhaystack; const char *phaystack; *resultp = NULL; j = 0; rhaystack = haystack; phaystack = haystack; /* Invariant: phaystack = rhaystack + j. */ while (*phaystack != '\0') if (CANON_ELEMENT ((unsigned char) needle[j]) == CANON_ELEMENT ((unsigned char) *phaystack)) { j++; phaystack++; if (j == m) { /* The entire needle has been found. */ *resultp = rhaystack; break; } } else if (j > 0) { /* Found a match of needle[0..j-1], mismatch at needle[j]. */ rhaystack += table[j]; j -= table[j]; } else { /* Found a mismatch at needle[0] already. */ rhaystack++; phaystack++; } } freea (table); return true; } #undef CANON_ELEMENT gnuit-4.9.5/lib/Makefile.am0000644000175000017500000012352711146671375012427 00000000000000## DO NOT EDIT! GENERATED AUTOMATICALLY! ## Process this file with automake to produce Makefile.in. # Copyright (C) 2002-2009 Free Software Foundation, Inc. # # This file is free software, distributed under the terms of the GNU # General Public License. As a special exception to the GNU General # Public License, this file may be distributed as part of a program # that contains a configuration script generated by Autoconf, under # the same distribution terms as the rest of that program. # # Generated by gnulib-tool. # Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=. --no-libtool --macro-prefix=gl fnmatch fnmatch-gnu fsusage getopt human idcache mbsstr memmove mkstemp nanosleep putenv readlink rename strcase strcasestr utime xalloc AUTOMAKE_OPTIONS = 1.5 gnits subdir-objects SUBDIRS = noinst_HEADERS = noinst_LIBRARIES = noinst_LTLIBRARIES = EXTRA_DIST = BUILT_SOURCES = SUFFIXES = MOSTLYCLEANFILES = core *.stackdump MOSTLYCLEANDIRS = CLEANFILES = DISTCLEANFILES = MAINTAINERCLEANFILES = AM_CPPFLAGS = noinst_LIBRARIES += libgnu.a libgnu_a_SOURCES = libgnu_a_LIBADD = $(gl_LIBOBJS) libgnu_a_DEPENDENCIES = $(gl_LIBOBJS) EXTRA_libgnu_a_SOURCES = ## begin gnulib module alloca EXTRA_DIST += alloca.c EXTRA_libgnu_a_SOURCES += alloca.c libgnu_a_LIBADD += @ALLOCA@ libgnu_a_DEPENDENCIES += @ALLOCA@ ## end gnulib module alloca ## begin gnulib module alloca-opt BUILT_SOURCES += $(ALLOCA_H) # We need the following in order to create when the system # doesn't have one that works with the given compiler. alloca.h: alloca.in.h { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ cat $(srcdir)/alloca.in.h; \ } > $@-t mv -f $@-t $@ MOSTLYCLEANFILES += alloca.h alloca.h-t EXTRA_DIST += alloca.in.h ## end gnulib module alloca-opt ## begin gnulib module argmatch EXTRA_DIST += argmatch.c argmatch.h EXTRA_libgnu_a_SOURCES += argmatch.c ## end gnulib module argmatch ## begin gnulib module configmake # Retrieve values of the variables through 'configure' followed by # 'make', not directly through 'configure', so that a user who # sets some of these variables consistently on the 'make' command # line gets correct results. # # One advantage of this approach, compared to the classical # approach of adding -DLIBDIR=\"$(libdir)\" etc. to AM_CPPFLAGS, # is that it protects against the use of undefined variables. # If, say, $(libdir) is not set in the Makefile, LIBDIR is not # defined by this module, and code using LIBDIR gives a # compilation error. # # Another advantage is that 'make' output is shorter. # # Listed in the same order as the GNU makefile conventions. # The Automake-defined pkg* macros are appended, in the order # listed in the Automake 1.10a+ documentation. configmake.h: Makefile rm -f $@-t $@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ echo '#define PREFIX "$(prefix)"'; \ echo '#define EXEC_PREFIX "$(exec_prefix)"'; \ echo '#define BINDIR "$(bindir)"'; \ echo '#define SBINDIR "$(sbindir)"'; \ echo '#define LIBEXECDIR "$(libexecdir)"'; \ echo '#define DATAROOTDIR "$(datarootdir)"'; \ echo '#define DATADIR "$(datadir)"'; \ echo '#define SYSCONFDIR "$(sysconfdir)"'; \ echo '#define SHAREDSTATEDIR "$(sharedstatedir)"'; \ echo '#define LOCALSTATEDIR "$(localstatedir)"'; \ echo '#define INCLUDEDIR "$(includedir)"'; \ echo '#define OLDINCLUDEDIR "$(oldincludedir)"'; \ echo '#define DOCDIR "$(docdir)"'; \ echo '#define INFODIR "$(infodir)"'; \ echo '#define HTMLDIR "$(htmldir)"'; \ echo '#define DVIDIR "$(dvidir)"'; \ echo '#define PDFDIR "$(pdfdir)"'; \ echo '#define PSDIR "$(psdir)"'; \ echo '#define LIBDIR "$(libdir)"'; \ echo '#define LISPDIR "$(lispdir)"'; \ echo '#define LOCALEDIR "$(localedir)"'; \ echo '#define MANDIR "$(mandir)"'; \ echo '#define MANEXT "$(manext)"'; \ echo '#define PKGDATADIR "$(pkgdatadir)"'; \ echo '#define PKGINCLUDEDIR "$(pkgincludedir)"'; \ echo '#define PKGLIBDIR "$(pkglibdir)"'; \ echo '#define PKGLIBEXECDIR "$(pkglibexecdir)"'; \ } | sed '/""/d' > $@-t mv $@-t $@ BUILT_SOURCES += configmake.h CLEANFILES += configmake.h configmake.h-t ## end gnulib module configmake ## begin gnulib module dirname EXTRA_DIST += basename.c dirname.c dirname.h stripslash.c EXTRA_libgnu_a_SOURCES += basename.c dirname.c stripslash.c ## end gnulib module dirname ## begin gnulib module errno BUILT_SOURCES += $(ERRNO_H) # We need the following in order to create when the system # doesn't have one that is POSIX compliant. errno.h: errno.in.h rm -f $@-t $@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''NEXT_ERRNO_H''@|$(NEXT_ERRNO_H)|g' \ -e 's|@''EMULTIHOP_HIDDEN''@|$(EMULTIHOP_HIDDEN)|g' \ -e 's|@''EMULTIHOP_VALUE''@|$(EMULTIHOP_VALUE)|g' \ -e 's|@''ENOLINK_HIDDEN''@|$(ENOLINK_HIDDEN)|g' \ -e 's|@''ENOLINK_VALUE''@|$(ENOLINK_VALUE)|g' \ -e 's|@''EOVERFLOW_HIDDEN''@|$(EOVERFLOW_HIDDEN)|g' \ -e 's|@''EOVERFLOW_VALUE''@|$(EOVERFLOW_VALUE)|g' \ < $(srcdir)/errno.in.h; \ } > $@-t mv $@-t $@ MOSTLYCLEANFILES += errno.h errno.h-t EXTRA_DIST += errno.in.h ## end gnulib module errno ## begin gnulib module error EXTRA_DIST += error.c error.h EXTRA_libgnu_a_SOURCES += error.c ## end gnulib module error ## begin gnulib module exitfail EXTRA_DIST += exitfail.c exitfail.h EXTRA_libgnu_a_SOURCES += exitfail.c ## end gnulib module exitfail ## begin gnulib module fcntl BUILT_SOURCES += $(FCNTL_H) # We need the following in order to create when the system # doesn't have one that works with the given compiler. fcntl.h: fcntl.in.h rm -f $@-t $@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''NEXT_FCNTL_H''@|$(NEXT_FCNTL_H)|g' \ -e 's|@''GNULIB_OPEN''@|$(GNULIB_OPEN)|g' \ -e 's|@''REPLACE_OPEN''@|$(REPLACE_OPEN)|g' \ < $(srcdir)/fcntl.in.h; \ } > $@-t mv $@-t $@ MOSTLYCLEANFILES += fcntl.h fcntl.h-t EXTRA_DIST += fcntl.in.h ## end gnulib module fcntl ## begin gnulib module fnmatch BUILT_SOURCES += $(FNMATCH_H) # We need the following in order to create when the system # doesn't have one that supports the required API. fnmatch.h: fnmatch.in.h { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ cat $(srcdir)/fnmatch.in.h; \ } > $@-t mv -f $@-t $@ MOSTLYCLEANFILES += fnmatch.h fnmatch.h-t EXTRA_DIST += fnmatch.c fnmatch.in.h fnmatch_loop.c EXTRA_libgnu_a_SOURCES += fnmatch.c fnmatch_loop.c ## end gnulib module fnmatch ## begin gnulib module fsusage EXTRA_DIST += fsusage.c fsusage.h EXTRA_libgnu_a_SOURCES += fsusage.c ## end gnulib module fsusage ## begin gnulib module full-read libgnu_a_SOURCES += full-read.h full-read.c ## end gnulib module full-read ## begin gnulib module full-write libgnu_a_SOURCES += full-write.h full-write.c ## end gnulib module full-write ## begin gnulib module getopt BUILT_SOURCES += $(GETOPT_H) # We need the following in order to create when the system # doesn't have one that works with the given compiler. getopt.h: getopt.in.h { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ cat $(srcdir)/getopt.in.h; \ } > $@-t mv -f $@-t $@ MOSTLYCLEANFILES += getopt.h getopt.h-t EXTRA_DIST += getopt.c getopt.in.h getopt1.c getopt_int.h EXTRA_libgnu_a_SOURCES += getopt.c getopt1.c ## end gnulib module getopt ## begin gnulib module gettext-h libgnu_a_SOURCES += gettext.h ## end gnulib module gettext-h ## begin gnulib module gettime EXTRA_DIST += gettime.c EXTRA_libgnu_a_SOURCES += gettime.c ## end gnulib module gettime ## begin gnulib module gettimeofday EXTRA_DIST += gettimeofday.c EXTRA_libgnu_a_SOURCES += gettimeofday.c ## end gnulib module gettimeofday ## begin gnulib module human EXTRA_DIST += human.c human.h EXTRA_libgnu_a_SOURCES += human.c ## end gnulib module human ## begin gnulib module idcache EXTRA_DIST += idcache.c idcache.h EXTRA_libgnu_a_SOURCES += idcache.c ## end gnulib module idcache ## begin gnulib module intprops EXTRA_DIST += intprops.h ## end gnulib module intprops ## begin gnulib module inttypes BUILT_SOURCES += $(INTTYPES_H) # We need the following in order to create when the system # doesn't have one that works with the given compiler. inttypes.h: inttypes.in.h rm -f $@-t $@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's/@''HAVE_INTTYPES_H''@/$(HAVE_INTTYPES_H)/g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''NEXT_INTTYPES_H''@|$(NEXT_INTTYPES_H)|g' \ -e 's/@''PRI_MACROS_BROKEN''@/$(PRI_MACROS_BROKEN)/g' \ -e 's/@''APPLE_UNIVERSAL_BUILD''@/$(APPLE_UNIVERSAL_BUILD)/g' \ -e 's/@''HAVE_LONG_LONG_INT''@/$(HAVE_LONG_LONG_INT)/g' \ -e 's/@''HAVE_UNSIGNED_LONG_LONG_INT''@/$(HAVE_UNSIGNED_LONG_LONG_INT)/g' \ -e 's/@''PRIPTR_PREFIX''@/$(PRIPTR_PREFIX)/g' \ -e 's/@''GNULIB_IMAXABS''@/$(GNULIB_IMAXABS)/g' \ -e 's/@''GNULIB_IMAXDIV''@/$(GNULIB_IMAXDIV)/g' \ -e 's/@''GNULIB_STRTOIMAX''@/$(GNULIB_STRTOIMAX)/g' \ -e 's/@''GNULIB_STRTOUMAX''@/$(GNULIB_STRTOUMAX)/g' \ -e 's/@''HAVE_DECL_IMAXABS''@/$(HAVE_DECL_IMAXABS)/g' \ -e 's/@''HAVE_DECL_IMAXDIV''@/$(HAVE_DECL_IMAXDIV)/g' \ -e 's/@''HAVE_DECL_STRTOIMAX''@/$(HAVE_DECL_STRTOIMAX)/g' \ -e 's/@''HAVE_DECL_STRTOUMAX''@/$(HAVE_DECL_STRTOUMAX)/g' \ -e 's/@''INT32_MAX_LT_INTMAX_MAX''@/$(INT32_MAX_LT_INTMAX_MAX)/g' \ -e 's/@''INT64_MAX_EQ_LONG_MAX''@/$(INT64_MAX_EQ_LONG_MAX)/g' \ -e 's/@''UINT32_MAX_LT_UINTMAX_MAX''@/$(UINT32_MAX_LT_UINTMAX_MAX)/g' \ -e 's/@''UINT64_MAX_EQ_ULONG_MAX''@/$(UINT64_MAX_EQ_ULONG_MAX)/g' \ -e '/definition of GL_LINK_WARNING/r $(LINK_WARNING_H)' \ < $(srcdir)/inttypes.in.h; \ } > $@-t mv $@-t $@ MOSTLYCLEANFILES += inttypes.h inttypes.h-t EXTRA_DIST += inttypes.in.h ## end gnulib module inttypes ## begin gnulib module link-warning LINK_WARNING_H=$(top_srcdir)/./link-warning.h EXTRA_DIST += $(top_srcdir)/./link-warning.h ## end gnulib module link-warning ## begin gnulib module localcharset libgnu_a_SOURCES += localcharset.h localcharset.c # We need the following in order to install a simple file in $(libdir) # which is shared with other installed packages. We use a list of referencing # packages so that "make uninstall" will remove the file if and only if it # is not used by another installed package. # On systems with glibc-2.1 or newer, the file is redundant, therefore we # avoid installing it. all-local: charset.alias ref-add.sed ref-del.sed charset_alias = $(DESTDIR)$(libdir)/charset.alias charset_tmp = $(DESTDIR)$(libdir)/charset.tmp install-exec-local: all-local if test $(GLIBC21) = no; then \ case '$(host_os)' in \ darwin[56]*) \ need_charset_alias=true ;; \ darwin* | cygwin* | mingw* | pw32* | cegcc*) \ need_charset_alias=false ;; \ *) \ need_charset_alias=true ;; \ esac ; \ else \ need_charset_alias=false ; \ fi ; \ if $$need_charset_alias; then \ $(mkinstalldirs) $(DESTDIR)$(libdir) ; \ fi ; \ if test -f $(charset_alias); then \ sed -f ref-add.sed $(charset_alias) > $(charset_tmp) ; \ $(INSTALL_DATA) $(charset_tmp) $(charset_alias) ; \ rm -f $(charset_tmp) ; \ else \ if $$need_charset_alias; then \ sed -f ref-add.sed charset.alias > $(charset_tmp) ; \ $(INSTALL_DATA) $(charset_tmp) $(charset_alias) ; \ rm -f $(charset_tmp) ; \ fi ; \ fi uninstall-local: all-local if test -f $(charset_alias); then \ sed -f ref-del.sed $(charset_alias) > $(charset_tmp); \ if grep '^# Packages using this file: $$' $(charset_tmp) \ > /dev/null; then \ rm -f $(charset_alias); \ else \ $(INSTALL_DATA) $(charset_tmp) $(charset_alias); \ fi; \ rm -f $(charset_tmp); \ fi charset.alias: config.charset rm -f t-$@ $@ $(SHELL) $(srcdir)/config.charset '$(host)' > t-$@ mv t-$@ $@ SUFFIXES += .sed .sin .sin.sed: rm -f t-$@ $@ sed -e '/^#/d' -e 's/@''PACKAGE''@/$(PACKAGE)/g' $< > t-$@ mv t-$@ $@ CLEANFILES += charset.alias ref-add.sed ref-del.sed EXTRA_DIST += config.charset ref-add.sin ref-del.sin ## end gnulib module localcharset ## begin gnulib module lstat EXTRA_DIST += lstat.c EXTRA_libgnu_a_SOURCES += lstat.c ## end gnulib module lstat ## begin gnulib module malloc-posix EXTRA_DIST += malloc.c EXTRA_libgnu_a_SOURCES += malloc.c ## end gnulib module malloc-posix ## begin gnulib module malloca libgnu_a_SOURCES += malloca.c EXTRA_DIST += malloca.h malloca.valgrind ## end gnulib module malloca ## begin gnulib module mbchar libgnu_a_SOURCES += mbchar.c EXTRA_DIST += mbchar.h ## end gnulib module mbchar ## begin gnulib module mbrtowc EXTRA_DIST += mbrtowc.c EXTRA_libgnu_a_SOURCES += mbrtowc.c ## end gnulib module mbrtowc ## begin gnulib module mbsinit EXTRA_DIST += mbsinit.c EXTRA_libgnu_a_SOURCES += mbsinit.c ## end gnulib module mbsinit ## begin gnulib module mbslen libgnu_a_SOURCES += mbslen.c ## end gnulib module mbslen ## begin gnulib module mbsstr libgnu_a_SOURCES += mbsstr.c EXTRA_DIST += str-kmp.h ## end gnulib module mbsstr ## begin gnulib module mbuiter libgnu_a_SOURCES += mbuiter.h ## end gnulib module mbuiter ## begin gnulib module memmove EXTRA_DIST += memmove.c EXTRA_libgnu_a_SOURCES += memmove.c ## end gnulib module memmove ## begin gnulib module mkstemp EXTRA_DIST += mkstemp.c EXTRA_libgnu_a_SOURCES += mkstemp.c ## end gnulib module mkstemp ## begin gnulib module nanosleep EXTRA_DIST += nanosleep.c EXTRA_libgnu_a_SOURCES += nanosleep.c ## end gnulib module nanosleep ## begin gnulib module open EXTRA_DIST += open.c EXTRA_libgnu_a_SOURCES += open.c ## end gnulib module open ## begin gnulib module putenv EXTRA_DIST += putenv.c EXTRA_libgnu_a_SOURCES += putenv.c ## end gnulib module putenv ## begin gnulib module quote EXTRA_DIST += quote.c quote.h EXTRA_libgnu_a_SOURCES += quote.c ## end gnulib module quote ## begin gnulib module quotearg EXTRA_DIST += quotearg.c quotearg.h EXTRA_libgnu_a_SOURCES += quotearg.c ## end gnulib module quotearg ## begin gnulib module readlink EXTRA_DIST += readlink.c EXTRA_libgnu_a_SOURCES += readlink.c ## end gnulib module readlink ## begin gnulib module rename EXTRA_DIST += rename.c EXTRA_libgnu_a_SOURCES += rename.c ## end gnulib module rename ## begin gnulib module safe-read EXTRA_DIST += safe-read.c safe-read.h EXTRA_libgnu_a_SOURCES += safe-read.c ## end gnulib module safe-read ## begin gnulib module safe-write EXTRA_DIST += safe-write.c safe-write.h EXTRA_libgnu_a_SOURCES += safe-write.c ## end gnulib module safe-write ## begin gnulib module sigaction EXTRA_DIST += sig-handler.h sigaction.c EXTRA_libgnu_a_SOURCES += sigaction.c ## end gnulib module sigaction ## begin gnulib module signal BUILT_SOURCES += signal.h # We need the following in order to create when the system # doesn't have a complete one. signal.h: signal.in.h rm -f $@-t $@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''NEXT_SIGNAL_H''@|$(NEXT_SIGNAL_H)|g' \ -e 's|@''GNULIB_SIGNAL_H_SIGPIPE''@|$(GNULIB_SIGNAL_H_SIGPIPE)|g' \ -e 's|@''GNULIB_SIGPROCMASK''@|$(GNULIB_SIGPROCMASK)|g' \ -e 's|@''GNULIB_SIGACTION''@|$(GNULIB_SIGACTION)|g' \ -e 's|@''HAVE_POSIX_SIGNALBLOCKING''@|$(HAVE_POSIX_SIGNALBLOCKING)|g' \ -e 's|@''HAVE_SIGSET_T''@|$(HAVE_SIGSET_T)|g' \ -e 's|@''HAVE_SIGINFO_T''@|$(HAVE_SIGINFO_T)|g' \ -e 's|@''HAVE_SIGACTION''@|$(HAVE_SIGACTION)|g' \ -e 's|@''HAVE_STRUCT_SIGACTION_SA_SIGACTION''@|$(HAVE_STRUCT_SIGACTION_SA_SIGACTION)|g' \ -e '/definition of GL_LINK_WARNING/r $(LINK_WARNING_H)' \ < $(srcdir)/signal.in.h; \ } > $@-t mv $@-t $@ MOSTLYCLEANFILES += signal.h signal.h-t EXTRA_DIST += signal.in.h ## end gnulib module signal ## begin gnulib module sigprocmask EXTRA_DIST += sigprocmask.c EXTRA_libgnu_a_SOURCES += sigprocmask.c ## end gnulib module sigprocmask ## begin gnulib module stdbool BUILT_SOURCES += $(STDBOOL_H) # We need the following in order to create when the system # doesn't have one that works. stdbool.h: stdbool.in.h rm -f $@-t $@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's/@''HAVE__BOOL''@/$(HAVE__BOOL)/g' < $(srcdir)/stdbool.in.h; \ } > $@-t mv $@-t $@ MOSTLYCLEANFILES += stdbool.h stdbool.h-t EXTRA_DIST += stdbool.in.h ## end gnulib module stdbool ## begin gnulib module stdint BUILT_SOURCES += $(STDINT_H) # We need the following in order to create when the system # doesn't have one that works with the given compiler. stdint.h: stdint.in.h rm -f $@-t $@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's/@''HAVE_STDINT_H''@/$(HAVE_STDINT_H)/g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''NEXT_STDINT_H''@|$(NEXT_STDINT_H)|g' \ -e 's/@''HAVE_SYS_TYPES_H''@/$(HAVE_SYS_TYPES_H)/g' \ -e 's/@''HAVE_INTTYPES_H''@/$(HAVE_INTTYPES_H)/g' \ -e 's/@''HAVE_SYS_INTTYPES_H''@/$(HAVE_SYS_INTTYPES_H)/g' \ -e 's/@''HAVE_SYS_BITYPES_H''@/$(HAVE_SYS_BITYPES_H)/g' \ -e 's/@''HAVE_LONG_LONG_INT''@/$(HAVE_LONG_LONG_INT)/g' \ -e 's/@''HAVE_UNSIGNED_LONG_LONG_INT''@/$(HAVE_UNSIGNED_LONG_LONG_INT)/g' \ -e 's/@''APPLE_UNIVERSAL_BUILD''@/$(APPLE_UNIVERSAL_BUILD)/g' \ -e 's/@''BITSIZEOF_PTRDIFF_T''@/$(BITSIZEOF_PTRDIFF_T)/g' \ -e 's/@''PTRDIFF_T_SUFFIX''@/$(PTRDIFF_T_SUFFIX)/g' \ -e 's/@''BITSIZEOF_SIG_ATOMIC_T''@/$(BITSIZEOF_SIG_ATOMIC_T)/g' \ -e 's/@''HAVE_SIGNED_SIG_ATOMIC_T''@/$(HAVE_SIGNED_SIG_ATOMIC_T)/g' \ -e 's/@''SIG_ATOMIC_T_SUFFIX''@/$(SIG_ATOMIC_T_SUFFIX)/g' \ -e 's/@''BITSIZEOF_SIZE_T''@/$(BITSIZEOF_SIZE_T)/g' \ -e 's/@''SIZE_T_SUFFIX''@/$(SIZE_T_SUFFIX)/g' \ -e 's/@''BITSIZEOF_WCHAR_T''@/$(BITSIZEOF_WCHAR_T)/g' \ -e 's/@''HAVE_SIGNED_WCHAR_T''@/$(HAVE_SIGNED_WCHAR_T)/g' \ -e 's/@''WCHAR_T_SUFFIX''@/$(WCHAR_T_SUFFIX)/g' \ -e 's/@''BITSIZEOF_WINT_T''@/$(BITSIZEOF_WINT_T)/g' \ -e 's/@''HAVE_SIGNED_WINT_T''@/$(HAVE_SIGNED_WINT_T)/g' \ -e 's/@''WINT_T_SUFFIX''@/$(WINT_T_SUFFIX)/g' \ < $(srcdir)/stdint.in.h; \ } > $@-t mv $@-t $@ MOSTLYCLEANFILES += stdint.h stdint.h-t EXTRA_DIST += stdint.in.h ## end gnulib module stdint ## begin gnulib module stdlib BUILT_SOURCES += stdlib.h # We need the following in order to create when the system # doesn't have one that works with the given compiler. stdlib.h: stdlib.in.h rm -f $@-t $@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''NEXT_STDLIB_H''@|$(NEXT_STDLIB_H)|g' \ -e 's|@''HAVE_RANDOM_H''@|$(HAVE_RANDOM_H)|g' \ -e 's|@''GNULIB_MALLOC_POSIX''@|$(GNULIB_MALLOC_POSIX)|g' \ -e 's|@''GNULIB_REALLOC_POSIX''@|$(GNULIB_REALLOC_POSIX)|g' \ -e 's|@''GNULIB_CALLOC_POSIX''@|$(GNULIB_CALLOC_POSIX)|g' \ -e 's|@''GNULIB_ATOLL''@|$(GNULIB_ATOLL)|g' \ -e 's|@''GNULIB_GETLOADAVG''@|$(GNULIB_GETLOADAVG)|g' \ -e 's|@''GNULIB_GETSUBOPT''@|$(GNULIB_GETSUBOPT)|g' \ -e 's|@''GNULIB_MKDTEMP''@|$(GNULIB_MKDTEMP)|g' \ -e 's|@''GNULIB_MKSTEMP''@|$(GNULIB_MKSTEMP)|g' \ -e 's|@''GNULIB_PUTENV''@|$(GNULIB_PUTENV)|g' \ -e 's|@''GNULIB_RANDOM_R''@|$(GNULIB_RANDOM_R)|g' \ -e 's|@''GNULIB_RPMATCH''@|$(GNULIB_RPMATCH)|g' \ -e 's|@''GNULIB_SETENV''@|$(GNULIB_SETENV)|g' \ -e 's|@''GNULIB_STRTOD''@|$(GNULIB_STRTOD)|g' \ -e 's|@''GNULIB_STRTOLL''@|$(GNULIB_STRTOLL)|g' \ -e 's|@''GNULIB_STRTOULL''@|$(GNULIB_STRTOULL)|g' \ -e 's|@''GNULIB_UNSETENV''@|$(GNULIB_UNSETENV)|g' \ -e 's|@''HAVE_ATOLL''@|$(HAVE_ATOLL)|g' \ -e 's|@''HAVE_CALLOC_POSIX''@|$(HAVE_CALLOC_POSIX)|g' \ -e 's|@''HAVE_GETSUBOPT''@|$(HAVE_GETSUBOPT)|g' \ -e 's|@''HAVE_MALLOC_POSIX''@|$(HAVE_MALLOC_POSIX)|g' \ -e 's|@''HAVE_MKDTEMP''@|$(HAVE_MKDTEMP)|g' \ -e 's|@''HAVE_REALLOC_POSIX''@|$(HAVE_REALLOC_POSIX)|g' \ -e 's|@''HAVE_RANDOM_R''@|$(HAVE_RANDOM_R)|g' \ -e 's|@''HAVE_RPMATCH''@|$(HAVE_RPMATCH)|g' \ -e 's|@''HAVE_SETENV''@|$(HAVE_SETENV)|g' \ -e 's|@''HAVE_STRTOD''@|$(HAVE_STRTOD)|g' \ -e 's|@''HAVE_STRTOLL''@|$(HAVE_STRTOLL)|g' \ -e 's|@''HAVE_STRTOULL''@|$(HAVE_STRTOULL)|g' \ -e 's|@''HAVE_STRUCT_RANDOM_DATA''@|$(HAVE_STRUCT_RANDOM_DATA)|g' \ -e 's|@''HAVE_SYS_LOADAVG_H''@|$(HAVE_SYS_LOADAVG_H)|g' \ -e 's|@''HAVE_UNSETENV''@|$(HAVE_UNSETENV)|g' \ -e 's|@''HAVE_DECL_GETLOADAVG''@|$(HAVE_DECL_GETLOADAVG)|g' \ -e 's|@''REPLACE_MKSTEMP''@|$(REPLACE_MKSTEMP)|g' \ -e 's|@''REPLACE_PUTENV''@|$(REPLACE_PUTENV)|g' \ -e 's|@''REPLACE_STRTOD''@|$(REPLACE_STRTOD)|g' \ -e 's|@''VOID_UNSETENV''@|$(VOID_UNSETENV)|g' \ -e '/definition of GL_LINK_WARNING/r $(LINK_WARNING_H)' \ < $(srcdir)/stdlib.in.h; \ } > $@-t mv $@-t $@ MOSTLYCLEANFILES += stdlib.h stdlib.h-t EXTRA_DIST += stdlib.in.h ## end gnulib module stdlib ## begin gnulib module strcase EXTRA_DIST += strcasecmp.c strncasecmp.c EXTRA_libgnu_a_SOURCES += strcasecmp.c strncasecmp.c ## end gnulib module strcase ## begin gnulib module strcasestr-simple EXTRA_DIST += str-two-way.h strcasestr.c EXTRA_libgnu_a_SOURCES += strcasestr.c ## end gnulib module strcasestr-simple ## begin gnulib module streq EXTRA_DIST += streq.h ## end gnulib module streq ## begin gnulib module strerror EXTRA_DIST += strerror.c EXTRA_libgnu_a_SOURCES += strerror.c ## end gnulib module strerror ## begin gnulib module string BUILT_SOURCES += string.h # We need the following in order to create when the system # doesn't have one that works with the given compiler. string.h: string.in.h rm -f $@-t $@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''NEXT_STRING_H''@|$(NEXT_STRING_H)|g' \ -e 's|@''GNULIB_MBSLEN''@|$(GNULIB_MBSLEN)|g' \ -e 's|@''GNULIB_MBSNLEN''@|$(GNULIB_MBSNLEN)|g' \ -e 's|@''GNULIB_MBSCHR''@|$(GNULIB_MBSCHR)|g' \ -e 's|@''GNULIB_MBSRCHR''@|$(GNULIB_MBSRCHR)|g' \ -e 's|@''GNULIB_MBSSTR''@|$(GNULIB_MBSSTR)|g' \ -e 's|@''GNULIB_MBSCASECMP''@|$(GNULIB_MBSCASECMP)|g' \ -e 's|@''GNULIB_MBSNCASECMP''@|$(GNULIB_MBSNCASECMP)|g' \ -e 's|@''GNULIB_MBSPCASECMP''@|$(GNULIB_MBSPCASECMP)|g' \ -e 's|@''GNULIB_MBSCASESTR''@|$(GNULIB_MBSCASESTR)|g' \ -e 's|@''GNULIB_MBSCSPN''@|$(GNULIB_MBSCSPN)|g' \ -e 's|@''GNULIB_MBSPBRK''@|$(GNULIB_MBSPBRK)|g' \ -e 's|@''GNULIB_MBSSPN''@|$(GNULIB_MBSSPN)|g' \ -e 's|@''GNULIB_MBSSEP''@|$(GNULIB_MBSSEP)|g' \ -e 's|@''GNULIB_MBSTOK_R''@|$(GNULIB_MBSTOK_R)|g' \ -e 's|@''GNULIB_MEMMEM''@|$(GNULIB_MEMMEM)|g' \ -e 's|@''GNULIB_MEMPCPY''@|$(GNULIB_MEMPCPY)|g' \ -e 's|@''GNULIB_MEMRCHR''@|$(GNULIB_MEMRCHR)|g' \ -e 's|@''GNULIB_RAWMEMCHR''@|$(GNULIB_RAWMEMCHR)|g' \ -e 's|@''GNULIB_STPCPY''@|$(GNULIB_STPCPY)|g' \ -e 's|@''GNULIB_STPNCPY''@|$(GNULIB_STPNCPY)|g' \ -e 's|@''GNULIB_STRCHRNUL''@|$(GNULIB_STRCHRNUL)|g' \ -e 's|@''GNULIB_STRDUP''@|$(GNULIB_STRDUP)|g' \ -e 's|@''GNULIB_STRNDUP''@|$(GNULIB_STRNDUP)|g' \ -e 's|@''GNULIB_STRNLEN''@|$(GNULIB_STRNLEN)|g' \ -e 's|@''GNULIB_STRPBRK''@|$(GNULIB_STRPBRK)|g' \ -e 's|@''GNULIB_STRSEP''@|$(GNULIB_STRSEP)|g' \ -e 's|@''GNULIB_STRSTR''@|$(GNULIB_STRSTR)|g' \ -e 's|@''GNULIB_STRCASESTR''@|$(GNULIB_STRCASESTR)|g' \ -e 's|@''GNULIB_STRTOK_R''@|$(GNULIB_STRTOK_R)|g' \ -e 's|@''GNULIB_STRERROR''@|$(GNULIB_STRERROR)|g' \ -e 's|@''GNULIB_STRSIGNAL''@|$(GNULIB_STRSIGNAL)|g' \ -e 's|@''GNULIB_STRVERSCMP''@|$(GNULIB_STRVERSCMP)|g' \ -e 's|@''HAVE_DECL_MEMMEM''@|$(HAVE_DECL_MEMMEM)|g' \ -e 's|@''HAVE_MEMPCPY''@|$(HAVE_MEMPCPY)|g' \ -e 's|@''HAVE_DECL_MEMRCHR''@|$(HAVE_DECL_MEMRCHR)|g' \ -e 's|@''HAVE_RAWMEMCHR''@|$(HAVE_RAWMEMCHR)|g' \ -e 's|@''HAVE_STPCPY''@|$(HAVE_STPCPY)|g' \ -e 's|@''HAVE_STPNCPY''@|$(HAVE_STPNCPY)|g' \ -e 's|@''HAVE_STRCHRNUL''@|$(HAVE_STRCHRNUL)|g' \ -e 's|@''HAVE_DECL_STRDUP''@|$(HAVE_DECL_STRDUP)|g' \ -e 's|@''HAVE_STRNDUP''@|$(HAVE_STRNDUP)|g' \ -e 's|@''HAVE_DECL_STRNDUP''@|$(HAVE_DECL_STRNDUP)|g' \ -e 's|@''HAVE_DECL_STRNLEN''@|$(HAVE_DECL_STRNLEN)|g' \ -e 's|@''HAVE_STRPBRK''@|$(HAVE_STRPBRK)|g' \ -e 's|@''HAVE_STRSEP''@|$(HAVE_STRSEP)|g' \ -e 's|@''HAVE_STRCASESTR''@|$(HAVE_STRCASESTR)|g' \ -e 's|@''HAVE_DECL_STRTOK_R''@|$(HAVE_DECL_STRTOK_R)|g' \ -e 's|@''HAVE_DECL_STRERROR''@|$(HAVE_DECL_STRERROR)|g' \ -e 's|@''HAVE_DECL_STRSIGNAL''@|$(HAVE_DECL_STRSIGNAL)|g' \ -e 's|@''HAVE_STRVERSCMP''@|$(HAVE_STRVERSCMP)|g' \ -e 's|@''REPLACE_MEMMEM''@|$(REPLACE_MEMMEM)|g' \ -e 's|@''REPLACE_STRCASESTR''@|$(REPLACE_STRCASESTR)|g' \ -e 's|@''REPLACE_STRDUP''@|$(REPLACE_STRDUP)|g' \ -e 's|@''REPLACE_STRSTR''@|$(REPLACE_STRSTR)|g' \ -e 's|@''REPLACE_STRERROR''@|$(REPLACE_STRERROR)|g' \ -e 's|@''REPLACE_STRSIGNAL''@|$(REPLACE_STRSIGNAL)|g' \ -e '/definition of GL_LINK_WARNING/r $(LINK_WARNING_H)' \ < $(srcdir)/string.in.h; \ } > $@-t mv $@-t $@ MOSTLYCLEANFILES += string.h string.h-t EXTRA_DIST += string.in.h ## end gnulib module string ## begin gnulib module strings BUILT_SOURCES += strings.h # We need the following in order to create when the system # doesn't have one that works with the given compiler. strings.h: strings.in.h rm -f $@-t $@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''NEXT_STRINGS_H''@|$(NEXT_STRINGS_H)|g' \ -e 's|@''HAVE_STRCASECMP''@|$(HAVE_STRCASECMP)|g' \ -e 's|@''HAVE_DECL_STRNCASECMP''@|$(HAVE_DECL_STRNCASECMP)|g' \ -e '/definition of GL_LINK_WARNING/r $(LINK_WARNING_H)' \ < $(srcdir)/strings.in.h; \ } > $@-t mv $@-t $@ MOSTLYCLEANFILES += strings.h strings.h-t EXTRA_DIST += strings.in.h ## end gnulib module strings ## begin gnulib module strndup EXTRA_DIST += strndup.c EXTRA_libgnu_a_SOURCES += strndup.c ## end gnulib module strndup ## begin gnulib module strnlen EXTRA_DIST += strnlen.c EXTRA_libgnu_a_SOURCES += strnlen.c ## end gnulib module strnlen ## begin gnulib module strnlen1 libgnu_a_SOURCES += strnlen1.h strnlen1.c ## end gnulib module strnlen1 ## begin gnulib module strtoimax EXTRA_DIST += strtoimax.c EXTRA_libgnu_a_SOURCES += strtoimax.c ## end gnulib module strtoimax ## begin gnulib module strtol EXTRA_DIST += strtol.c EXTRA_libgnu_a_SOURCES += strtol.c ## end gnulib module strtol ## begin gnulib module strtoll EXTRA_DIST += strtoll.c EXTRA_libgnu_a_SOURCES += strtoll.c ## end gnulib module strtoll ## begin gnulib module strtoul EXTRA_DIST += strtoul.c EXTRA_libgnu_a_SOURCES += strtoul.c ## end gnulib module strtoul ## begin gnulib module strtoull EXTRA_DIST += strtoull.c EXTRA_libgnu_a_SOURCES += strtoull.c ## end gnulib module strtoull ## begin gnulib module strtoumax EXTRA_DIST += strtoumax.c EXTRA_libgnu_a_SOURCES += strtoumax.c ## end gnulib module strtoumax ## begin gnulib module sys_select BUILT_SOURCES += $(SYS_SELECT_H) # We need the following in order to create when the system # doesn't have one that works with the given compiler. sys/select.h: sys_select.in.h @MKDIR_P@ sys rm -f $@-t $@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''NEXT_SYS_SELECT_H''@|$(NEXT_SYS_SELECT_H)|g' \ -e 's|@''HAVE_SYS_SELECT_H''@|$(HAVE_SYS_SELECT_H)|g' \ -e 's|@''GNULIB_SELECT''@|$(GNULIB_SELECT)|g' \ -e 's|@''HAVE_WINSOCK2_H''@|$(HAVE_WINSOCK2_H)|g' \ -e '/definition of GL_LINK_WARNING/r $(LINK_WARNING_H)' \ < $(srcdir)/sys_select.in.h; \ } > $@-t mv $@-t $@ MOSTLYCLEANFILES += sys/select.h sys/select.h-t MOSTLYCLEANDIRS += sys EXTRA_DIST += sys_select.in.h ## end gnulib module sys_select ## begin gnulib module sys_socket BUILT_SOURCES += $(SYS_SOCKET_H) # We need the following in order to create when the system # doesn't have one that works with the given compiler. sys/socket.h: sys_socket.in.h @MKDIR_P@ sys { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''NEXT_SYS_SOCKET_H''@|$(NEXT_SYS_SOCKET_H)|g' \ -e 's|@''HAVE_SYS_SOCKET_H''@|$(HAVE_SYS_SOCKET_H)|g' \ -e 's|@''GNULIB_CLOSE''@|$(GNULIB_CLOSE)|g' \ -e 's|@''GNULIB_SOCKET''@|$(GNULIB_SOCKET)|g' \ -e 's|@''GNULIB_CONNECT''@|$(GNULIB_CONNECT)|g' \ -e 's|@''GNULIB_ACCEPT''@|$(GNULIB_ACCEPT)|g' \ -e 's|@''GNULIB_BIND''@|$(GNULIB_BIND)|g' \ -e 's|@''GNULIB_GETPEERNAME''@|$(GNULIB_GETPEERNAME)|g' \ -e 's|@''GNULIB_GETSOCKNAME''@|$(GNULIB_GETSOCKNAME)|g' \ -e 's|@''GNULIB_GETSOCKOPT''@|$(GNULIB_GETSOCKOPT)|g' \ -e 's|@''GNULIB_LISTEN''@|$(GNULIB_LISTEN)|g' \ -e 's|@''GNULIB_RECV''@|$(GNULIB_RECV)|g' \ -e 's|@''GNULIB_SEND''@|$(GNULIB_SEND)|g' \ -e 's|@''GNULIB_RECVFROM''@|$(GNULIB_RECVFROM)|g' \ -e 's|@''GNULIB_SENDTO''@|$(GNULIB_SENDTO)|g' \ -e 's|@''GNULIB_SETSOCKOPT''@|$(GNULIB_SETSOCKOPT)|g' \ -e 's|@''GNULIB_SHUTDOWN''@|$(GNULIB_SHUTDOWN)|g' \ -e 's|@''HAVE_WINSOCK2_H''@|$(HAVE_WINSOCK2_H)|g' \ -e 's|@''HAVE_WS2TCPIP_H''@|$(HAVE_WS2TCPIP_H)|g' \ -e '/definition of GL_LINK_WARNING/r $(LINK_WARNING_H)' \ < $(srcdir)/sys_socket.in.h; \ } > $@-t mv -f $@-t $@ MOSTLYCLEANFILES += sys/socket.h sys/socket.h-t MOSTLYCLEANDIRS += sys EXTRA_DIST += sys_socket.in.h ## end gnulib module sys_socket ## begin gnulib module sys_stat BUILT_SOURCES += $(SYS_STAT_H) # We need the following in order to create when the system # has one that is incomplete. sys/stat.h: sys_stat.in.h @MKDIR_P@ sys rm -f $@-t $@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''NEXT_SYS_STAT_H''@|$(NEXT_SYS_STAT_H)|g' \ -e 's|@''GNULIB_LCHMOD''@|$(GNULIB_LCHMOD)|g' \ -e 's|@''GNULIB_LSTAT''@|$(GNULIB_LSTAT)|g' \ -e 's|@''HAVE_LCHMOD''@|$(HAVE_LCHMOD)|g' \ -e 's|@''HAVE_LSTAT''@|$(HAVE_LSTAT)|g' \ -e 's|@''REPLACE_LSTAT''@|$(REPLACE_LSTAT)|g' \ -e 's|@''REPLACE_MKDIR''@|$(REPLACE_MKDIR)|g' \ -e '/definition of GL_LINK_WARNING/r $(LINK_WARNING_H)' \ < $(srcdir)/sys_stat.in.h; \ } > $@-t mv $@-t $@ MOSTLYCLEANFILES += sys/stat.h sys/stat.h-t MOSTLYCLEANDIRS += sys EXTRA_DIST += sys_stat.in.h ## end gnulib module sys_stat ## begin gnulib module sys_time BUILT_SOURCES += $(SYS_TIME_H) # We need the following in order to create when the system # doesn't have one that works with the given compiler. sys/time.h: sys_time.in.h @MKDIR_P@ sys rm -f $@-t $@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's/@''HAVE_SYS_TIME_H''@/$(HAVE_SYS_TIME_H)/g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''NEXT_SYS_TIME_H''@|$(NEXT_SYS_TIME_H)|g' \ -e 's/@''REPLACE_GETTIMEOFDAY''@/$(REPLACE_GETTIMEOFDAY)/g' \ -e 's/@''HAVE_STRUCT_TIMEVAL''@/$(HAVE_STRUCT_TIMEVAL)/g' \ < $(srcdir)/sys_time.in.h; \ } > $@-t mv $@-t $@ MOSTLYCLEANFILES += sys/time.h sys/time.h-t EXTRA_DIST += sys_time.in.h ## end gnulib module sys_time ## begin gnulib module tempname EXTRA_DIST += tempname.c tempname.h EXTRA_libgnu_a_SOURCES += tempname.c ## end gnulib module tempname ## begin gnulib module time BUILT_SOURCES += time.h # We need the following in order to create when the system # doesn't have one that works with the given compiler. time.h: time.in.h rm -f $@-t $@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@NEXT_TIME_H''@|$(NEXT_TIME_H)|g' \ -e 's|@REPLACE_LOCALTIME_R''@|$(REPLACE_LOCALTIME_R)|g' \ -e 's|@REPLACE_NANOSLEEP''@|$(REPLACE_NANOSLEEP)|g' \ -e 's|@REPLACE_STRPTIME''@|$(REPLACE_STRPTIME)|g' \ -e 's|@REPLACE_TIMEGM''@|$(REPLACE_TIMEGM)|g' \ -e 's|@SYS_TIME_H_DEFINES_STRUCT_TIMESPEC''@|$(SYS_TIME_H_DEFINES_STRUCT_TIMESPEC)|g' \ -e 's|@TIME_H_DEFINES_STRUCT_TIMESPEC''@|$(TIME_H_DEFINES_STRUCT_TIMESPEC)|g' \ < $(srcdir)/time.in.h; \ } > $@-t mv $@-t $@ MOSTLYCLEANFILES += time.h time.h-t EXTRA_DIST += time.in.h ## end gnulib module time ## begin gnulib module timespec EXTRA_DIST += timespec.h ## end gnulib module timespec ## begin gnulib module unistd BUILT_SOURCES += unistd.h # We need the following in order to create an empty placeholder for # when the system doesn't have one. unistd.h: unistd.in.h rm -f $@-t $@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's|@''HAVE_UNISTD_H''@|$(HAVE_UNISTD_H)|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''NEXT_UNISTD_H''@|$(NEXT_UNISTD_H)|g' \ -e 's|@''GNULIB_CHOWN''@|$(GNULIB_CHOWN)|g' \ -e 's|@''GNULIB_CLOSE''@|$(GNULIB_CLOSE)|g' \ -e 's|@''GNULIB_DUP2''@|$(GNULIB_DUP2)|g' \ -e 's|@''GNULIB_ENVIRON''@|$(GNULIB_ENVIRON)|g' \ -e 's|@''GNULIB_EUIDACCESS''@|$(GNULIB_EUIDACCESS)|g' \ -e 's|@''GNULIB_FCHDIR''@|$(GNULIB_FCHDIR)|g' \ -e 's|@''GNULIB_FSYNC''@|$(GNULIB_FSYNC)|g' \ -e 's|@''GNULIB_FTRUNCATE''@|$(GNULIB_FTRUNCATE)|g' \ -e 's|@''GNULIB_GETCWD''@|$(GNULIB_GETCWD)|g' \ -e 's|@''GNULIB_GETDOMAINNAME''@|$(GNULIB_GETDOMAINNAME)|g' \ -e 's|@''GNULIB_GETDTABLESIZE''@|$(GNULIB_GETDTABLESIZE)|g' \ -e 's|@''GNULIB_GETHOSTNAME''@|$(GNULIB_GETHOSTNAME)|g' \ -e 's|@''GNULIB_GETLOGIN_R''@|$(GNULIB_GETLOGIN_R)|g' \ -e 's|@''GNULIB_GETPAGESIZE''@|$(GNULIB_GETPAGESIZE)|g' \ -e 's|@''GNULIB_GETUSERSHELL''@|$(GNULIB_GETUSERSHELL)|g' \ -e 's|@''GNULIB_LCHOWN''@|$(GNULIB_LCHOWN)|g' \ -e 's|@''GNULIB_LINK''@|$(GNULIB_LINK)|g' \ -e 's|@''GNULIB_LSEEK''@|$(GNULIB_LSEEK)|g' \ -e 's|@''GNULIB_READLINK''@|$(GNULIB_READLINK)|g' \ -e 's|@''GNULIB_SLEEP''@|$(GNULIB_SLEEP)|g' \ -e 's|@''GNULIB_UNISTD_H_SIGPIPE''@|$(GNULIB_UNISTD_H_SIGPIPE)|g' \ -e 's|@''GNULIB_WRITE''@|$(GNULIB_WRITE)|g' \ -e 's|@''HAVE_DUP2''@|$(HAVE_DUP2)|g' \ -e 's|@''HAVE_EUIDACCESS''@|$(HAVE_EUIDACCESS)|g' \ -e 's|@''HAVE_FSYNC''@|$(HAVE_FSYNC)|g' \ -e 's|@''HAVE_FTRUNCATE''@|$(HAVE_FTRUNCATE)|g' \ -e 's|@''HAVE_GETDOMAINNAME''@|$(HAVE_GETDOMAINNAME)|g' \ -e 's|@''HAVE_GETDTABLESIZE''@|$(HAVE_GETDTABLESIZE)|g' \ -e 's|@''HAVE_GETHOSTNAME''@|$(HAVE_GETHOSTNAME)|g' \ -e 's|@''HAVE_GETPAGESIZE''@|$(HAVE_GETPAGESIZE)|g' \ -e 's|@''HAVE_GETUSERSHELL''@|$(HAVE_GETUSERSHELL)|g' \ -e 's|@''HAVE_LINK''@|$(HAVE_LINK)|g' \ -e 's|@''HAVE_READLINK''@|$(HAVE_READLINK)|g' \ -e 's|@''HAVE_SLEEP''@|$(HAVE_SLEEP)|g' \ -e 's|@''HAVE_DECL_ENVIRON''@|$(HAVE_DECL_ENVIRON)|g' \ -e 's|@''HAVE_DECL_GETLOGIN_R''@|$(HAVE_DECL_GETLOGIN_R)|g' \ -e 's|@''HAVE_OS_H''@|$(HAVE_OS_H)|g' \ -e 's|@''HAVE_SYS_PARAM_H''@|$(HAVE_SYS_PARAM_H)|g' \ -e 's|@''REPLACE_CHOWN''@|$(REPLACE_CHOWN)|g' \ -e 's|@''REPLACE_CLOSE''@|$(REPLACE_CLOSE)|g' \ -e 's|@''REPLACE_FCHDIR''@|$(REPLACE_FCHDIR)|g' \ -e 's|@''REPLACE_GETCWD''@|$(REPLACE_GETCWD)|g' \ -e 's|@''REPLACE_GETPAGESIZE''@|$(REPLACE_GETPAGESIZE)|g' \ -e 's|@''REPLACE_LCHOWN''@|$(REPLACE_LCHOWN)|g' \ -e 's|@''REPLACE_LSEEK''@|$(REPLACE_LSEEK)|g' \ -e 's|@''REPLACE_WRITE''@|$(REPLACE_WRITE)|g' \ -e 's|@''UNISTD_H_HAVE_WINSOCK2_H''@|$(UNISTD_H_HAVE_WINSOCK2_H)|g' \ -e '/definition of GL_LINK_WARNING/r $(LINK_WARNING_H)' \ < $(srcdir)/unistd.in.h; \ } > $@-t mv $@-t $@ MOSTLYCLEANFILES += unistd.h unistd.h-t EXTRA_DIST += unistd.in.h ## end gnulib module unistd ## begin gnulib module unitypes EXTRA_DIST += unitypes.h ## end gnulib module unitypes ## begin gnulib module uniwidth/base EXTRA_DIST += localcharset.h uniwidth.h ## end gnulib module uniwidth/base ## begin gnulib module uniwidth/width libgnu_a_SOURCES += uniwidth/width.c EXTRA_DIST += uniwidth/cjk.h ## end gnulib module uniwidth/width ## begin gnulib module utime EXTRA_DIST += utime.c EXTRA_libgnu_a_SOURCES += utime.c ## end gnulib module utime ## begin gnulib module verify libgnu_a_SOURCES += verify.h ## end gnulib module verify ## begin gnulib module wchar BUILT_SOURCES += $(WCHAR_H) # We need the following in order to create when the system # version does not work standalone. wchar.h: wchar.in.h rm -f $@-t $@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''NEXT_WCHAR_H''@|$(NEXT_WCHAR_H)|g' \ -e 's|@''HAVE_WCHAR_H''@|$(HAVE_WCHAR_H)|g' \ -e 's|@''GNULIB_BTOWC''@|$(GNULIB_BTOWC)|g' \ -e 's|@''GNULIB_WCTOB''@|$(GNULIB_WCTOB)|g' \ -e 's|@''GNULIB_MBSINIT''@|$(GNULIB_MBSINIT)|g' \ -e 's|@''GNULIB_MBRTOWC''@|$(GNULIB_MBRTOWC)|g' \ -e 's|@''GNULIB_MBRLEN''@|$(GNULIB_MBRLEN)|g' \ -e 's|@''GNULIB_MBSRTOWCS''@|$(GNULIB_MBSRTOWCS)|g' \ -e 's|@''GNULIB_MBSNRTOWCS''@|$(GNULIB_MBSNRTOWCS)|g' \ -e 's|@''GNULIB_WCRTOMB''@|$(GNULIB_WCRTOMB)|g' \ -e 's|@''GNULIB_WCSRTOMBS''@|$(GNULIB_WCSRTOMBS)|g' \ -e 's|@''GNULIB_WCSNRTOMBS''@|$(GNULIB_WCSNRTOMBS)|g' \ -e 's|@''GNULIB_WCWIDTH''@|$(GNULIB_WCWIDTH)|g' \ -e 's|@''HAVE_WINT_T''@|$(HAVE_WINT_T)|g' \ -e 's|@''HAVE_BTOWC''@|$(HAVE_BTOWC)|g' \ -e 's|@''HAVE_MBSINIT''@|$(HAVE_MBSINIT)|g' \ -e 's|@''HAVE_MBRTOWC''@|$(HAVE_MBRTOWC)|g' \ -e 's|@''HAVE_MBRLEN''@|$(HAVE_MBRLEN)|g' \ -e 's|@''HAVE_MBSRTOWCS''@|$(HAVE_MBSRTOWCS)|g' \ -e 's|@''HAVE_MBSNRTOWCS''@|$(HAVE_MBSNRTOWCS)|g' \ -e 's|@''HAVE_WCRTOMB''@|$(HAVE_WCRTOMB)|g' \ -e 's|@''HAVE_WCSRTOMBS''@|$(HAVE_WCSRTOMBS)|g' \ -e 's|@''HAVE_WCSNRTOMBS''@|$(HAVE_WCSNRTOMBS)|g' \ -e 's|@''HAVE_DECL_WCTOB''@|$(HAVE_DECL_WCTOB)|g' \ -e 's|@''HAVE_DECL_WCWIDTH''@|$(HAVE_DECL_WCWIDTH)|g' \ -e 's|@''REPLACE_MBSTATE_T''@|$(REPLACE_MBSTATE_T)|g' \ -e 's|@''REPLACE_BTOWC''@|$(REPLACE_BTOWC)|g' \ -e 's|@''REPLACE_WCTOB''@|$(REPLACE_WCTOB)|g' \ -e 's|@''REPLACE_MBSINIT''@|$(REPLACE_MBSINIT)|g' \ -e 's|@''REPLACE_MBRTOWC''@|$(REPLACE_MBRTOWC)|g' \ -e 's|@''REPLACE_MBRLEN''@|$(REPLACE_MBRLEN)|g' \ -e 's|@''REPLACE_MBSRTOWCS''@|$(REPLACE_MBSRTOWCS)|g' \ -e 's|@''REPLACE_MBSNRTOWCS''@|$(REPLACE_MBSNRTOWCS)|g' \ -e 's|@''REPLACE_WCRTOMB''@|$(REPLACE_WCRTOMB)|g' \ -e 's|@''REPLACE_WCSRTOMBS''@|$(REPLACE_WCSRTOMBS)|g' \ -e 's|@''REPLACE_WCWIDTH''@|$(REPLACE_WCWIDTH)|g' \ -e '/definition of GL_LINK_WARNING/r $(LINK_WARNING_H)' \ < $(srcdir)/wchar.in.h; \ } > $@-t mv $@-t $@ MOSTLYCLEANFILES += wchar.h wchar.h-t EXTRA_DIST += wchar.in.h ## end gnulib module wchar ## begin gnulib module wctype BUILT_SOURCES += $(WCTYPE_H) # We need the following in order to create when the system # doesn't have one that works with the given compiler. wctype.h: wctype.in.h rm -f $@-t $@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's/@''HAVE_WCTYPE_H''@/$(HAVE_WCTYPE_H)/g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''NEXT_WCTYPE_H''@|$(NEXT_WCTYPE_H)|g' \ -e 's/@''HAVE_ISWCNTRL''@/$(HAVE_ISWCNTRL)/g' \ -e 's/@''HAVE_WINT_T''@/$(HAVE_WINT_T)/g' \ -e 's/@''REPLACE_ISWCNTRL''@/$(REPLACE_ISWCNTRL)/g' \ < $(srcdir)/wctype.in.h; \ } > $@-t mv $@-t $@ MOSTLYCLEANFILES += wctype.h wctype.h-t EXTRA_DIST += wctype.in.h ## end gnulib module wctype ## begin gnulib module wcwidth EXTRA_DIST += wcwidth.c EXTRA_libgnu_a_SOURCES += wcwidth.c ## end gnulib module wcwidth ## begin gnulib module write EXTRA_DIST += write.c EXTRA_libgnu_a_SOURCES += write.c ## end gnulib module write ## begin gnulib module xalloc EXTRA_DIST += xalloc.h xmalloc.c EXTRA_libgnu_a_SOURCES += xmalloc.c ## end gnulib module xalloc ## begin gnulib module xalloc-die libgnu_a_SOURCES += xalloc-die.c ## end gnulib module xalloc-die ## begin gnulib module xstrndup libgnu_a_SOURCES += xstrndup.h xstrndup.c ## end gnulib module xstrndup ## begin gnulib module xstrtol EXTRA_DIST += xstrtol-error.c xstrtol.c xstrtol.h xstrtoul.c EXTRA_libgnu_a_SOURCES += xstrtol-error.c xstrtol.c xstrtoul.c ## end gnulib module xstrtol ## begin gnulib module xstrtoumax libgnu_a_SOURCES += xstrtoumax.c ## end gnulib module xstrtoumax mostlyclean-local: mostlyclean-generic @for dir in '' $(MOSTLYCLEANDIRS); do \ if test -n "$$dir" && test -d $$dir; then \ echo "rmdir $$dir"; rmdir $$dir; \ fi; \ done; \ : gnuit-4.9.5/lib/strtoll.c0000644000175000017500000000207611146671375012235 00000000000000/* Function to parse a `long long int' from text. Copyright (C) 1995, 1996, 1997, 1999, 2001 Free Software Foundation, Inc. This file is part of the GNU C Library. 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 3 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, see . */ #define QUAD 1 #include #ifdef _LIBC # ifdef SHARED # include # if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_2) compat_symbol (libc, __strtoll_internal, __strtoq_internal, GLIBC_2_0); # endif # endif weak_alias (strtoll, strtoq) #endif gnuit-4.9.5/lib/mbchar.c0000644000175000017500000000220711146671375011762 00000000000000/* Copyright (C) 2001, 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 3 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, see . */ #include #include #include "mbchar.h" #if IS_BASIC_ASCII /* Bit table of characters in the ISO C "basic character set". */ const unsigned int is_basic_table [UCHAR_MAX / 32 + 1] = { 0x00001a00, /* '\t' '\v' '\f' */ 0xffffffef, /* ' '...'#' '%'...'?' */ 0xfffffffe, /* 'A'...'Z' '[' '\\' ']' '^' '_' */ 0x7ffffffe /* 'a'...'z' '{' '|' '}' '~' */ /* The remaining bits are 0. */ }; #endif /* IS_BASIC_ASCII */ gnuit-4.9.5/lib/gettime.c0000644000175000017500000000231711146671375012166 00000000000000/* gettime -- get the system clock Copyright (C) 2002, 2004, 2005, 2006, 2007 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 3 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, see . */ /* Written by Paul Eggert. */ #include #include "timespec.h" #include /* Get the system time into *TS. */ void gettime (struct timespec *ts) { #if HAVE_NANOTIME nanotime (ts); #else # if defined CLOCK_REALTIME && HAVE_CLOCK_GETTIME if (clock_gettime (CLOCK_REALTIME, ts) == 0) return; # endif { struct timeval tv; gettimeofday (&tv, NULL); ts->tv_sec = tv.tv_sec; ts->tv_nsec = tv.tv_usec * 1000; } #endif } gnuit-4.9.5/lib/sig-handler.h0000644000175000017500000000323111146671375012726 00000000000000/* Convenience declarations when working with . Copyright (C) 2008 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 3 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, see . */ #ifndef _GL_SIG_HANDLER_H #define _GL_SIG_HANDLER_H #include /* Convenience type when working with signal handlers. */ typedef void (*sa_handler_t) (int); /* Return the handler of a signal, as a sa_handler_t value regardless of its true type. The resulting function can be compared to special values like SIG_IGN but it is not portable to call it. */ static inline sa_handler_t get_handler (struct sigaction const *a) { #ifdef SA_SIGINFO /* POSIX says that special values like SIG_IGN can only occur when action.sa_flags does not contain SA_SIGINFO. But in Linux 2.4, for example, sa_sigaction and sa_handler are aliases and a signal is ignored if sa_sigaction (after casting) equals SIG_IGN. So use (and cast) sa_sigaction in that case. */ if (a->sa_flags & SA_SIGINFO) return (sa_handler_t) a->sa_sigaction; #endif return a->sa_handler; } #endif /* _GL_SIG_HANDLER_H */ gnuit-4.9.5/lib/tempname.h0000644000175000017500000000305511146671375012343 00000000000000/* Create a temporary file or directory. Copyright (C) 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 3 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, see . */ /* header written by Eric Blake */ /* In gnulib, always prefer large files. GT_FILE maps to __GT_BIGFILE, not __GT_FILE, for a reason. */ #define GT_FILE 1 #define GT_DIR 2 #define GT_NOCREATE 3 /* Generate a temporary file name based on TMPL. TMPL must match the rules for mk[s]temp (i.e. end in "XXXXXX"). The name constructed does not exist at the time of the call to gen_tempname. TMPL is overwritten with the result. KIND may be one of: GT_NOCREATE: simply verify that the name does not exist at the time of the call. GT_FILE: create a large file using open(O_CREAT|O_EXCL) and return a read-write fd. The file is mode 0600. GT_DIR: create a directory, which will be mode 0700. We use a clever algorithm to get hard-to-predict names. */ extern int gen_tempname (char *tmpl, int kind); gnuit-4.9.5/lib/strnlen.c0000644000175000017500000000227111146671375012214 00000000000000/* Find the length of STRING, but scan at most MAXLEN characters. Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc. Written by Simon Josefsson. 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 3, 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. */ #include #include /* Find the length of STRING, but scan at most MAXLEN characters. If no '\0' terminator is found in that many characters, return MAXLEN. */ size_t strnlen (const char *string, size_t maxlen) { const char *end = memchr (string, '\0', maxlen); return end ? (size_t) (end - string) : maxlen; } gnuit-4.9.5/lib/string.in.h0000644000175000017500000005253311146671375012455 00000000000000/* A GNU-like . Copyright (C) 1995-1996, 2001-2008 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 3, 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. */ #ifndef _GL_STRING_H #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif /* The include_next requires a split double-inclusion guard. */ #@INCLUDE_NEXT@ @NEXT_STRING_H@ #ifndef _GL_STRING_H #define _GL_STRING_H #ifndef __attribute__ /* This feature is available in gcc versions 2.5 and later. */ # if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) # define __attribute__(Spec) /* empty */ # endif /* The attribute __pure__ was added in gcc 2.96. */ # if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 96) # define __pure__ /* empty */ # endif #endif /* The definition of GL_LINK_WARNING is copied here. */ #ifdef __cplusplus extern "C" { #endif /* Return the first occurrence of NEEDLE in HAYSTACK. */ #if @GNULIB_MEMMEM@ # if @REPLACE_MEMMEM@ # define memmem rpl_memmem # endif # if ! @HAVE_DECL_MEMMEM@ || @REPLACE_MEMMEM@ extern void *memmem (void const *__haystack, size_t __haystack_len, void const *__needle, size_t __needle_len) __attribute__ ((__pure__)); # endif #elif defined GNULIB_POSIXCHECK # undef memmem # define memmem(a,al,b,bl) \ (GL_LINK_WARNING ("memmem is unportable and often quadratic - " \ "use gnulib module memmem-simple for portability, " \ "and module memmem for speed" ), \ memmem (a, al, b, bl)) #endif /* Copy N bytes of SRC to DEST, return pointer to bytes after the last written byte. */ #if @GNULIB_MEMPCPY@ # if ! @HAVE_MEMPCPY@ extern void *mempcpy (void *restrict __dest, void const *restrict __src, size_t __n); # endif #elif defined GNULIB_POSIXCHECK # undef mempcpy # define mempcpy(a,b,n) \ (GL_LINK_WARNING ("mempcpy is unportable - " \ "use gnulib module mempcpy for portability"), \ mempcpy (a, b, n)) #endif /* Search backwards through a block for a byte (specified as an int). */ #if @GNULIB_MEMRCHR@ # if ! @HAVE_DECL_MEMRCHR@ extern void *memrchr (void const *, int, size_t) __attribute__ ((__pure__)); # endif #elif defined GNULIB_POSIXCHECK # undef memrchr # define memrchr(a,b,c) \ (GL_LINK_WARNING ("memrchr is unportable - " \ "use gnulib module memrchr for portability"), \ memrchr (a, b, c)) #endif /* Find the first occurrence of C in S. More efficient than memchr(S,C,N), at the expense of undefined behavior if C does not occur within N bytes. */ #if @GNULIB_RAWMEMCHR@ # if ! @HAVE_RAWMEMCHR@ extern void *rawmemchr (void const *__s, int __c_in) __attribute__ ((__pure__)); # endif #elif defined GNULIB_POSIXCHECK # undef rawmemchr # define rawmemchr(a,b) \ (GL_LINK_WARNING ("rawmemchr is unportable - " \ "use gnulib module rawmemchr for portability"), \ rawmemchr (a, b)) #endif /* Copy SRC to DST, returning the address of the terminating '\0' in DST. */ #if @GNULIB_STPCPY@ # if ! @HAVE_STPCPY@ extern char *stpcpy (char *restrict __dst, char const *restrict __src); # endif #elif defined GNULIB_POSIXCHECK # undef stpcpy # define stpcpy(a,b) \ (GL_LINK_WARNING ("stpcpy is unportable - " \ "use gnulib module stpcpy for portability"), \ stpcpy (a, b)) #endif /* Copy no more than N bytes of SRC to DST, returning a pointer past the last non-NUL byte written into DST. */ #if @GNULIB_STPNCPY@ # if ! @HAVE_STPNCPY@ # define stpncpy gnu_stpncpy extern char *stpncpy (char *restrict __dst, char const *restrict __src, size_t __n); # endif #elif defined GNULIB_POSIXCHECK # undef stpncpy # define stpncpy(a,b,n) \ (GL_LINK_WARNING ("stpncpy is unportable - " \ "use gnulib module stpncpy for portability"), \ stpncpy (a, b, n)) #endif #if defined GNULIB_POSIXCHECK /* strchr() does not work with multibyte strings if the locale encoding is GB18030 and the character to be searched is a digit. */ # undef strchr # define strchr(s,c) \ (GL_LINK_WARNING ("strchr cannot work correctly on character strings " \ "in some multibyte locales - " \ "use mbschr if you care about internationalization"), \ strchr (s, c)) #endif /* Find the first occurrence of C in S or the final NUL byte. */ #if @GNULIB_STRCHRNUL@ # if ! @HAVE_STRCHRNUL@ extern char *strchrnul (char const *__s, int __c_in) __attribute__ ((__pure__)); # endif #elif defined GNULIB_POSIXCHECK # undef strchrnul # define strchrnul(a,b) \ (GL_LINK_WARNING ("strchrnul is unportable - " \ "use gnulib module strchrnul for portability"), \ strchrnul (a, b)) #endif /* Duplicate S, returning an identical malloc'd string. */ #if @GNULIB_STRDUP@ # if @REPLACE_STRDUP@ # undef strdup # define strdup rpl_strdup # endif # if !(@HAVE_DECL_STRDUP@ || defined strdup) || @REPLACE_STRDUP@ extern char *strdup (char const *__s); # endif #elif defined GNULIB_POSIXCHECK # undef strdup # define strdup(a) \ (GL_LINK_WARNING ("strdup is unportable - " \ "use gnulib module strdup for portability"), \ strdup (a)) #endif /* Return a newly allocated copy of at most N bytes of STRING. */ #if @GNULIB_STRNDUP@ # if ! @HAVE_STRNDUP@ # undef strndup # define strndup rpl_strndup # endif # if ! @HAVE_STRNDUP@ || ! @HAVE_DECL_STRNDUP@ extern char *strndup (char const *__string, size_t __n); # endif #elif defined GNULIB_POSIXCHECK # undef strndup # define strndup(a,n) \ (GL_LINK_WARNING ("strndup is unportable - " \ "use gnulib module strndup for portability"), \ strndup (a, n)) #endif /* Find the length (number of bytes) of STRING, but scan at most MAXLEN bytes. If no '\0' terminator is found in that many bytes, return MAXLEN. */ #if @GNULIB_STRNLEN@ # if ! @HAVE_DECL_STRNLEN@ extern size_t strnlen (char const *__string, size_t __maxlen) __attribute__ ((__pure__)); # endif #elif defined GNULIB_POSIXCHECK # undef strnlen # define strnlen(a,n) \ (GL_LINK_WARNING ("strnlen is unportable - " \ "use gnulib module strnlen for portability"), \ strnlen (a, n)) #endif #if defined GNULIB_POSIXCHECK /* strcspn() assumes the second argument is a list of single-byte characters. Even in this simple case, it does not work with multibyte strings if the locale encoding is GB18030 and one of the characters to be searched is a digit. */ # undef strcspn # define strcspn(s,a) \ (GL_LINK_WARNING ("strcspn cannot work correctly on character strings " \ "in multibyte locales - " \ "use mbscspn if you care about internationalization"), \ strcspn (s, a)) #endif /* Find the first occurrence in S of any character in ACCEPT. */ #if @GNULIB_STRPBRK@ # if ! @HAVE_STRPBRK@ extern char *strpbrk (char const *__s, char const *__accept) __attribute__ ((__pure__)); # endif # if defined GNULIB_POSIXCHECK /* strpbrk() assumes the second argument is a list of single-byte characters. Even in this simple case, it does not work with multibyte strings if the locale encoding is GB18030 and one of the characters to be searched is a digit. */ # undef strpbrk # define strpbrk(s,a) \ (GL_LINK_WARNING ("strpbrk cannot work correctly on character strings " \ "in multibyte locales - " \ "use mbspbrk if you care about internationalization"), \ strpbrk (s, a)) # endif #elif defined GNULIB_POSIXCHECK # undef strpbrk # define strpbrk(s,a) \ (GL_LINK_WARNING ("strpbrk is unportable - " \ "use gnulib module strpbrk for portability"), \ strpbrk (s, a)) #endif #if defined GNULIB_POSIXCHECK /* strspn() assumes the second argument is a list of single-byte characters. Even in this simple case, it cannot work with multibyte strings. */ # undef strspn # define strspn(s,a) \ (GL_LINK_WARNING ("strspn cannot work correctly on character strings " \ "in multibyte locales - " \ "use mbsspn if you care about internationalization"), \ strspn (s, a)) #endif #if defined GNULIB_POSIXCHECK /* strrchr() does not work with multibyte strings if the locale encoding is GB18030 and the character to be searched is a digit. */ # undef strrchr # define strrchr(s,c) \ (GL_LINK_WARNING ("strrchr cannot work correctly on character strings " \ "in some multibyte locales - " \ "use mbsrchr if you care about internationalization"), \ strrchr (s, c)) #endif /* Search the next delimiter (char listed in DELIM) starting at *STRINGP. If one is found, overwrite it with a NUL, and advance *STRINGP to point to the next char after it. Otherwise, set *STRINGP to NULL. If *STRINGP was already NULL, nothing happens. Return the old value of *STRINGP. This is a variant of strtok() that is multithread-safe and supports empty fields. Caveat: It modifies the original string. Caveat: These functions cannot be used on constant strings. Caveat: The identity of the delimiting character is lost. Caveat: It doesn't work with multibyte strings unless all of the delimiter characters are ASCII characters < 0x30. See also strtok_r(). */ #if @GNULIB_STRSEP@ # if ! @HAVE_STRSEP@ extern char *strsep (char **restrict __stringp, char const *restrict __delim); # endif # if defined GNULIB_POSIXCHECK # undef strsep # define strsep(s,d) \ (GL_LINK_WARNING ("strsep cannot work correctly on character strings " \ "in multibyte locales - " \ "use mbssep if you care about internationalization"), \ strsep (s, d)) # endif #elif defined GNULIB_POSIXCHECK # undef strsep # define strsep(s,d) \ (GL_LINK_WARNING ("strsep is unportable - " \ "use gnulib module strsep for portability"), \ strsep (s, d)) #endif #if @GNULIB_STRSTR@ # if @REPLACE_STRSTR@ # define strstr rpl_strstr char *strstr (const char *haystack, const char *needle) __attribute__ ((__pure__)); # endif #elif defined GNULIB_POSIXCHECK /* strstr() does not work with multibyte strings if the locale encoding is different from UTF-8: POSIX says that it operates on "strings", and "string" in POSIX is defined as a sequence of bytes, not of characters. */ # undef strstr # define strstr(a,b) \ (GL_LINK_WARNING ("strstr is quadratic on many systems, and cannot " \ "work correctly on character strings in most " \ "multibyte locales - " \ "use mbsstr if you care about internationalization, " \ "or use strstr if you care about speed"), \ strstr (a, b)) #endif /* Find the first occurrence of NEEDLE in HAYSTACK, using case-insensitive comparison. */ #if @GNULIB_STRCASESTR@ # if @REPLACE_STRCASESTR@ # define strcasestr rpl_strcasestr # endif # if ! @HAVE_STRCASESTR@ || @REPLACE_STRCASESTR@ extern char *strcasestr (const char *haystack, const char *needle) __attribute__ ((__pure__)); # endif #elif defined GNULIB_POSIXCHECK /* strcasestr() does not work with multibyte strings: It is a glibc extension, and glibc implements it only for unibyte locales. */ # undef strcasestr # define strcasestr(a,b) \ (GL_LINK_WARNING ("strcasestr does work correctly on character strings " \ "in multibyte locales - " \ "use mbscasestr if you care about " \ "internationalization, or use c-strcasestr if you want " \ "a locale independent function"), \ strcasestr (a, b)) #endif /* Parse S into tokens separated by characters in DELIM. If S is NULL, the saved pointer in SAVE_PTR is used as the next starting point. For example: char s[] = "-abc-=-def"; char *sp; x = strtok_r(s, "-", &sp); // x = "abc", sp = "=-def" x = strtok_r(NULL, "-=", &sp); // x = "def", sp = NULL x = strtok_r(NULL, "=", &sp); // x = NULL // s = "abc\0-def\0" This is a variant of strtok() that is multithread-safe. For the POSIX documentation for this function, see: http://www.opengroup.org/susv3xsh/strtok.html Caveat: It modifies the original string. Caveat: These functions cannot be used on constant strings. Caveat: The identity of the delimiting character is lost. Caveat: It doesn't work with multibyte strings unless all of the delimiter characters are ASCII characters < 0x30. See also strsep(). */ #if @GNULIB_STRTOK_R@ # if ! @HAVE_DECL_STRTOK_R@ extern char *strtok_r (char *restrict s, char const *restrict delim, char **restrict save_ptr); # endif # if defined GNULIB_POSIXCHECK # undef strtok_r # define strtok_r(s,d,p) \ (GL_LINK_WARNING ("strtok_r cannot work correctly on character strings " \ "in multibyte locales - " \ "use mbstok_r if you care about internationalization"), \ strtok_r (s, d, p)) # endif #elif defined GNULIB_POSIXCHECK # undef strtok_r # define strtok_r(s,d,p) \ (GL_LINK_WARNING ("strtok_r is unportable - " \ "use gnulib module strtok_r for portability"), \ strtok_r (s, d, p)) #endif /* The following functions are not specified by POSIX. They are gnulib extensions. */ #if @GNULIB_MBSLEN@ /* Return the number of multibyte characters in the character string STRING. This considers multibyte characters, unlike strlen, which counts bytes. */ extern size_t mbslen (const char *string); #endif #if @GNULIB_MBSNLEN@ /* Return the number of multibyte characters in the character string starting at STRING and ending at STRING + LEN. */ extern size_t mbsnlen (const char *string, size_t len); #endif #if @GNULIB_MBSCHR@ /* Locate the first single-byte character C in the character string STRING, and return a pointer to it. Return NULL if C is not found in STRING. Unlike strchr(), this function works correctly in multibyte locales with encodings such as GB18030. */ # define mbschr rpl_mbschr /* avoid collision with HP-UX function */ extern char * mbschr (const char *string, int c); #endif #if @GNULIB_MBSRCHR@ /* Locate the last single-byte character C in the character string STRING, and return a pointer to it. Return NULL if C is not found in STRING. Unlike strrchr(), this function works correctly in multibyte locales with encodings such as GB18030. */ # define mbsrchr rpl_mbsrchr /* avoid collision with HP-UX function */ extern char * mbsrchr (const char *string, int c); #endif #if @GNULIB_MBSSTR@ /* Find the first occurrence of the character string NEEDLE in the character string HAYSTACK. Return NULL if NEEDLE is not found in HAYSTACK. Unlike strstr(), this function works correctly in multibyte locales with encodings different from UTF-8. */ extern char * mbsstr (const char *haystack, const char *needle); #endif #if @GNULIB_MBSCASECMP@ /* Compare the character strings S1 and S2, ignoring case, returning less than, equal to or greater than zero if S1 is lexicographically less than, equal to or greater than S2. Note: This function may, in multibyte locales, return 0 for strings of different lengths! Unlike strcasecmp(), this function works correctly in multibyte locales. */ extern int mbscasecmp (const char *s1, const char *s2); #endif #if @GNULIB_MBSNCASECMP@ /* Compare the initial segment of the character string S1 consisting of at most N characters with the initial segment of the character string S2 consisting of at most N characters, ignoring case, returning less than, equal to or greater than zero if the initial segment of S1 is lexicographically less than, equal to or greater than the initial segment of S2. Note: This function may, in multibyte locales, return 0 for initial segments of different lengths! Unlike strncasecmp(), this function works correctly in multibyte locales. But beware that N is not a byte count but a character count! */ extern int mbsncasecmp (const char *s1, const char *s2, size_t n); #endif #if @GNULIB_MBSPCASECMP@ /* Compare the initial segment of the character string STRING consisting of at most mbslen (PREFIX) characters with the character string PREFIX, ignoring case, returning less than, equal to or greater than zero if this initial segment is lexicographically less than, equal to or greater than PREFIX. Note: This function may, in multibyte locales, return 0 if STRING is of smaller length than PREFIX! Unlike strncasecmp(), this function works correctly in multibyte locales. */ extern char * mbspcasecmp (const char *string, const char *prefix); #endif #if @GNULIB_MBSCASESTR@ /* Find the first occurrence of the character string NEEDLE in the character string HAYSTACK, using case-insensitive comparison. Note: This function may, in multibyte locales, return success even if strlen (haystack) < strlen (needle) ! Unlike strcasestr(), this function works correctly in multibyte locales. */ extern char * mbscasestr (const char *haystack, const char *needle); #endif #if @GNULIB_MBSCSPN@ /* Find the first occurrence in the character string STRING of any character in the character string ACCEPT. Return the number of bytes from the beginning of the string to this occurrence, or to the end of the string if none exists. Unlike strcspn(), this function works correctly in multibyte locales. */ extern size_t mbscspn (const char *string, const char *accept); #endif #if @GNULIB_MBSPBRK@ /* Find the first occurrence in the character string STRING of any character in the character string ACCEPT. Return the pointer to it, or NULL if none exists. Unlike strpbrk(), this function works correctly in multibyte locales. */ # define mbspbrk rpl_mbspbrk /* avoid collision with HP-UX function */ extern char * mbspbrk (const char *string, const char *accept); #endif #if @GNULIB_MBSSPN@ /* Find the first occurrence in the character string STRING of any character not in the character string REJECT. Return the number of bytes from the beginning of the string to this occurrence, or to the end of the string if none exists. Unlike strspn(), this function works correctly in multibyte locales. */ extern size_t mbsspn (const char *string, const char *reject); #endif #if @GNULIB_MBSSEP@ /* Search the next delimiter (multibyte character listed in the character string DELIM) starting at the character string *STRINGP. If one is found, overwrite it with a NUL, and advance *STRINGP to point to the next multibyte character after it. Otherwise, set *STRINGP to NULL. If *STRINGP was already NULL, nothing happens. Return the old value of *STRINGP. This is a variant of mbstok_r() that supports empty fields. Caveat: It modifies the original string. Caveat: These functions cannot be used on constant strings. Caveat: The identity of the delimiting character is lost. See also mbstok_r(). */ extern char * mbssep (char **stringp, const char *delim); #endif #if @GNULIB_MBSTOK_R@ /* Parse the character string STRING into tokens separated by characters in the character string DELIM. If STRING is NULL, the saved pointer in SAVE_PTR is used as the next starting point. For example: char s[] = "-abc-=-def"; char *sp; x = mbstok_r(s, "-", &sp); // x = "abc", sp = "=-def" x = mbstok_r(NULL, "-=", &sp); // x = "def", sp = NULL x = mbstok_r(NULL, "=", &sp); // x = NULL // s = "abc\0-def\0" Caveat: It modifies the original string. Caveat: These functions cannot be used on constant strings. Caveat: The identity of the delimiting character is lost. See also mbssep(). */ extern char * mbstok_r (char *string, const char *delim, char **save_ptr); #endif /* Map any int, typically from errno, into an error message. */ #if @GNULIB_STRERROR@ # if @REPLACE_STRERROR@ # undef strerror # define strerror rpl_strerror extern char *strerror (int); # endif #elif defined GNULIB_POSIXCHECK # undef strerror # define strerror(e) \ (GL_LINK_WARNING ("strerror is unportable - " \ "use gnulib module strerror to guarantee non-NULL result"), \ strerror (e)) #endif #if @GNULIB_STRSIGNAL@ # if @REPLACE_STRSIGNAL@ # define strsignal rpl_strsignal # endif # if ! @HAVE_DECL_STRSIGNAL@ || @REPLACE_STRSIGNAL@ extern char *strsignal (int __sig); # endif #elif defined GNULIB_POSIXCHECK # undef strsignal # define strsignal(a) \ (GL_LINK_WARNING ("strsignal is unportable - " \ "use gnulib module strsignal for portability"), \ strsignal (a)) #endif #if @GNULIB_STRVERSCMP@ # if !@HAVE_STRVERSCMP@ extern int strverscmp (const char *, const char *); # endif #elif defined GNULIB_POSIXCHECK # undef strverscmp # define strverscmp(a, b) \ (GL_LINK_WARNING ("strverscmp is unportable - " \ "use gnulib module strverscmp for portability"), \ strverscmp (a, b)) #endif #ifdef __cplusplus } #endif #endif /* _GL_STRING_H */ #endif /* _GL_STRING_H */ gnuit-4.9.5/lib/strcasecmp.c0000644000175000017500000000351611146671375012676 00000000000000/* Case-insensitive string comparison function. Copyright (C) 1998-1999, 2005-2007 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 3, 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. */ #include /* Specification. */ #include #include #include #define TOLOWER(Ch) (isupper (Ch) ? tolower (Ch) : (Ch)) /* Compare strings S1 and S2, ignoring case, returning less than, equal to or greater than zero if S1 is lexicographically less than, equal to or greater than S2. Note: This function does not work with multibyte strings! */ int strcasecmp (const char *s1, const char *s2) { const unsigned char *p1 = (const unsigned char *) s1; const unsigned char *p2 = (const unsigned char *) s2; unsigned char c1, c2; if (p1 == p2) return 0; do { c1 = TOLOWER (*p1); c2 = TOLOWER (*p2); if (c1 == '\0') break; ++p1; ++p2; } while (c1 == c2); if (UCHAR_MAX <= INT_MAX) return c1 - c2; else /* On machines where 'char' and 'int' are types of the same size, the difference of two 'unsigned char' values - including the sign bit - doesn't fit in an 'int'. */ return (c1 > c2 ? 1 : c1 < c2 ? -1 : 0); } gnuit-4.9.5/lib/intprops.h0000644000175000017500000000605011146671375012411 00000000000000/* intprops.h -- properties of integer types Copyright (C) 2001, 2002, 2003, 2004, 2005 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 3 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, see . */ /* Written by Paul Eggert. */ #include /* The extra casts in the following macros work around compiler bugs, e.g., in Cray C 5.0.3.0. */ /* True if the arithmetic type T is an integer type. bool counts as an integer. */ #define TYPE_IS_INTEGER(t) ((t) 1.5 == 1) /* True if negative values of the signed integer type T use two's complement, ones' complement, or signed magnitude representation, respectively. Much GNU code assumes two's complement, but some people like to be portable to all possible C hosts. */ #define TYPE_TWOS_COMPLEMENT(t) ((t) ~ (t) 0 == (t) -1) #define TYPE_ONES_COMPLEMENT(t) ((t) ~ (t) 0 == 0) #define TYPE_SIGNED_MAGNITUDE(t) ((t) ~ (t) 0 < (t) -1) /* True if the arithmetic type T is signed. */ #define TYPE_SIGNED(t) (! ((t) 0 < (t) -1)) /* The maximum and minimum values for the integer type T. These macros have undefined behavior if T is signed and has padding bits. If this is a problem for you, please let us know how to fix it for your host. */ #define TYPE_MINIMUM(t) \ ((t) (! TYPE_SIGNED (t) \ ? (t) 0 \ : TYPE_SIGNED_MAGNITUDE (t) \ ? ~ (t) 0 \ : ~ (t) 0 << (sizeof (t) * CHAR_BIT - 1))) #define TYPE_MAXIMUM(t) \ ((t) (! TYPE_SIGNED (t) \ ? (t) -1 \ : ~ (~ (t) 0 << (sizeof (t) * CHAR_BIT - 1)))) /* Return zero if T can be determined to be an unsigned type. Otherwise, return 1. When compiling with GCC, INT_STRLEN_BOUND uses this macro to obtain a tighter bound. Otherwise, it overestimates the true bound by one byte when applied to unsigned types of size 2, 4, 16, ... bytes. The symbol signed_type_or_expr__ is private to this header file. */ #if __GNUC__ >= 2 # define signed_type_or_expr__(t) TYPE_SIGNED (__typeof__ (t)) #else # define signed_type_or_expr__(t) 1 #endif /* Bound on length of the string representing an integer type or expression T. Subtract 1 for the sign bit if T is signed; log10 (2.0) < 146/485; add 1 for integer division truncation; add 1 more for a minus sign if needed. */ #define INT_STRLEN_BOUND(t) \ ((sizeof (t) * CHAR_BIT - signed_type_or_expr__ (t)) * 146 / 485 \ + signed_type_or_expr__ (t) + 1) /* Bound on buffer size needed to represent an integer type or expression T, including the terminating null. */ #define INT_BUFSIZE_BOUND(t) (INT_STRLEN_BOUND (t) + 1) gnuit-4.9.5/lib/wcwidth.c0000644000175000017500000000275711146671375012211 00000000000000/* Determine the number of screen columns needed for a character. Copyright (C) 2006, 2007 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 3 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, see . */ #include /* Specification. */ #include /* Get iswprint. */ #include #include "localcharset.h" #include "streq.h" #include "uniwidth.h" #undef wcwidth int rpl_wcwidth (wchar_t wc) { /* In UTF-8 locales, use a Unicode aware width function. */ const char *encoding = locale_charset (); if (STREQ (encoding, "UTF-8", 'U', 'T', 'F', '-', '8', 0, 0, 0 ,0)) { /* We assume that in a UTF-8 locale, a wide character is the same as a Unicode character. */ return uc_width (wc, encoding); } else { /* Otherwise, fall back to the system's wcwidth function. */ #if HAVE_WCWIDTH return wcwidth (wc); #else return wc == 0 ? 0 : iswprint (wc) ? 1 : -1; #endif } } gnuit-4.9.5/lib/quote.c0000644000175000017500000000240111146671375011657 00000000000000/* quote.c - quote arguments for output Copyright (C) 1998, 1999, 2000, 2001, 2003, 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 3 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, see . */ /* Written by Paul Eggert */ #include #include "quotearg.h" #include "quote.h" /* Return an unambiguous printable representation of NAME, allocated in slot N, suitable for diagnostics. */ char const * quote_n (int n, char const *name) { return quotearg_n_style (n, locale_quoting_style, name); } /* Return an unambiguous printable representation of NAME, suitable for diagnostics. */ char const * quote (char const *name) { return quote_n (0, name); } gnuit-4.9.5/lib/nanosleep.c0000644000175000017500000001000211146671375012502 00000000000000/* Provide a replacement for the POSIX nanosleep function. Copyright (C) 1999, 2000, 2002, 2004, 2005, 2006, 2007, 2008 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 3 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, see . */ /* written by Jim Meyering */ #include #include #include "sig-handler.h" #include "timespec.h" #include #include #include #include #include #include #include #include #undef nanosleep enum { BILLION = 1000 * 1000 * 1000 }; #if HAVE_BUG_BIG_NANOSLEEP static void getnow (struct timespec *t) { # if defined CLOCK_MONOTONIC && HAVE_CLOCK_GETTIME if (clock_gettime (CLOCK_MONOTONIC, t) == 0) return; # endif gettime (t); } int rpl_nanosleep (const struct timespec *requested_delay, struct timespec *remaining_delay) { /* nanosleep mishandles large sleeps due to internal overflow problems, so check that the proper amount of time has actually elapsed. */ struct timespec delay = *requested_delay; struct timespec t0; getnow (&t0); for (;;) { int r = nanosleep (&delay, remaining_delay); if (r == 0) { time_t secs_sofar; struct timespec now; getnow (&now); secs_sofar = now.tv_sec - t0.tv_sec; if (requested_delay->tv_sec < secs_sofar) return 0; delay.tv_sec = requested_delay->tv_sec - secs_sofar; delay.tv_nsec = requested_delay->tv_nsec - (now.tv_nsec - t0.tv_nsec); if (delay.tv_nsec < 0) { if (delay.tv_sec == 0) return 0; delay.tv_nsec += BILLION; delay.tv_sec--; } else if (BILLION <= delay.tv_nsec) { delay.tv_nsec -= BILLION; delay.tv_sec++; } } } } #else /* Some systems (MSDOS) don't have SIGCONT. Using SIGTERM here turns the signal-handling code below into a no-op on such systems. */ # ifndef SIGCONT # define SIGCONT SIGTERM # endif static sig_atomic_t volatile suspended; /* Handle SIGCONT. */ static void sighandler (int sig) { suspended = 1; } /* Suspend execution for at least *TS_DELAY seconds. */ static void my_usleep (const struct timespec *ts_delay) { struct timeval tv_delay; tv_delay.tv_sec = ts_delay->tv_sec; tv_delay.tv_usec = (ts_delay->tv_nsec + 999) / 1000; if (tv_delay.tv_usec == 1000000) { time_t t1 = tv_delay.tv_sec + 1; if (t1 < tv_delay.tv_sec) tv_delay.tv_usec = 1000000 - 1; /* close enough */ else { tv_delay.tv_sec = t1; tv_delay.tv_usec = 0; } } select (0, NULL, NULL, NULL, &tv_delay); } /* Suspend execution for at least *REQUESTED_DELAY seconds. The *REMAINING_DELAY part isn't implemented yet. */ int rpl_nanosleep (const struct timespec *requested_delay, struct timespec *remaining_delay) { static bool initialized; /* set up sig handler */ if (! initialized) { struct sigaction oldact; sigaction (SIGCONT, NULL, &oldact); if (get_handler (&oldact) != SIG_IGN) { struct sigaction newact; newact.sa_handler = sighandler; sigemptyset (&newact.sa_mask); newact.sa_flags = 0; sigaction (SIGCONT, &newact, NULL); } initialized = true; } suspended = 0; my_usleep (requested_delay); if (suspended) { /* Calculate time remaining. */ /* FIXME: the code in sleep doesn't use this, so there's no rush to implement it. */ errno = EINTR; } /* FIXME: Restore sig handler? */ return suspended; } #endif gnuit-4.9.5/lib/xstrndup.c0000644000175000017500000000223311146671375012414 00000000000000/* Duplicate a bounded initial segment of a string, with out-of-memory checking. Copyright (C) 2003, 2006, 2007 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 3 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, see . */ #include /* Specification. */ #include "xstrndup.h" #include #include "xalloc.h" /* Return a newly allocated copy of at most N bytes of STRING. In other words, return a copy of the initial segment of length N of STRING. */ char * xstrndup (const char *string, size_t n) { char *s = strndup (string, n); if (! s) xalloc_die (); return s; } gnuit-4.9.5/lib/mbuiter.h0000644000175000017500000001632611146671375012211 00000000000000/* Iterating through multibyte strings: macros for multi-byte encodings. Copyright (C) 2001, 2005, 2007 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 3 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, see . */ /* Written by Bruno Haible . */ /* The macros in this file implement forward iteration through a multi-byte string, without knowing its length a-priori. With these macros, an iteration loop that looks like char *iter; for (iter = buf; *iter != '\0'; iter++) { do_something (*iter); } becomes mbui_iterator_t iter; for (mbui_init (iter, buf); mbui_avail (iter); mbui_advance (iter)) { do_something (mbui_cur_ptr (iter), mb_len (mbui_cur (iter))); } The benefit of these macros over plain use of mbrtowc is: - Handling of invalid multibyte sequences is possible without making the code more complicated, while still preserving the invalid multibyte sequences. Compared to mbiter.h, the macros here don't need to know the string's length a-priori. The downside is that at each step, the look-ahead that guards against overrunning the terminating '\0' is more expensive. The mbui_* macros are therefore suitable when there is a high probability that only the first few multibyte characters need to be inspected. Whereas the mbi_* macros are better if usually the iteration runs through the entire string. mbui_iterator_t is a type usable for variable declarations. mbui_init (iter, startptr) initializes the iterator, starting at startptr. mbui_avail (iter) returns true if there are more multibyte chracters available before the end of string is reached. In this case, mbui_cur (iter) is initialized to the next multibyte chracter. mbui_advance (iter) advances the iterator by one multibyte character. mbui_cur (iter) returns the current multibyte character, of type mbchar_t. All the macros defined in mbchar.h can be used on it. mbui_cur_ptr (iter) return a pointer to the beginning of the current multibyte character. mbui_reloc (iter, ptrdiff) relocates iterator when the string is moved by ptrdiff bytes. mbui_copy (&destiter, &srciter) copies srciter to destiter. Here are the function prototypes of the macros. extern void mbui_init (mbui_iterator_t iter, const char *startptr); extern bool mbui_avail (mbui_iterator_t iter); extern void mbui_advance (mbui_iterator_t iter); extern mbchar_t mbui_cur (mbui_iterator_t iter); extern const char * mbui_cur_ptr (mbui_iterator_t iter); extern void mbui_reloc (mbui_iterator_t iter, ptrdiff_t ptrdiff); extern void mbui_copy (mbui_iterator_t *new, const mbui_iterator_t *old); */ #ifndef _MBUITER_H #define _MBUITER_H 1 #include #include #include #include #include /* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.1 has a bug: and must be included before . */ #include #include #include #include "mbchar.h" #include "strnlen1.h" struct mbuiter_multi { bool in_shift; /* true if next byte may not be interpreted as ASCII */ mbstate_t state; /* if in_shift: current shift state */ bool next_done; /* true if mbui_avail has already filled the following */ struct mbchar cur; /* the current character: const char *cur.ptr pointer to current character The following are only valid after mbui_avail. size_t cur.bytes number of bytes of current character bool cur.wc_valid true if wc is a valid wide character wchar_t cur.wc if wc_valid: the current character */ }; static inline void mbuiter_multi_next (struct mbuiter_multi *iter) { if (iter->next_done) return; if (iter->in_shift) goto with_shift; /* Handle most ASCII characters quickly, without calling mbrtowc(). */ if (is_basic (*iter->cur.ptr)) { /* These characters are part of the basic character set. ISO C 99 guarantees that their wide character code is identical to their char code. */ iter->cur.bytes = 1; iter->cur.wc = *iter->cur.ptr; iter->cur.wc_valid = true; } else { assert (mbsinit (&iter->state)); iter->in_shift = true; with_shift: iter->cur.bytes = mbrtowc (&iter->cur.wc, iter->cur.ptr, strnlen1 (iter->cur.ptr, MB_CUR_MAX), &iter->state); if (iter->cur.bytes == (size_t) -1) { /* An invalid multibyte sequence was encountered. */ iter->cur.bytes = 1; iter->cur.wc_valid = false; /* Whether to set iter->in_shift = false and reset iter->state or not is not very important; the string is bogus anyway. */ } else if (iter->cur.bytes == (size_t) -2) { /* An incomplete multibyte character at the end. */ iter->cur.bytes = strlen (iter->cur.ptr); iter->cur.wc_valid = false; /* Whether to set iter->in_shift = false and reset iter->state or not is not important; the string end is reached anyway. */ } else { if (iter->cur.bytes == 0) { /* A null wide character was encountered. */ iter->cur.bytes = 1; assert (*iter->cur.ptr == '\0'); assert (iter->cur.wc == 0); } iter->cur.wc_valid = true; /* When in the initial state, we can go back treating ASCII characters more quickly. */ if (mbsinit (&iter->state)) iter->in_shift = false; } } iter->next_done = true; } static inline void mbuiter_multi_reloc (struct mbuiter_multi *iter, ptrdiff_t ptrdiff) { iter->cur.ptr += ptrdiff; } static inline void mbuiter_multi_copy (struct mbuiter_multi *new_iter, const struct mbuiter_multi *old_iter) { if ((new_iter->in_shift = old_iter->in_shift)) memcpy (&new_iter->state, &old_iter->state, sizeof (mbstate_t)); else memset (&new_iter->state, 0, sizeof (mbstate_t)); new_iter->next_done = old_iter->next_done; mb_copy (&new_iter->cur, &old_iter->cur); } /* Iteration macros. */ typedef struct mbuiter_multi mbui_iterator_t; #define mbui_init(iter, startptr) \ ((iter).cur.ptr = (startptr), \ (iter).in_shift = false, memset (&(iter).state, '\0', sizeof (mbstate_t)), \ (iter).next_done = false) #define mbui_avail(iter) \ (mbuiter_multi_next (&(iter)), !mb_isnul ((iter).cur)) #define mbui_advance(iter) \ ((iter).cur.ptr += (iter).cur.bytes, (iter).next_done = false) /* Access to the current character. */ #define mbui_cur(iter) (iter).cur #define mbui_cur_ptr(iter) (iter).cur.ptr /* Relocation. */ #define mbui_reloc(iter, ptrdiff) mbuiter_multi_reloc (&iter, ptrdiff) /* Copying an iterator. */ #define mbui_copy mbuiter_multi_copy #endif /* _MBUITER_H */ gnuit-4.9.5/lib/unitypes.h0000644000175000017500000000171111146671375012412 00000000000000/* Elementary types for the GNU UniString library. Copyright (C) 2002, 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 3 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 Lesser General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ #ifndef _UNITYPES_H #define _UNITYPES_H /* Get uint8_t, uint16_t, uint32_t. */ #include /* Type representing a Unicode character. */ typedef uint32_t ucs4_t; #endif /* _UNITYPES_H */ gnuit-4.9.5/lib/strings.in.h0000644000175000017500000000627711146671375012644 00000000000000/* A substitute . Copyright (C) 2007-2008 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 3, 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. */ #ifndef _GL_STRINGS_H #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif /* The include_next requires a split double-inclusion guard. */ #@INCLUDE_NEXT@ @NEXT_STRINGS_H@ #ifndef _GL_STRINGS_H #define _GL_STRINGS_H /* The definition of GL_LINK_WARNING is copied here. */ #ifdef __cplusplus extern "C" { #endif /* Compare strings S1 and S2, ignoring case, returning less than, equal to or greater than zero if S1 is lexicographically less than, equal to or greater than S2. Note: This function does not work in multibyte locales. */ #if ! @HAVE_STRCASECMP@ extern int strcasecmp (char const *s1, char const *s2); #endif #if defined GNULIB_POSIXCHECK /* strcasecmp() does not work with multibyte strings: POSIX says that it operates on "strings", and "string" in POSIX is defined as a sequence of bytes, not of characters. */ # undef strcasecmp # define strcasecmp(a,b) \ (GL_LINK_WARNING ("strcasecmp cannot work correctly on character strings " \ "in multibyte locales - " \ "use mbscasecmp if you care about " \ "internationalization, or use c_strcasecmp (from " \ "gnulib module c-strcase) if you want a locale " \ "independent function"), \ strcasecmp (a, b)) #endif /* Compare no more than N bytes of strings S1 and S2, ignoring case, returning less than, equal to or greater than zero if S1 is lexicographically less than, equal to or greater than S2. Note: This function cannot work correctly in multibyte locales. */ #if ! @HAVE_DECL_STRNCASECMP@ extern int strncasecmp (char const *s1, char const *s2, size_t n); #endif #if defined GNULIB_POSIXCHECK /* strncasecmp() does not work with multibyte strings: POSIX says that it operates on "strings", and "string" in POSIX is defined as a sequence of bytes, not of characters. */ # undef strncasecmp # define strncasecmp(a,b,n) \ (GL_LINK_WARNING ("strncasecmp cannot work correctly on character " \ "strings in multibyte locales - " \ "use mbsncasecmp or mbspcasecmp if you care about " \ "internationalization, or use c_strncasecmp (from " \ "gnulib module c-strcase) if you want a locale " \ "independent function"), \ strncasecmp (a, b, n)) #endif #ifdef __cplusplus } #endif #endif /* _GL_STRING_H */ #endif /* _GL_STRING_H */ gnuit-4.9.5/lib/strnlen1.c0000644000175000017500000000235211146671375012275 00000000000000/* Find the length of STRING + 1, but scan at most MAXLEN bytes. Copyright (C) 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 3 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, see . */ #include /* Specification. */ #include "strnlen1.h" #include /* Find the length of STRING + 1, but scan at most MAXLEN bytes. If no '\0' terminator is found in that many characters, return MAXLEN. */ /* This is the same as strnlen (string, maxlen - 1) + 1. */ size_t strnlen1 (const char *string, size_t maxlen) { const char *end = (const char *) memchr (string, '\0', maxlen); if (end != NULL) return end - string + 1; else return maxlen; } gnuit-4.9.5/lib/ref-del.sin0000644000175000017500000000177411146671375012423 00000000000000# Remove this package from a list of references stored in a text file. # # Copyright (C) 2000 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 3, 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. # # Written by Bruno Haible . # /^# Packages using this file: / { s/# Packages using this file:// s/ @PACKAGE@ / / s/^/# Packages using this file:/ } gnuit-4.9.5/lib/str-two-way.h0000644000175000017500000003431311146671375012753 00000000000000/* Byte-wise substring search, using the Two-Way algorithm. Copyright (C) 2008 Free Software Foundation, Inc. This file is part of the GNU C Library. Written by Eric Blake , 2008. 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 3, 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. */ /* Before including this file, you need to include and , and define: RESULT_TYPE A macro that expands to the return type. AVAILABLE(h, h_l, j, n_l) A macro that returns nonzero if there are at least N_L bytes left starting at H[J]. H is 'unsigned char *', H_L, J, and N_L are 'size_t'; H_L is an lvalue. For NUL-terminated searches, H_L can be modified each iteration to avoid having to compute the end of H up front. For case-insensitivity, you may optionally define: CMP_FUNC(p1, p2, l) A macro that returns 0 iff the first L characters of P1 and P2 are equal. CANON_ELEMENT(c) A macro that canonicalizes an element right after it has been fetched from one of the two strings. The argument is an 'unsigned char'; the result must be an 'unsigned char' as well. This file undefines the macros documented above, and defines LONG_NEEDLE_THRESHOLD. */ #include #include /* We use the Two-Way string matching algorithm, which guarantees linear complexity with constant space. Additionally, for long needles, we also use a bad character shift table similar to the Boyer-Moore algorithm to achieve improved (potentially sub-linear) performance. See http://www-igm.univ-mlv.fr/~lecroq/string/node26.html#SECTION00260 and http://en.wikipedia.org/wiki/Boyer-Moore_string_search_algorithm */ /* Point at which computing a bad-byte shift table is likely to be worthwhile. Small needles should not compute a table, since it adds (1 << CHAR_BIT) + NEEDLE_LEN computations of preparation for a speedup no greater than a factor of NEEDLE_LEN. The larger the needle, the better the potential performance gain. On the other hand, on non-POSIX systems with CHAR_BIT larger than eight, the memory required for the table is prohibitive. */ #if CHAR_BIT < 10 # define LONG_NEEDLE_THRESHOLD 32U #else # define LONG_NEEDLE_THRESHOLD SIZE_MAX #endif #ifndef MAX # define MAX(a, b) ((a < b) ? (b) : (a)) #endif #ifndef CANON_ELEMENT # define CANON_ELEMENT(c) c #endif #ifndef CMP_FUNC # define CMP_FUNC memcmp #endif /* Perform a critical factorization of NEEDLE, of length NEEDLE_LEN. Return the index of the first byte in the right half, and set *PERIOD to the global period of the right half. The global period of a string is the smallest index (possibly its length) at which all remaining bytes in the string are repetitions of the prefix (the last repetition may be a subset of the prefix). When NEEDLE is factored into two halves, a local period is the length of the smallest word that shares a suffix with the left half and shares a prefix with the right half. All factorizations of a non-empty NEEDLE have a local period of at least 1 and no greater than NEEDLE_LEN. A critical factorization has the property that the local period equals the global period. All strings have at least one critical factorization with the left half smaller than the global period. Given an ordered alphabet, a critical factorization can be computed in linear time, with 2 * NEEDLE_LEN comparisons, by computing the larger of two ordered maximal suffixes. The ordered maximal suffixes are determined by lexicographic comparison of periodicity. */ static size_t critical_factorization (const unsigned char *needle, size_t needle_len, size_t *period) { /* Index of last byte of left half, or SIZE_MAX. */ size_t max_suffix, max_suffix_rev; size_t j; /* Index into NEEDLE for current candidate suffix. */ size_t k; /* Offset into current period. */ size_t p; /* Intermediate period. */ unsigned char a, b; /* Current comparison bytes. */ /* Invariants: 0 <= j < NEEDLE_LEN - 1 -1 <= max_suffix{,_rev} < j (treating SIZE_MAX as if it were signed) min(max_suffix, max_suffix_rev) < global period of NEEDLE 1 <= p <= global period of NEEDLE p == global period of the substring NEEDLE[max_suffix{,_rev}+1...j] 1 <= k <= p */ /* Perform lexicographic search. */ max_suffix = SIZE_MAX; j = 0; k = p = 1; while (j + k < needle_len) { a = CANON_ELEMENT (needle[j + k]); b = CANON_ELEMENT (needle[max_suffix + k]); if (a < b) { /* Suffix is smaller, period is entire prefix so far. */ j += k; k = 1; p = j - max_suffix; } else if (a == b) { /* Advance through repetition of the current period. */ if (k != p) ++k; else { j += p; k = 1; } } else /* b < a */ { /* Suffix is larger, start over from current location. */ max_suffix = j++; k = p = 1; } } *period = p; /* Perform reverse lexicographic search. */ max_suffix_rev = SIZE_MAX; j = 0; k = p = 1; while (j + k < needle_len) { a = CANON_ELEMENT (needle[j + k]); b = CANON_ELEMENT (needle[max_suffix_rev + k]); if (b < a) { /* Suffix is smaller, period is entire prefix so far. */ j += k; k = 1; p = j - max_suffix_rev; } else if (a == b) { /* Advance through repetition of the current period. */ if (k != p) ++k; else { j += p; k = 1; } } else /* a < b */ { /* Suffix is larger, start over from current location. */ max_suffix_rev = j++; k = p = 1; } } /* Choose the longer suffix. Return the first byte of the right half, rather than the last byte of the left half. */ if (max_suffix_rev + 1 < max_suffix + 1) return max_suffix + 1; *period = p; return max_suffix_rev + 1; } /* Return the first location of non-empty NEEDLE within HAYSTACK, or NULL. HAYSTACK_LEN is the minimum known length of HAYSTACK. This method is optimized for NEEDLE_LEN < LONG_NEEDLE_THRESHOLD. Performance is guaranteed to be linear, with an initialization cost of 2 * NEEDLE_LEN comparisons. If AVAILABLE does not modify HAYSTACK_LEN (as in memmem), then at most 2 * HAYSTACK_LEN - NEEDLE_LEN comparisons occur in searching. If AVAILABLE modifies HAYSTACK_LEN (as in strstr), then at most 3 * HAYSTACK_LEN - NEEDLE_LEN comparisons occur in searching. */ static RETURN_TYPE two_way_short_needle (const unsigned char *haystack, size_t haystack_len, const unsigned char *needle, size_t needle_len) { size_t i; /* Index into current byte of NEEDLE. */ size_t j; /* Index into current window of HAYSTACK. */ size_t period; /* The period of the right half of needle. */ size_t suffix; /* The index of the right half of needle. */ /* Factor the needle into two halves, such that the left half is smaller than the global period, and the right half is periodic (with a period as large as NEEDLE_LEN - suffix). */ suffix = critical_factorization (needle, needle_len, &period); /* Perform the search. Each iteration compares the right half first. */ if (CMP_FUNC (needle, needle + period, suffix) == 0) { /* Entire needle is periodic; a mismatch can only advance by the period, so use memory to avoid rescanning known occurrences of the period. */ size_t memory = 0; j = 0; while (AVAILABLE (haystack, haystack_len, j, needle_len)) { /* Scan for matches in right half. */ i = MAX (suffix, memory); while (i < needle_len && (CANON_ELEMENT (needle[i]) == CANON_ELEMENT (haystack[i + j]))) ++i; if (needle_len <= i) { /* Scan for matches in left half. */ i = suffix - 1; while (memory < i + 1 && (CANON_ELEMENT (needle[i]) == CANON_ELEMENT (haystack[i + j]))) --i; if (i + 1 < memory + 1) return (RETURN_TYPE) (haystack + j); /* No match, so remember how many repetitions of period on the right half were scanned. */ j += period; memory = needle_len - period; } else { j += i - suffix + 1; memory = 0; } } } else { /* The two halves of needle are distinct; no extra memory is required, and any mismatch results in a maximal shift. */ period = MAX (suffix, needle_len - suffix) + 1; j = 0; while (AVAILABLE (haystack, haystack_len, j, needle_len)) { /* Scan for matches in right half. */ i = suffix; while (i < needle_len && (CANON_ELEMENT (needle[i]) == CANON_ELEMENT (haystack[i + j]))) ++i; if (needle_len <= i) { /* Scan for matches in left half. */ i = suffix - 1; while (i != SIZE_MAX && (CANON_ELEMENT (needle[i]) == CANON_ELEMENT (haystack[i + j]))) --i; if (i == SIZE_MAX) return (RETURN_TYPE) (haystack + j); j += period; } else j += i - suffix + 1; } } return NULL; } /* Return the first location of non-empty NEEDLE within HAYSTACK, or NULL. HAYSTACK_LEN is the minimum known length of HAYSTACK. This method is optimized for LONG_NEEDLE_THRESHOLD <= NEEDLE_LEN. Performance is guaranteed to be linear, with an initialization cost of 3 * NEEDLE_LEN + (1 << CHAR_BIT) operations. If AVAILABLE does not modify HAYSTACK_LEN (as in memmem), then at most 2 * HAYSTACK_LEN - NEEDLE_LEN comparisons occur in searching, and sublinear performance O(HAYSTACK_LEN / NEEDLE_LEN) is possible. If AVAILABLE modifies HAYSTACK_LEN (as in strstr), then at most 3 * HAYSTACK_LEN - NEEDLE_LEN comparisons occur in searching, and sublinear performance is not possible. */ static RETURN_TYPE two_way_long_needle (const unsigned char *haystack, size_t haystack_len, const unsigned char *needle, size_t needle_len) { size_t i; /* Index into current byte of NEEDLE. */ size_t j; /* Index into current window of HAYSTACK. */ size_t period; /* The period of the right half of needle. */ size_t suffix; /* The index of the right half of needle. */ size_t shift_table[1U << CHAR_BIT]; /* See below. */ /* Factor the needle into two halves, such that the left half is smaller than the global period, and the right half is periodic (with a period as large as NEEDLE_LEN - suffix). */ suffix = critical_factorization (needle, needle_len, &period); /* Populate shift_table. For each possible byte value c, shift_table[c] is the distance from the last occurrence of c to the end of NEEDLE, or NEEDLE_LEN if c is absent from the NEEDLE. shift_table[NEEDLE[NEEDLE_LEN - 1]] contains the only 0. */ for (i = 0; i < 1U << CHAR_BIT; i++) shift_table[i] = needle_len; for (i = 0; i < needle_len; i++) shift_table[CANON_ELEMENT (needle[i])] = needle_len - i - 1; /* Perform the search. Each iteration compares the right half first. */ if (CMP_FUNC (needle, needle + period, suffix) == 0) { /* Entire needle is periodic; a mismatch can only advance by the period, so use memory to avoid rescanning known occurrences of the period. */ size_t memory = 0; size_t shift; j = 0; while (AVAILABLE (haystack, haystack_len, j, needle_len)) { /* Check the last byte first; if it does not match, then shift to the next possible match location. */ shift = shift_table[CANON_ELEMENT (haystack[j + needle_len - 1])]; if (0 < shift) { if (memory && shift < period) { /* Since needle is periodic, but the last period has a byte out of place, there can be no match until after the mismatch. */ shift = needle_len - period; memory = 0; } j += shift; continue; } /* Scan for matches in right half. The last byte has already been matched, by virtue of the shift table. */ i = MAX (suffix, memory); while (i < needle_len - 1 && (CANON_ELEMENT (needle[i]) == CANON_ELEMENT (haystack[i + j]))) ++i; if (needle_len - 1 <= i) { /* Scan for matches in left half. */ i = suffix - 1; while (memory < i + 1 && (CANON_ELEMENT (needle[i]) == CANON_ELEMENT (haystack[i + j]))) --i; if (i + 1 < memory + 1) return (RETURN_TYPE) (haystack + j); /* No match, so remember how many repetitions of period on the right half were scanned. */ j += period; memory = needle_len - period; } else { j += i - suffix + 1; memory = 0; } } } else { /* The two halves of needle are distinct; no extra memory is required, and any mismatch results in a maximal shift. */ size_t shift; period = MAX (suffix, needle_len - suffix) + 1; j = 0; while (AVAILABLE (haystack, haystack_len, j, needle_len)) { /* Check the last byte first; if it does not match, then shift to the next possible match location. */ shift = shift_table[CANON_ELEMENT (haystack[j + needle_len - 1])]; if (0 < shift) { j += shift; continue; } /* Scan for matches in right half. The last byte has already been matched, by virtue of the shift table. */ i = suffix; while (i < needle_len - 1 && (CANON_ELEMENT (needle[i]) == CANON_ELEMENT (haystack[i + j]))) ++i; if (needle_len - 1 <= i) { /* Scan for matches in left half. */ i = suffix - 1; while (i != SIZE_MAX && (CANON_ELEMENT (needle[i]) == CANON_ELEMENT (haystack[i + j]))) --i; if (i == SIZE_MAX) return (RETURN_TYPE) (haystack + j); j += period; } else j += i - suffix + 1; } } return NULL; } #undef AVAILABLE #undef CANON_ELEMENT #undef CMP_FUNC #undef MAX #undef RETURN_TYPE gnuit-4.9.5/lib/inttypes.in.h0000644000175000017500000006362411146671375013031 00000000000000/* Copyright (C) 2006-2008 Free Software Foundation, Inc. Written by Paul Eggert, Bruno Haible, Derek Price. This file is part of gnulib. 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 3 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, see . */ /* * ISO C 99 for platforms that lack it. * */ /* Include the original if it exists, and if this file has not been included yet or if this file includes gnulib stdint.h which in turn includes this file. The include_next requires a split double-inclusion guard. */ #if ! defined INTTYPES_H || defined _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H # if @HAVE_INTTYPES_H@ # if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ # endif # @INCLUDE_NEXT@ @NEXT_INTTYPES_H@ # endif #endif #if ! defined INTTYPES_H && ! defined _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H #define INTTYPES_H /* Include or the gnulib replacement. */ #include /* Get CHAR_BIT. */ #include #if !(INT_MIN == INT32_MIN && INT_MAX == INT32_MAX) # error "This file assumes that 'int' has exactly 32 bits. Please report your platform and compiler to ." #endif /* The definition of GL_LINK_WARNING is copied here. */ /* 7.8.1 Macros for format specifiers */ #if ! defined __cplusplus || defined __STDC_FORMAT_MACROS # if defined _TNS_R_TARGET /* Tandem NonStop R series and compatible platforms released before July 2005 support %Ld but not %lld. */ # define _LONG_LONG_FORMAT_PREFIX "L" # else # define _LONG_LONG_FORMAT_PREFIX "ll" # endif # if !defined PRId8 || @PRI_MACROS_BROKEN@ # undef PRId8 # ifdef INT8_MAX # define PRId8 "d" # endif # endif # if !defined PRIi8 || @PRI_MACROS_BROKEN@ # undef PRIi8 # ifdef INT8_MAX # define PRIi8 "i" # endif # endif # if !defined PRIo8 || @PRI_MACROS_BROKEN@ # undef PRIo8 # ifdef UINT8_MAX # define PRIo8 "o" # endif # endif # if !defined PRIu8 || @PRI_MACROS_BROKEN@ # undef PRIu8 # ifdef UINT8_MAX # define PRIu8 "u" # endif # endif # if !defined PRIx8 || @PRI_MACROS_BROKEN@ # undef PRIx8 # ifdef UINT8_MAX # define PRIx8 "x" # endif # endif # if !defined PRIX8 || @PRI_MACROS_BROKEN@ # undef PRIX8 # ifdef UINT8_MAX # define PRIX8 "X" # endif # endif # if !defined PRId16 || @PRI_MACROS_BROKEN@ # undef PRId16 # ifdef INT16_MAX # define PRId16 "d" # endif # endif # if !defined PRIi16 || @PRI_MACROS_BROKEN@ # undef PRIi16 # ifdef INT16_MAX # define PRIi16 "i" # endif # endif # if !defined PRIo16 || @PRI_MACROS_BROKEN@ # undef PRIo16 # ifdef UINT16_MAX # define PRIo16 "o" # endif # endif # if !defined PRIu16 || @PRI_MACROS_BROKEN@ # undef PRIu16 # ifdef UINT16_MAX # define PRIu16 "u" # endif # endif # if !defined PRIx16 || @PRI_MACROS_BROKEN@ # undef PRIx16 # ifdef UINT16_MAX # define PRIx16 "x" # endif # endif # if !defined PRIX16 || @PRI_MACROS_BROKEN@ # undef PRIX16 # ifdef UINT16_MAX # define PRIX16 "X" # endif # endif # if !defined PRId32 || @PRI_MACROS_BROKEN@ # undef PRId32 # ifdef INT32_MAX # define PRId32 "d" # endif # endif # if !defined PRIi32 || @PRI_MACROS_BROKEN@ # undef PRIi32 # ifdef INT32_MAX # define PRIi32 "i" # endif # endif # if !defined PRIo32 || @PRI_MACROS_BROKEN@ # undef PRIo32 # ifdef UINT32_MAX # define PRIo32 "o" # endif # endif # if !defined PRIu32 || @PRI_MACROS_BROKEN@ # undef PRIu32 # ifdef UINT32_MAX # define PRIu32 "u" # endif # endif # if !defined PRIx32 || @PRI_MACROS_BROKEN@ # undef PRIx32 # ifdef UINT32_MAX # define PRIx32 "x" # endif # endif # if !defined PRIX32 || @PRI_MACROS_BROKEN@ # undef PRIX32 # ifdef UINT32_MAX # define PRIX32 "X" # endif # endif # ifdef INT64_MAX # if (@APPLE_UNIVERSAL_BUILD@ ? _LP64 : @INT64_MAX_EQ_LONG_MAX@) # define _PRI64_PREFIX "l" # elif defined _MSC_VER || defined __MINGW32__ # define _PRI64_PREFIX "I64" # elif @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1 # define _PRI64_PREFIX _LONG_LONG_FORMAT_PREFIX # endif # if !defined PRId64 || @PRI_MACROS_BROKEN@ # undef PRId64 # define PRId64 _PRI64_PREFIX "d" # endif # if !defined PRIi64 || @PRI_MACROS_BROKEN@ # undef PRIi64 # define PRIi64 _PRI64_PREFIX "i" # endif # endif # ifdef UINT64_MAX # if (@APPLE_UNIVERSAL_BUILD@ ? _LP64 : @UINT64_MAX_EQ_ULONG_MAX@) # define _PRIu64_PREFIX "l" # elif defined _MSC_VER || defined __MINGW32__ # define _PRIu64_PREFIX "I64" # elif @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1 # define _PRIu64_PREFIX _LONG_LONG_FORMAT_PREFIX # endif # if !defined PRIo64 || @PRI_MACROS_BROKEN@ # undef PRIo64 # define PRIo64 _PRIu64_PREFIX "o" # endif # if !defined PRIu64 || @PRI_MACROS_BROKEN@ # undef PRIu64 # define PRIu64 _PRIu64_PREFIX "u" # endif # if !defined PRIx64 || @PRI_MACROS_BROKEN@ # undef PRIx64 # define PRIx64 _PRIu64_PREFIX "x" # endif # if !defined PRIX64 || @PRI_MACROS_BROKEN@ # undef PRIX64 # define PRIX64 _PRIu64_PREFIX "X" # endif # endif # if !defined PRIdLEAST8 || @PRI_MACROS_BROKEN@ # undef PRIdLEAST8 # define PRIdLEAST8 "d" # endif # if !defined PRIiLEAST8 || @PRI_MACROS_BROKEN@ # undef PRIiLEAST8 # define PRIiLEAST8 "i" # endif # if !defined PRIoLEAST8 || @PRI_MACROS_BROKEN@ # undef PRIoLEAST8 # define PRIoLEAST8 "o" # endif # if !defined PRIuLEAST8 || @PRI_MACROS_BROKEN@ # undef PRIuLEAST8 # define PRIuLEAST8 "u" # endif # if !defined PRIxLEAST8 || @PRI_MACROS_BROKEN@ # undef PRIxLEAST8 # define PRIxLEAST8 "x" # endif # if !defined PRIXLEAST8 || @PRI_MACROS_BROKEN@ # undef PRIXLEAST8 # define PRIXLEAST8 "X" # endif # if !defined PRIdLEAST16 || @PRI_MACROS_BROKEN@ # undef PRIdLEAST16 # define PRIdLEAST16 "d" # endif # if !defined PRIiLEAST16 || @PRI_MACROS_BROKEN@ # undef PRIiLEAST16 # define PRIiLEAST16 "i" # endif # if !defined PRIoLEAST16 || @PRI_MACROS_BROKEN@ # undef PRIoLEAST16 # define PRIoLEAST16 "o" # endif # if !defined PRIuLEAST16 || @PRI_MACROS_BROKEN@ # undef PRIuLEAST16 # define PRIuLEAST16 "u" # endif # if !defined PRIxLEAST16 || @PRI_MACROS_BROKEN@ # undef PRIxLEAST16 # define PRIxLEAST16 "x" # endif # if !defined PRIXLEAST16 || @PRI_MACROS_BROKEN@ # undef PRIXLEAST16 # define PRIXLEAST16 "X" # endif # if !defined PRIdLEAST32 || @PRI_MACROS_BROKEN@ # undef PRIdLEAST32 # define PRIdLEAST32 "d" # endif # if !defined PRIiLEAST32 || @PRI_MACROS_BROKEN@ # undef PRIiLEAST32 # define PRIiLEAST32 "i" # endif # if !defined PRIoLEAST32 || @PRI_MACROS_BROKEN@ # undef PRIoLEAST32 # define PRIoLEAST32 "o" # endif # if !defined PRIuLEAST32 || @PRI_MACROS_BROKEN@ # undef PRIuLEAST32 # define PRIuLEAST32 "u" # endif # if !defined PRIxLEAST32 || @PRI_MACROS_BROKEN@ # undef PRIxLEAST32 # define PRIxLEAST32 "x" # endif # if !defined PRIXLEAST32 || @PRI_MACROS_BROKEN@ # undef PRIXLEAST32 # define PRIXLEAST32 "X" # endif # ifdef INT64_MAX # if !defined PRIdLEAST64 || @PRI_MACROS_BROKEN@ # undef PRIdLEAST64 # define PRIdLEAST64 PRId64 # endif # if !defined PRIiLEAST64 || @PRI_MACROS_BROKEN@ # undef PRIiLEAST64 # define PRIiLEAST64 PRIi64 # endif # endif # ifdef UINT64_MAX # if !defined PRIoLEAST64 || @PRI_MACROS_BROKEN@ # undef PRIoLEAST64 # define PRIoLEAST64 PRIo64 # endif # if !defined PRIuLEAST64 || @PRI_MACROS_BROKEN@ # undef PRIuLEAST64 # define PRIuLEAST64 PRIu64 # endif # if !defined PRIxLEAST64 || @PRI_MACROS_BROKEN@ # undef PRIxLEAST64 # define PRIxLEAST64 PRIx64 # endif # if !defined PRIXLEAST64 || @PRI_MACROS_BROKEN@ # undef PRIXLEAST64 # define PRIXLEAST64 PRIX64 # endif # endif # if !defined PRIdFAST8 || @PRI_MACROS_BROKEN@ # undef PRIdFAST8 # if INT_FAST8_MAX > INT32_MAX # define PRIdFAST8 PRId64 # else # define PRIdFAST8 "d" # endif # endif # if !defined PRIiFAST8 || @PRI_MACROS_BROKEN@ # undef PRIiFAST8 # if INT_FAST8_MAX > INT32_MAX # define PRIiFAST8 PRIi64 # else # define PRIiFAST8 "i" # endif # endif # if !defined PRIoFAST8 || @PRI_MACROS_BROKEN@ # undef PRIoFAST8 # if UINT_FAST8_MAX > UINT32_MAX # define PRIoFAST8 PRIo64 # else # define PRIoFAST8 "o" # endif # endif # if !defined PRIuFAST8 || @PRI_MACROS_BROKEN@ # undef PRIuFAST8 # if UINT_FAST8_MAX > UINT32_MAX # define PRIuFAST8 PRIu64 # else # define PRIuFAST8 "u" # endif # endif # if !defined PRIxFAST8 || @PRI_MACROS_BROKEN@ # undef PRIxFAST8 # if UINT_FAST8_MAX > UINT32_MAX # define PRIxFAST8 PRIx64 # else # define PRIxFAST8 "x" # endif # endif # if !defined PRIXFAST8 || @PRI_MACROS_BROKEN@ # undef PRIXFAST8 # if UINT_FAST8_MAX > UINT32_MAX # define PRIXFAST8 PRIX64 # else # define PRIXFAST8 "X" # endif # endif # if !defined PRIdFAST16 || @PRI_MACROS_BROKEN@ # undef PRIdFAST16 # if INT_FAST16_MAX > INT32_MAX # define PRIdFAST16 PRId64 # else # define PRIdFAST16 "d" # endif # endif # if !defined PRIiFAST16 || @PRI_MACROS_BROKEN@ # undef PRIiFAST16 # if INT_FAST16_MAX > INT32_MAX # define PRIiFAST16 PRIi64 # else # define PRIiFAST16 "i" # endif # endif # if !defined PRIoFAST16 || @PRI_MACROS_BROKEN@ # undef PRIoFAST16 # if UINT_FAST16_MAX > UINT32_MAX # define PRIoFAST16 PRIo64 # else # define PRIoFAST16 "o" # endif # endif # if !defined PRIuFAST16 || @PRI_MACROS_BROKEN@ # undef PRIuFAST16 # if UINT_FAST16_MAX > UINT32_MAX # define PRIuFAST16 PRIu64 # else # define PRIuFAST16 "u" # endif # endif # if !defined PRIxFAST16 || @PRI_MACROS_BROKEN@ # undef PRIxFAST16 # if UINT_FAST16_MAX > UINT32_MAX # define PRIxFAST16 PRIx64 # else # define PRIxFAST16 "x" # endif # endif # if !defined PRIXFAST16 || @PRI_MACROS_BROKEN@ # undef PRIXFAST16 # if UINT_FAST16_MAX > UINT32_MAX # define PRIXFAST16 PRIX64 # else # define PRIXFAST16 "X" # endif # endif # if !defined PRIdFAST32 || @PRI_MACROS_BROKEN@ # undef PRIdFAST32 # if INT_FAST32_MAX > INT32_MAX # define PRIdFAST32 PRId64 # else # define PRIdFAST32 "d" # endif # endif # if !defined PRIiFAST32 || @PRI_MACROS_BROKEN@ # undef PRIiFAST32 # if INT_FAST32_MAX > INT32_MAX # define PRIiFAST32 PRIi64 # else # define PRIiFAST32 "i" # endif # endif # if !defined PRIoFAST32 || @PRI_MACROS_BROKEN@ # undef PRIoFAST32 # if UINT_FAST32_MAX > UINT32_MAX # define PRIoFAST32 PRIo64 # else # define PRIoFAST32 "o" # endif # endif # if !defined PRIuFAST32 || @PRI_MACROS_BROKEN@ # undef PRIuFAST32 # if UINT_FAST32_MAX > UINT32_MAX # define PRIuFAST32 PRIu64 # else # define PRIuFAST32 "u" # endif # endif # if !defined PRIxFAST32 || @PRI_MACROS_BROKEN@ # undef PRIxFAST32 # if UINT_FAST32_MAX > UINT32_MAX # define PRIxFAST32 PRIx64 # else # define PRIxFAST32 "x" # endif # endif # if !defined PRIXFAST32 || @PRI_MACROS_BROKEN@ # undef PRIXFAST32 # if UINT_FAST32_MAX > UINT32_MAX # define PRIXFAST32 PRIX64 # else # define PRIXFAST32 "X" # endif # endif # ifdef INT64_MAX # if !defined PRIdFAST64 || @PRI_MACROS_BROKEN@ # undef PRIdFAST64 # define PRIdFAST64 PRId64 # endif # if !defined PRIiFAST64 || @PRI_MACROS_BROKEN@ # undef PRIiFAST64 # define PRIiFAST64 PRIi64 # endif # endif # ifdef UINT64_MAX # if !defined PRIoFAST64 || @PRI_MACROS_BROKEN@ # undef PRIoFAST64 # define PRIoFAST64 PRIo64 # endif # if !defined PRIuFAST64 || @PRI_MACROS_BROKEN@ # undef PRIuFAST64 # define PRIuFAST64 PRIu64 # endif # if !defined PRIxFAST64 || @PRI_MACROS_BROKEN@ # undef PRIxFAST64 # define PRIxFAST64 PRIx64 # endif # if !defined PRIXFAST64 || @PRI_MACROS_BROKEN@ # undef PRIXFAST64 # define PRIXFAST64 PRIX64 # endif # endif # if !defined PRIdMAX || @PRI_MACROS_BROKEN@ # undef PRIdMAX # if @INT32_MAX_LT_INTMAX_MAX@ # define PRIdMAX PRId64 # else # define PRIdMAX "ld" # endif # endif # if !defined PRIiMAX || @PRI_MACROS_BROKEN@ # undef PRIiMAX # if @INT32_MAX_LT_INTMAX_MAX@ # define PRIiMAX PRIi64 # else # define PRIiMAX "li" # endif # endif # if !defined PRIoMAX || @PRI_MACROS_BROKEN@ # undef PRIoMAX # if @UINT32_MAX_LT_UINTMAX_MAX@ # define PRIoMAX PRIo64 # else # define PRIoMAX "lo" # endif # endif # if !defined PRIuMAX || @PRI_MACROS_BROKEN@ # undef PRIuMAX # if @UINT32_MAX_LT_UINTMAX_MAX@ # define PRIuMAX PRIu64 # else # define PRIuMAX "lu" # endif # endif # if !defined PRIxMAX || @PRI_MACROS_BROKEN@ # undef PRIxMAX # if @UINT32_MAX_LT_UINTMAX_MAX@ # define PRIxMAX PRIx64 # else # define PRIxMAX "lx" # endif # endif # if !defined PRIXMAX || @PRI_MACROS_BROKEN@ # undef PRIXMAX # if @UINT32_MAX_LT_UINTMAX_MAX@ # define PRIXMAX PRIX64 # else # define PRIXMAX "lX" # endif # endif # if !defined PRIdPTR || @PRI_MACROS_BROKEN@ # undef PRIdPTR # ifdef INTPTR_MAX # define PRIdPTR @PRIPTR_PREFIX@ "d" # endif # endif # if !defined PRIiPTR || @PRI_MACROS_BROKEN@ # undef PRIiPTR # ifdef INTPTR_MAX # define PRIiPTR @PRIPTR_PREFIX@ "i" # endif # endif # if !defined PRIoPTR || @PRI_MACROS_BROKEN@ # undef PRIoPTR # ifdef UINTPTR_MAX # define PRIoPTR @PRIPTR_PREFIX@ "o" # endif # endif # if !defined PRIuPTR || @PRI_MACROS_BROKEN@ # undef PRIuPTR # ifdef UINTPTR_MAX # define PRIuPTR @PRIPTR_PREFIX@ "u" # endif # endif # if !defined PRIxPTR || @PRI_MACROS_BROKEN@ # undef PRIxPTR # ifdef UINTPTR_MAX # define PRIxPTR @PRIPTR_PREFIX@ "x" # endif # endif # if !defined PRIXPTR || @PRI_MACROS_BROKEN@ # undef PRIXPTR # ifdef UINTPTR_MAX # define PRIXPTR @PRIPTR_PREFIX@ "X" # endif # endif # if !defined SCNd8 || @PRI_MACROS_BROKEN@ # undef SCNd8 # ifdef INT8_MAX # define SCNd8 "hhd" # endif # endif # if !defined SCNi8 || @PRI_MACROS_BROKEN@ # undef SCNi8 # ifdef INT8_MAX # define SCNi8 "hhi" # endif # endif # if !defined SCNo8 || @PRI_MACROS_BROKEN@ # undef SCNo8 # ifdef UINT8_MAX # define SCNo8 "hho" # endif # endif # if !defined SCNu8 || @PRI_MACROS_BROKEN@ # undef SCNu8 # ifdef UINT8_MAX # define SCNu8 "hhu" # endif # endif # if !defined SCNx8 || @PRI_MACROS_BROKEN@ # undef SCNx8 # ifdef UINT8_MAX # define SCNx8 "hhx" # endif # endif # if !defined SCNd16 || @PRI_MACROS_BROKEN@ # undef SCNd16 # ifdef INT16_MAX # define SCNd16 "hd" # endif # endif # if !defined SCNi16 || @PRI_MACROS_BROKEN@ # undef SCNi16 # ifdef INT16_MAX # define SCNi16 "hi" # endif # endif # if !defined SCNo16 || @PRI_MACROS_BROKEN@ # undef SCNo16 # ifdef UINT16_MAX # define SCNo16 "ho" # endif # endif # if !defined SCNu16 || @PRI_MACROS_BROKEN@ # undef SCNu16 # ifdef UINT16_MAX # define SCNu16 "hu" # endif # endif # if !defined SCNx16 || @PRI_MACROS_BROKEN@ # undef SCNx16 # ifdef UINT16_MAX # define SCNx16 "hx" # endif # endif # if !defined SCNd32 || @PRI_MACROS_BROKEN@ # undef SCNd32 # ifdef INT32_MAX # define SCNd32 "d" # endif # endif # if !defined SCNi32 || @PRI_MACROS_BROKEN@ # undef SCNi32 # ifdef INT32_MAX # define SCNi32 "i" # endif # endif # if !defined SCNo32 || @PRI_MACROS_BROKEN@ # undef SCNo32 # ifdef UINT32_MAX # define SCNo32 "o" # endif # endif # if !defined SCNu32 || @PRI_MACROS_BROKEN@ # undef SCNu32 # ifdef UINT32_MAX # define SCNu32 "u" # endif # endif # if !defined SCNx32 || @PRI_MACROS_BROKEN@ # undef SCNx32 # ifdef UINT32_MAX # define SCNx32 "x" # endif # endif # ifdef INT64_MAX # if (@APPLE_UNIVERSAL_BUILD@ ? _LP64 : @INT64_MAX_EQ_LONG_MAX@) # define _SCN64_PREFIX "l" # elif defined _MSC_VER || defined __MINGW32__ # define _SCN64_PREFIX "I64" # elif @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1 # define _SCN64_PREFIX _LONG_LONG_FORMAT_PREFIX # endif # if !defined SCNd64 || @PRI_MACROS_BROKEN@ # undef SCNd64 # define SCNd64 _SCN64_PREFIX "d" # endif # if !defined SCNi64 || @PRI_MACROS_BROKEN@ # undef SCNi64 # define SCNi64 _SCN64_PREFIX "i" # endif # endif # ifdef UINT64_MAX # if (@APPLE_UNIVERSAL_BUILD@ ? _LP64 : @UINT64_MAX_EQ_ULONG_MAX@) # define _SCNu64_PREFIX "l" # elif defined _MSC_VER || defined __MINGW32__ # define _SCNu64_PREFIX "I64" # elif @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1 # define _SCNu64_PREFIX _LONG_LONG_FORMAT_PREFIX # endif # if !defined SCNo64 || @PRI_MACROS_BROKEN@ # undef SCNo64 # define SCNo64 _SCNu64_PREFIX "o" # endif # if !defined SCNu64 || @PRI_MACROS_BROKEN@ # undef SCNu64 # define SCNu64 _SCNu64_PREFIX "u" # endif # if !defined SCNx64 || @PRI_MACROS_BROKEN@ # undef SCNx64 # define SCNx64 _SCNu64_PREFIX "x" # endif # endif # if !defined SCNdLEAST8 || @PRI_MACROS_BROKEN@ # undef SCNdLEAST8 # define SCNdLEAST8 "hhd" # endif # if !defined SCNiLEAST8 || @PRI_MACROS_BROKEN@ # undef SCNiLEAST8 # define SCNiLEAST8 "hhi" # endif # if !defined SCNoLEAST8 || @PRI_MACROS_BROKEN@ # undef SCNoLEAST8 # define SCNoLEAST8 "hho" # endif # if !defined SCNuLEAST8 || @PRI_MACROS_BROKEN@ # undef SCNuLEAST8 # define SCNuLEAST8 "hhu" # endif # if !defined SCNxLEAST8 || @PRI_MACROS_BROKEN@ # undef SCNxLEAST8 # define SCNxLEAST8 "hhx" # endif # if !defined SCNdLEAST16 || @PRI_MACROS_BROKEN@ # undef SCNdLEAST16 # define SCNdLEAST16 "hd" # endif # if !defined SCNiLEAST16 || @PRI_MACROS_BROKEN@ # undef SCNiLEAST16 # define SCNiLEAST16 "hi" # endif # if !defined SCNoLEAST16 || @PRI_MACROS_BROKEN@ # undef SCNoLEAST16 # define SCNoLEAST16 "ho" # endif # if !defined SCNuLEAST16 || @PRI_MACROS_BROKEN@ # undef SCNuLEAST16 # define SCNuLEAST16 "hu" # endif # if !defined SCNxLEAST16 || @PRI_MACROS_BROKEN@ # undef SCNxLEAST16 # define SCNxLEAST16 "hx" # endif # if !defined SCNdLEAST32 || @PRI_MACROS_BROKEN@ # undef SCNdLEAST32 # define SCNdLEAST32 "d" # endif # if !defined SCNiLEAST32 || @PRI_MACROS_BROKEN@ # undef SCNiLEAST32 # define SCNiLEAST32 "i" # endif # if !defined SCNoLEAST32 || @PRI_MACROS_BROKEN@ # undef SCNoLEAST32 # define SCNoLEAST32 "o" # endif # if !defined SCNuLEAST32 || @PRI_MACROS_BROKEN@ # undef SCNuLEAST32 # define SCNuLEAST32 "u" # endif # if !defined SCNxLEAST32 || @PRI_MACROS_BROKEN@ # undef SCNxLEAST32 # define SCNxLEAST32 "x" # endif # ifdef INT64_MAX # if !defined SCNdLEAST64 || @PRI_MACROS_BROKEN@ # undef SCNdLEAST64 # define SCNdLEAST64 SCNd64 # endif # if !defined SCNiLEAST64 || @PRI_MACROS_BROKEN@ # undef SCNiLEAST64 # define SCNiLEAST64 SCNi64 # endif # endif # ifdef UINT64_MAX # if !defined SCNoLEAST64 || @PRI_MACROS_BROKEN@ # undef SCNoLEAST64 # define SCNoLEAST64 SCNo64 # endif # if !defined SCNuLEAST64 || @PRI_MACROS_BROKEN@ # undef SCNuLEAST64 # define SCNuLEAST64 SCNu64 # endif # if !defined SCNxLEAST64 || @PRI_MACROS_BROKEN@ # undef SCNxLEAST64 # define SCNxLEAST64 SCNx64 # endif # endif # if !defined SCNdFAST8 || @PRI_MACROS_BROKEN@ # undef SCNdFAST8 # if INT_FAST8_MAX > INT32_MAX # define SCNdFAST8 SCNd64 # elif INT_FAST8_MAX == 0x7fff # define SCNdFAST8 "hd" # elif INT_FAST8_MAX == 0x7f # define SCNdFAST8 "hhd" # else # define SCNdFAST8 "d" # endif # endif # if !defined SCNiFAST8 || @PRI_MACROS_BROKEN@ # undef SCNiFAST8 # if INT_FAST8_MAX > INT32_MAX # define SCNiFAST8 SCNi64 # elif INT_FAST8_MAX == 0x7fff # define SCNiFAST8 "hi" # elif INT_FAST8_MAX == 0x7f # define SCNiFAST8 "hhi" # else # define SCNiFAST8 "i" # endif # endif # if !defined SCNoFAST8 || @PRI_MACROS_BROKEN@ # undef SCNoFAST8 # if UINT_FAST8_MAX > UINT32_MAX # define SCNoFAST8 SCNo64 # elif UINT_FAST8_MAX == 0xffff # define SCNoFAST8 "ho" # elif UINT_FAST8_MAX == 0xff # define SCNoFAST8 "hho" # else # define SCNoFAST8 "o" # endif # endif # if !defined SCNuFAST8 || @PRI_MACROS_BROKEN@ # undef SCNuFAST8 # if UINT_FAST8_MAX > UINT32_MAX # define SCNuFAST8 SCNu64 # elif UINT_FAST8_MAX == 0xffff # define SCNuFAST8 "hu" # elif UINT_FAST8_MAX == 0xff # define SCNuFAST8 "hhu" # else # define SCNuFAST8 "u" # endif # endif # if !defined SCNxFAST8 || @PRI_MACROS_BROKEN@ # undef SCNxFAST8 # if UINT_FAST8_MAX > UINT32_MAX # define SCNxFAST8 SCNx64 # elif UINT_FAST8_MAX == 0xffff # define SCNxFAST8 "hx" # elif UINT_FAST8_MAX == 0xff # define SCNxFAST8 "hhx" # else # define SCNxFAST8 "x" # endif # endif # if !defined SCNdFAST16 || @PRI_MACROS_BROKEN@ # undef SCNdFAST16 # if INT_FAST16_MAX > INT32_MAX # define SCNdFAST16 SCNd64 # elif INT_FAST16_MAX == 0x7fff # define SCNdFAST16 "hd" # else # define SCNdFAST16 "d" # endif # endif # if !defined SCNiFAST16 || @PRI_MACROS_BROKEN@ # undef SCNiFAST16 # if INT_FAST16_MAX > INT32_MAX # define SCNiFAST16 SCNi64 # elif INT_FAST16_MAX == 0x7fff # define SCNiFAST16 "hi" # else # define SCNiFAST16 "i" # endif # endif # if !defined SCNoFAST16 || @PRI_MACROS_BROKEN@ # undef SCNoFAST16 # if UINT_FAST16_MAX > UINT32_MAX # define SCNoFAST16 SCNo64 # elif UINT_FAST16_MAX == 0xffff # define SCNoFAST16 "ho" # else # define SCNoFAST16 "o" # endif # endif # if !defined SCNuFAST16 || @PRI_MACROS_BROKEN@ # undef SCNuFAST16 # if UINT_FAST16_MAX > UINT32_MAX # define SCNuFAST16 SCNu64 # elif UINT_FAST16_MAX == 0xffff # define SCNuFAST16 "hu" # else # define SCNuFAST16 "u" # endif # endif # if !defined SCNxFAST16 || @PRI_MACROS_BROKEN@ # undef SCNxFAST16 # if UINT_FAST16_MAX > UINT32_MAX # define SCNxFAST16 SCNx64 # elif UINT_FAST16_MAX == 0xffff # define SCNxFAST16 "hx" # else # define SCNxFAST16 "x" # endif # endif # if !defined SCNdFAST32 || @PRI_MACROS_BROKEN@ # undef SCNdFAST32 # if INT_FAST32_MAX > INT32_MAX # define SCNdFAST32 SCNd64 # else # define SCNdFAST32 "d" # endif # endif # if !defined SCNiFAST32 || @PRI_MACROS_BROKEN@ # undef SCNiFAST32 # if INT_FAST32_MAX > INT32_MAX # define SCNiFAST32 SCNi64 # else # define SCNiFAST32 "i" # endif # endif # if !defined SCNoFAST32 || @PRI_MACROS_BROKEN@ # undef SCNoFAST32 # if UINT_FAST32_MAX > UINT32_MAX # define SCNoFAST32 SCNo64 # else # define SCNoFAST32 "o" # endif # endif # if !defined SCNuFAST32 || @PRI_MACROS_BROKEN@ # undef SCNuFAST32 # if UINT_FAST32_MAX > UINT32_MAX # define SCNuFAST32 SCNu64 # else # define SCNuFAST32 "u" # endif # endif # if !defined SCNxFAST32 || @PRI_MACROS_BROKEN@ # undef SCNxFAST32 # if UINT_FAST32_MAX > UINT32_MAX # define SCNxFAST32 SCNx64 # else # define SCNxFAST32 "x" # endif # endif # ifdef INT64_MAX # if !defined SCNdFAST64 || @PRI_MACROS_BROKEN@ # undef SCNdFAST64 # define SCNdFAST64 SCNd64 # endif # if !defined SCNiFAST64 || @PRI_MACROS_BROKEN@ # undef SCNiFAST64 # define SCNiFAST64 SCNi64 # endif # endif # ifdef UINT64_MAX # if !defined SCNoFAST64 || @PRI_MACROS_BROKEN@ # undef SCNoFAST64 # define SCNoFAST64 SCNo64 # endif # if !defined SCNuFAST64 || @PRI_MACROS_BROKEN@ # undef SCNuFAST64 # define SCNuFAST64 SCNu64 # endif # if !defined SCNxFAST64 || @PRI_MACROS_BROKEN@ # undef SCNxFAST64 # define SCNxFAST64 SCNx64 # endif # endif # if !defined SCNdMAX || @PRI_MACROS_BROKEN@ # undef SCNdMAX # if @INT32_MAX_LT_INTMAX_MAX@ # define SCNdMAX SCNd64 # else # define SCNdMAX "ld" # endif # endif # if !defined SCNiMAX || @PRI_MACROS_BROKEN@ # undef SCNiMAX # if @INT32_MAX_LT_INTMAX_MAX@ # define SCNiMAX SCNi64 # else # define SCNiMAX "li" # endif # endif # if !defined SCNoMAX || @PRI_MACROS_BROKEN@ # undef SCNoMAX # if @UINT32_MAX_LT_UINTMAX_MAX@ # define SCNoMAX SCNo64 # else # define SCNoMAX "lo" # endif # endif # if !defined SCNuMAX || @PRI_MACROS_BROKEN@ # undef SCNuMAX # if @UINT32_MAX_LT_UINTMAX_MAX@ # define SCNuMAX SCNu64 # else # define SCNuMAX "lu" # endif # endif # if !defined SCNxMAX || @PRI_MACROS_BROKEN@ # undef SCNxMAX # if @UINT32_MAX_LT_UINTMAX_MAX@ # define SCNxMAX SCNx64 # else # define SCNxMAX "lx" # endif # endif # if !defined SCNdPTR || @PRI_MACROS_BROKEN@ # undef SCNdPTR # ifdef INTPTR_MAX # define SCNdPTR @PRIPTR_PREFIX@ "d" # endif # endif # if !defined SCNiPTR || @PRI_MACROS_BROKEN@ # undef SCNiPTR # ifdef INTPTR_MAX # define SCNiPTR @PRIPTR_PREFIX@ "i" # endif # endif # if !defined SCNoPTR || @PRI_MACROS_BROKEN@ # undef SCNoPTR # ifdef UINTPTR_MAX # define SCNoPTR @PRIPTR_PREFIX@ "o" # endif # endif # if !defined SCNuPTR || @PRI_MACROS_BROKEN@ # undef SCNuPTR # ifdef UINTPTR_MAX # define SCNuPTR @PRIPTR_PREFIX@ "u" # endif # endif # if !defined SCNxPTR || @PRI_MACROS_BROKEN@ # undef SCNxPTR # ifdef UINTPTR_MAX # define SCNxPTR @PRIPTR_PREFIX@ "x" # endif # endif #endif /* 7.8.2 Functions for greatest-width integer types */ #ifdef __cplusplus extern "C" { #endif #if @GNULIB_IMAXABS@ # if !@HAVE_DECL_IMAXABS@ extern intmax_t imaxabs (intmax_t); # endif #elif defined GNULIB_POSIXCHECK # undef imaxabs # define imaxabs(a) \ (GL_LINK_WARNING ("imaxabs is unportable - " \ "use gnulib module imaxabs for portability"), \ imaxabs (a)) #endif #if @GNULIB_IMAXDIV@ # if !@HAVE_DECL_IMAXDIV@ typedef struct { intmax_t quot; intmax_t rem; } imaxdiv_t; extern imaxdiv_t imaxdiv (intmax_t, intmax_t); # endif #elif defined GNULIB_POSIXCHECK # undef imaxdiv # define imaxdiv(a,b) \ (GL_LINK_WARNING ("imaxdiv is unportable - " \ "use gnulib module imaxdiv for portability"), \ imaxdiv (a, b)) #endif #if @GNULIB_STRTOIMAX@ # if !@HAVE_DECL_STRTOIMAX@ extern intmax_t strtoimax (const char *, char **, int); # endif #elif defined GNULIB_POSIXCHECK # undef strtoimax # define strtoimax(p,e,b) \ (GL_LINK_WARNING ("strtoimax is unportable - " \ "use gnulib module strtoimax for portability"), \ strtoimax (p, e, b)) #endif #if @GNULIB_STRTOUMAX@ # if !@HAVE_DECL_STRTOUMAX@ extern uintmax_t strtoumax (const char *, char **, int); # endif #elif defined GNULIB_POSIXCHECK # undef strtoumax # define strtoumax(p,e,b) \ (GL_LINK_WARNING ("strtoumax is unportable - " \ "use gnulib module strtoumax for portability"), \ strtoumax (p, e, b)) #endif /* Don't bother defining or declaring wcstoimax and wcstoumax, since wide-character functions like this are hardly ever useful. */ #ifdef __cplusplus } #endif #endif /* !defined INTTYPES_H && !defined _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H */ gnuit-4.9.5/lib/fnmatch.c0000644000175000017500000002506611146671375012156 00000000000000/* Copyright (C) 1991,1992,1993,1996,1997,1998,1999,2000,2001,2002,2003,2004,2005,2006,2007 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 3, 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. */ #ifndef _LIBC # include #endif /* Enable GNU extensions in fnmatch.h. */ #ifndef _GNU_SOURCE # define _GNU_SOURCE 1 #endif #if ! defined __builtin_expect && __GNUC__ < 3 # define __builtin_expect(expr, expected) (expr) #endif #include #include #include #include #include #include #include #include #include #define WIDE_CHAR_SUPPORT \ (HAVE_WCTYPE_H && HAVE_BTOWC && HAVE_ISWCTYPE \ && HAVE_WMEMCHR && (HAVE_WMEMCPY || HAVE_WMEMPCPY)) /* For platform which support the ISO C amendement 1 functionality we support user defined character classes. */ #if defined _LIBC || WIDE_CHAR_SUPPORT # include # include #endif /* We need some of the locale data (the collation sequence information) but there is no interface to get this information in general. Therefore we support a correct implementation only in glibc. */ #ifdef _LIBC # include "../locale/localeinfo.h" # include "../locale/elem-hash.h" # include "../locale/coll-lookup.h" # include # define CONCAT(a,b) __CONCAT(a,b) # define mbsrtowcs __mbsrtowcs # define fnmatch __fnmatch extern int fnmatch (const char *pattern, const char *string, int flags); #endif #ifndef SIZE_MAX # define SIZE_MAX ((size_t) -1) #endif /* We often have to test for FNM_FILE_NAME and FNM_PERIOD being both set. */ #define NO_LEADING_PERIOD(flags) \ ((flags & (FNM_FILE_NAME | FNM_PERIOD)) == (FNM_FILE_NAME | FNM_PERIOD)) /* Comment out all this code if we are using the GNU C Library, and are not actually compiling the library itself, and have not detected a bug in the library. This code is part of the GNU C Library, but also included in many other GNU distributions. Compiling and linking in this code is a waste when using the GNU C library (especially if it is a shared library). Rather than having every GNU program understand `configure --with-gnu-libc' and omit the object files, it is simpler to just do this in the source for each such file. */ #if defined _LIBC || !defined __GNU_LIBRARY__ || !HAVE_FNMATCH_GNU # if ! (defined isblank || (HAVE_ISBLANK && HAVE_DECL_ISBLANK)) # define isblank(c) ((c) == ' ' || (c) == '\t') # endif # define STREQ(s1, s2) ((strcmp (s1, s2) == 0)) # if defined _LIBC || WIDE_CHAR_SUPPORT /* The GNU C library provides support for user-defined character classes and the functions from ISO C amendement 1. */ # ifdef CHARCLASS_NAME_MAX # define CHAR_CLASS_MAX_LENGTH CHARCLASS_NAME_MAX # else /* This shouldn't happen but some implementation might still have this problem. Use a reasonable default value. */ # define CHAR_CLASS_MAX_LENGTH 256 # endif # ifdef _LIBC # define IS_CHAR_CLASS(string) __wctype (string) # else # define IS_CHAR_CLASS(string) wctype (string) # endif # ifdef _LIBC # define ISWCTYPE(WC, WT) __iswctype (WC, WT) # else # define ISWCTYPE(WC, WT) iswctype (WC, WT) # endif # if (HAVE_MBSTATE_T && HAVE_MBSRTOWCS) || _LIBC /* In this case we are implementing the multibyte character handling. */ # define HANDLE_MULTIBYTE 1 # endif # else # define CHAR_CLASS_MAX_LENGTH 6 /* Namely, `xdigit'. */ # define IS_CHAR_CLASS(string) \ (STREQ (string, "alpha") || STREQ (string, "upper") \ || STREQ (string, "lower") || STREQ (string, "digit") \ || STREQ (string, "alnum") || STREQ (string, "xdigit") \ || STREQ (string, "space") || STREQ (string, "print") \ || STREQ (string, "punct") || STREQ (string, "graph") \ || STREQ (string, "cntrl") || STREQ (string, "blank")) # endif /* Avoid depending on library functions or files whose names are inconsistent. */ /* Global variable. */ static int posixly_correct; # ifndef internal_function /* Inside GNU libc we mark some function in a special way. In other environments simply ignore the marking. */ # define internal_function # endif /* Note that this evaluates C many times. */ # define FOLD(c) ((flags & FNM_CASEFOLD) ? tolower (c) : (c)) # define CHAR char # define UCHAR unsigned char # define INT int # define FCT internal_fnmatch # define EXT ext_match # define END end_pattern # define L_(CS) CS # ifdef _LIBC # define BTOWC(C) __btowc (C) # else # define BTOWC(C) btowc (C) # endif # define STRLEN(S) strlen (S) # define STRCAT(D, S) strcat (D, S) # ifdef _LIBC # define MEMPCPY(D, S, N) __mempcpy (D, S, N) # else # if HAVE_MEMPCPY # define MEMPCPY(D, S, N) mempcpy (D, S, N) # else # define MEMPCPY(D, S, N) ((void *) ((char *) memcpy (D, S, N) + (N))) # endif # endif # define MEMCHR(S, C, N) memchr (S, C, N) # define STRCOLL(S1, S2) strcoll (S1, S2) # include "fnmatch_loop.c" # if HANDLE_MULTIBYTE # define FOLD(c) ((flags & FNM_CASEFOLD) ? towlower (c) : (c)) # define CHAR wchar_t # define UCHAR wint_t # define INT wint_t # define FCT internal_fnwmatch # define EXT ext_wmatch # define END end_wpattern # define L_(CS) L##CS # define BTOWC(C) (C) # ifdef _LIBC # define STRLEN(S) __wcslen (S) # define STRCAT(D, S) __wcscat (D, S) # define MEMPCPY(D, S, N) __wmempcpy (D, S, N) # else # define STRLEN(S) wcslen (S) # define STRCAT(D, S) wcscat (D, S) # if HAVE_WMEMPCPY # define MEMPCPY(D, S, N) wmempcpy (D, S, N) # else # define MEMPCPY(D, S, N) (wmemcpy (D, S, N) + (N)) # endif # endif # define MEMCHR(S, C, N) wmemchr (S, C, N) # define STRCOLL(S1, S2) wcscoll (S1, S2) # define WIDE_CHAR_VERSION 1 # undef IS_CHAR_CLASS /* We have to convert the wide character string in a multibyte string. But we know that the character class names consist of alphanumeric characters from the portable character set, and since the wide character encoding for a member of the portable character set is the same code point as its single-byte encoding, we can use a simplified method to convert the string to a multibyte character string. */ static wctype_t is_char_class (const wchar_t *wcs) { char s[CHAR_CLASS_MAX_LENGTH + 1]; char *cp = s; do { /* Test for a printable character from the portable character set. */ # ifdef _LIBC if (*wcs < 0x20 || *wcs > 0x7e || *wcs == 0x24 || *wcs == 0x40 || *wcs == 0x60) return (wctype_t) 0; # else switch (*wcs) { case L' ': case L'!': case L'"': case L'#': case L'%': case L'&': case L'\'': case L'(': case L')': case L'*': case L'+': case L',': case L'-': case L'.': case L'/': case L'0': case L'1': case L'2': case L'3': case L'4': case L'5': case L'6': case L'7': case L'8': case L'9': case L':': case L';': case L'<': case L'=': case L'>': case L'?': case L'A': case L'B': case L'C': case L'D': case L'E': case L'F': case L'G': case L'H': case L'I': case L'J': case L'K': case L'L': case L'M': case L'N': case L'O': case L'P': case L'Q': case L'R': case L'S': case L'T': case L'U': case L'V': case L'W': case L'X': case L'Y': case L'Z': case L'[': case L'\\': case L']': case L'^': case L'_': case L'a': case L'b': case L'c': case L'd': case L'e': case L'f': case L'g': case L'h': case L'i': case L'j': case L'k': case L'l': case L'm': case L'n': case L'o': case L'p': case L'q': case L'r': case L's': case L't': case L'u': case L'v': case L'w': case L'x': case L'y': case L'z': case L'{': case L'|': case L'}': case L'~': break; default: return (wctype_t) 0; } # endif /* Avoid overrunning the buffer. */ if (cp == s + CHAR_CLASS_MAX_LENGTH) return (wctype_t) 0; *cp++ = (char) *wcs++; } while (*wcs != L'\0'); *cp = '\0'; # ifdef _LIBC return __wctype (s); # else return wctype (s); # endif } # define IS_CHAR_CLASS(string) is_char_class (string) # include "fnmatch_loop.c" # endif int fnmatch (const char *pattern, const char *string, int flags) { # if HANDLE_MULTIBYTE # define ALLOCA_LIMIT 2000 if (__builtin_expect (MB_CUR_MAX, 1) != 1) { mbstate_t ps; size_t patsize; size_t strsize; size_t totsize; wchar_t *wpattern; wchar_t *wstring; int res; /* Calculate the size needed to convert the strings to wide characters. */ memset (&ps, '\0', sizeof (ps)); patsize = mbsrtowcs (NULL, &pattern, 0, &ps) + 1; if (__builtin_expect (patsize != 0, 1)) { assert (mbsinit (&ps)); strsize = mbsrtowcs (NULL, &string, 0, &ps) + 1; if (__builtin_expect (strsize != 0, 1)) { assert (mbsinit (&ps)); totsize = patsize + strsize; if (__builtin_expect (! (patsize <= totsize && totsize <= SIZE_MAX / sizeof (wchar_t)), 0)) { errno = ENOMEM; return -1; } /* Allocate room for the wide characters. */ if (__builtin_expect (totsize < ALLOCA_LIMIT, 1)) wpattern = (wchar_t *) alloca (totsize * sizeof (wchar_t)); else { wpattern = malloc (totsize * sizeof (wchar_t)); if (__builtin_expect (! wpattern, 0)) { errno = ENOMEM; return -1; } } wstring = wpattern + patsize; /* Convert the strings into wide characters. */ mbsrtowcs (wpattern, &pattern, patsize, &ps); assert (mbsinit (&ps)); mbsrtowcs (wstring, &string, strsize, &ps); res = internal_fnwmatch (wpattern, wstring, wstring + strsize - 1, flags & FNM_PERIOD, flags); if (__builtin_expect (! (totsize < ALLOCA_LIMIT), 0)) free (wpattern); return res; } } } # endif /* HANDLE_MULTIBYTE */ return internal_fnmatch (pattern, string, string + strlen (string), flags & FNM_PERIOD, flags); } # ifdef _LIBC # undef fnmatch versioned_symbol (libc, __fnmatch, fnmatch, GLIBC_2_2_3); # if SHLIB_COMPAT(libc, GLIBC_2_0, GLIBC_2_2_3) strong_alias (__fnmatch, __fnmatch_old) compat_symbol (libc, __fnmatch_old, fnmatch, GLIBC_2_0); # endif libc_hidden_ver (__fnmatch, fnmatch) # endif #endif /* _LIBC or not __GNU_LIBRARY__. */ gnuit-4.9.5/lib/strncasecmp.c0000644000175000017500000000364611146671375013060 00000000000000/* strncasecmp.c -- case insensitive string comparator Copyright (C) 1998-1999, 2005-2007 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 3, 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. */ #include /* Specification. */ #include #include #include #define TOLOWER(Ch) (isupper (Ch) ? tolower (Ch) : (Ch)) /* Compare no more than N bytes of strings S1 and S2, ignoring case, returning less than, equal to or greater than zero if S1 is lexicographically less than, equal to or greater than S2. Note: This function cannot work correctly in multibyte locales. */ int strncasecmp (const char *s1, const char *s2, size_t n) { register const unsigned char *p1 = (const unsigned char *) s1; register const unsigned char *p2 = (const unsigned char *) s2; unsigned char c1, c2; if (p1 == p2 || n == 0) return 0; do { c1 = TOLOWER (*p1); c2 = TOLOWER (*p2); if (--n == 0 || c1 == '\0') break; ++p1; ++p2; } while (c1 == c2); if (UCHAR_MAX <= INT_MAX) return c1 - c2; else /* On machines where 'char' and 'int' are types of the same size, the difference of two 'unsigned char' values - including the sign bit - doesn't fit in an 'int'. */ return (c1 > c2 ? 1 : c1 < c2 ? -1 : 0); } gnuit-4.9.5/lib/gettext.h0000644000175000017500000002240611146671375012222 00000000000000/* Convenience header for conditional use of GNU . Copyright (C) 1995-1998, 2000-2002, 2004-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 3, 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. */ #ifndef _LIBGETTEXT_H #define _LIBGETTEXT_H 1 /* NLS can be disabled through the configure --disable-nls option. */ #if ENABLE_NLS /* Get declarations of GNU message catalog functions. */ # include /* You can set the DEFAULT_TEXT_DOMAIN macro to specify the domain used by the gettext() and ngettext() macros. This is an alternative to calling textdomain(), and is useful for libraries. */ # ifdef DEFAULT_TEXT_DOMAIN # undef gettext # define gettext(Msgid) \ dgettext (DEFAULT_TEXT_DOMAIN, Msgid) # undef ngettext # define ngettext(Msgid1, Msgid2, N) \ dngettext (DEFAULT_TEXT_DOMAIN, Msgid1, Msgid2, N) # endif #else /* Solaris /usr/include/locale.h includes /usr/include/libintl.h, which chokes if dcgettext is defined as a macro. So include it now, to make later inclusions of a NOP. We don't include as well because people using "gettext.h" will not include , and also including would fail on SunOS 4, whereas is OK. */ #if defined(__sun) # include #endif /* Many header files from the libstdc++ coming with g++ 3.3 or newer include , which chokes if dcgettext is defined as a macro. So include it now, to make later inclusions of a NOP. */ #if defined(__cplusplus) && defined(__GNUG__) && (__GNUC__ >= 3) # include # if (__GLIBC__ >= 2) || _GLIBCXX_HAVE_LIBINTL_H # include # endif #endif /* Disabled NLS. The casts to 'const char *' serve the purpose of producing warnings for invalid uses of the value returned from these functions. On pre-ANSI systems without 'const', the config.h file is supposed to contain "#define const". */ # define gettext(Msgid) ((const char *) (Msgid)) # define dgettext(Domainname, Msgid) ((void) (Domainname), gettext (Msgid)) # define dcgettext(Domainname, Msgid, Category) \ ((void) (Category), dgettext (Domainname, Msgid)) # define ngettext(Msgid1, Msgid2, N) \ ((N) == 1 \ ? ((void) (Msgid2), (const char *) (Msgid1)) \ : ((void) (Msgid1), (const char *) (Msgid2))) # define dngettext(Domainname, Msgid1, Msgid2, N) \ ((void) (Domainname), ngettext (Msgid1, Msgid2, N)) # define dcngettext(Domainname, Msgid1, Msgid2, N, Category) \ ((void) (Category), dngettext(Domainname, Msgid1, Msgid2, N)) # define textdomain(Domainname) ((const char *) (Domainname)) # define bindtextdomain(Domainname, Dirname) \ ((void) (Domainname), (const char *) (Dirname)) # define bind_textdomain_codeset(Domainname, Codeset) \ ((void) (Domainname), (const char *) (Codeset)) #endif /* A pseudo function call that serves as a marker for the automated extraction of messages, but does not call gettext(). The run-time translation is done at a different place in the code. The argument, String, should be a literal string. Concatenated strings and other string expressions won't work. The macro's expansion is not parenthesized, so that it is suitable as initializer for static 'char[]' or 'const char[]' variables. */ #define gettext_noop(String) String /* The separator between msgctxt and msgid in a .mo file. */ #define GETTEXT_CONTEXT_GLUE "\004" /* Pseudo function calls, taking a MSGCTXT and a MSGID instead of just a MSGID. MSGCTXT and MSGID must be string literals. MSGCTXT should be short and rarely need to change. The letter 'p' stands for 'particular' or 'special'. */ #ifdef DEFAULT_TEXT_DOMAIN # define pgettext(Msgctxt, Msgid) \ pgettext_aux (DEFAULT_TEXT_DOMAIN, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, LC_MESSAGES) #else # define pgettext(Msgctxt, Msgid) \ pgettext_aux (NULL, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, LC_MESSAGES) #endif #define dpgettext(Domainname, Msgctxt, Msgid) \ pgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, LC_MESSAGES) #define dcpgettext(Domainname, Msgctxt, Msgid, Category) \ pgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, Category) #ifdef DEFAULT_TEXT_DOMAIN # define npgettext(Msgctxt, Msgid, MsgidPlural, N) \ npgettext_aux (DEFAULT_TEXT_DOMAIN, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, LC_MESSAGES) #else # define npgettext(Msgctxt, Msgid, MsgidPlural, N) \ npgettext_aux (NULL, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, LC_MESSAGES) #endif #define dnpgettext(Domainname, Msgctxt, Msgid, MsgidPlural, N) \ npgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, LC_MESSAGES) #define dcnpgettext(Domainname, Msgctxt, Msgid, MsgidPlural, N, Category) \ npgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, Category) #ifdef __GNUC__ __inline #else #ifdef __cplusplus inline #endif #endif static const char * pgettext_aux (const char *domain, const char *msg_ctxt_id, const char *msgid, int category) { const char *translation = dcgettext (domain, msg_ctxt_id, category); if (translation == msg_ctxt_id) return msgid; else return translation; } #ifdef __GNUC__ __inline #else #ifdef __cplusplus inline #endif #endif static const char * npgettext_aux (const char *domain, const char *msg_ctxt_id, const char *msgid, const char *msgid_plural, unsigned long int n, int category) { const char *translation = dcngettext (domain, msg_ctxt_id, msgid_plural, n, category); if (translation == msg_ctxt_id || translation == msgid_plural) return (n == 1 ? msgid : msgid_plural); else return translation; } /* The same thing extended for non-constant arguments. Here MSGCTXT and MSGID can be arbitrary expressions. But for string literals these macros are less efficient than those above. */ #include #define _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS \ (((__GNUC__ >= 3 || __GNUG__ >= 2) && !__STRICT_ANSI__) \ /* || __STDC_VERSION__ >= 199901L */ ) #if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS #include #endif #define pgettext_expr(Msgctxt, Msgid) \ dcpgettext_expr (NULL, Msgctxt, Msgid, LC_MESSAGES) #define dpgettext_expr(Domainname, Msgctxt, Msgid) \ dcpgettext_expr (Domainname, Msgctxt, Msgid, LC_MESSAGES) #ifdef __GNUC__ __inline #else #ifdef __cplusplus inline #endif #endif static const char * dcpgettext_expr (const char *domain, const char *msgctxt, const char *msgid, int category) { size_t msgctxt_len = strlen (msgctxt) + 1; size_t msgid_len = strlen (msgid) + 1; const char *translation; #if _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS char msg_ctxt_id[msgctxt_len + msgid_len]; #else char buf[1024]; char *msg_ctxt_id = (msgctxt_len + msgid_len <= sizeof (buf) ? buf : (char *) malloc (msgctxt_len + msgid_len)); if (msg_ctxt_id != NULL) #endif { memcpy (msg_ctxt_id, msgctxt, msgctxt_len - 1); msg_ctxt_id[msgctxt_len - 1] = '\004'; memcpy (msg_ctxt_id + msgctxt_len, msgid, msgid_len); translation = dcgettext (domain, msg_ctxt_id, category); #if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS if (msg_ctxt_id != buf) free (msg_ctxt_id); #endif if (translation != msg_ctxt_id) return translation; } return msgid; } #define npgettext_expr(Msgctxt, Msgid, MsgidPlural, N) \ dcnpgettext_expr (NULL, Msgctxt, Msgid, MsgidPlural, N, LC_MESSAGES) #define dnpgettext_expr(Domainname, Msgctxt, Msgid, MsgidPlural, N) \ dcnpgettext_expr (Domainname, Msgctxt, Msgid, MsgidPlural, N, LC_MESSAGES) #ifdef __GNUC__ __inline #else #ifdef __cplusplus inline #endif #endif static const char * dcnpgettext_expr (const char *domain, const char *msgctxt, const char *msgid, const char *msgid_plural, unsigned long int n, int category) { size_t msgctxt_len = strlen (msgctxt) + 1; size_t msgid_len = strlen (msgid) + 1; const char *translation; #if _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS char msg_ctxt_id[msgctxt_len + msgid_len]; #else char buf[1024]; char *msg_ctxt_id = (msgctxt_len + msgid_len <= sizeof (buf) ? buf : (char *) malloc (msgctxt_len + msgid_len)); if (msg_ctxt_id != NULL) #endif { memcpy (msg_ctxt_id, msgctxt, msgctxt_len - 1); msg_ctxt_id[msgctxt_len - 1] = '\004'; memcpy (msg_ctxt_id + msgctxt_len, msgid, msgid_len); translation = dcngettext (domain, msg_ctxt_id, msgid_plural, n, category); #if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS if (msg_ctxt_id != buf) free (msg_ctxt_id); #endif if (!(translation == msg_ctxt_id || translation == msgid_plural)) return translation; } return (n == 1 ? msgid : msgid_plural); } #endif /* _LIBGETTEXT_H */ gnuit-4.9.5/lib/mbslen.c0000644000175000017500000000237611146671375012015 00000000000000/* Counting the multibyte characters in a string. Copyright (C) 2007-2008 Free Software Foundation, Inc. Written by Bruno Haible , 2007. 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 3 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, see . */ #include /* Specification. */ #include #include #include "mbuiter.h" /* Return the number of multibyte characters in the character string STRING. */ size_t mbslen (const char *string) { if (MB_CUR_MAX > 1) { size_t count; mbui_iterator_t iter; count = 0; for (mbui_init (iter, string); mbui_avail (iter); mbui_advance (iter)) count++; return count; } else return strlen (string); } gnuit-4.9.5/lib/xstrndup.h0000644000175000017500000000176111146671375012426 00000000000000/* Duplicate a bounded initial segment of a string, with out-of-memory checking. Copyright (C) 2003 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 3 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, see . */ #include /* Return a newly allocated copy of at most N bytes of STRING. In other words, return a copy of the initial segment of length N of STRING. */ extern char *xstrndup (const char *string, size_t n); gnuit-4.9.5/lib/idcache.c0000644000175000017500000001346511146671375012116 00000000000000/* idcache.c -- map user and group IDs, cached for speed Copyright (C) 1985, 1988, 1989, 1990, 1997, 1998, 2003, 2005-2007 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 3 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, see . */ #include #include "idcache.h" #include #include #include #include #include #include #include "xalloc.h" #ifdef __DJGPP__ static char digits[] = "0123456789"; #endif struct userid { union { uid_t u; gid_t g; } id; struct userid *next; char name[FLEXIBLE_ARRAY_MEMBER]; }; /* FIXME: provide a function to free any malloc'd storage and reset lists, so that an application can use code like this just before exiting: #ifdef lint idcache_clear (); #endif */ static struct userid *user_alist; /* Each entry on list is a user name for which the first lookup failed. */ static struct userid *nouser_alist; /* Use the same struct as for userids. */ static struct userid *group_alist; /* Each entry on list is a group name for which the first lookup failed. */ static struct userid *nogroup_alist; /* Translate UID to a login name, with cache, or NULL if unresolved. */ char * getuser (uid_t uid) { struct userid *tail; struct userid *match = NULL; for (tail = user_alist; tail; tail = tail->next) { if (tail->id.u == uid) { match = tail; break; } } if (match == NULL) { struct passwd *pwent = getpwuid (uid); char const *name = pwent ? pwent->pw_name : ""; match = xmalloc (offsetof (struct userid, name) + strlen (name) + 1); match->id.u = uid; strcpy (match->name, name); /* Add to the head of the list, so most recently used is first. */ match->next = user_alist; user_alist = match; } return match->name[0] ? match->name : NULL; } /* Translate USER to a UID, with cache. Return NULL if there is no such user. (We also cache which user names have no passwd entry, so we don't keep looking them up.) */ uid_t * getuidbyname (const char *user) { struct userid *tail; struct passwd *pwent; for (tail = user_alist; tail; tail = tail->next) /* Avoid a function call for the most common case. */ if (*tail->name == *user && !strcmp (tail->name, user)) return &tail->id.u; for (tail = nouser_alist; tail; tail = tail->next) /* Avoid a function call for the most common case. */ if (*tail->name == *user && !strcmp (tail->name, user)) return NULL; pwent = getpwnam (user); #ifdef __DJGPP__ /* We need to pretend to be the user USER, to make pwd functions know about an arbitrary user name. */ if (!pwent && strspn (user, digits) < strlen (user)) { setenv ("USER", user, 1); pwent = getpwnam (user); /* now it will succeed */ } #endif tail = xmalloc (offsetof (struct userid, name) + strlen (user) + 1); strcpy (tail->name, user); /* Add to the head of the list, so most recently used is first. */ if (pwent) { tail->id.u = pwent->pw_uid; tail->next = user_alist; user_alist = tail; return &tail->id.u; } tail->next = nouser_alist; nouser_alist = tail; return NULL; } /* Translate GID to a group name, with cache, or NULL if unresolved. */ char * getgroup (gid_t gid) { struct userid *tail; struct userid *match = NULL; for (tail = group_alist; tail; tail = tail->next) { if (tail->id.g == gid) { match = tail; break; } } if (match == NULL) { struct group *grent = getgrgid (gid); char const *name = grent ? grent->gr_name : ""; match = xmalloc (offsetof (struct userid, name) + strlen (name) + 1); match->id.g = gid; strcpy (match->name, name); /* Add to the head of the list, so most recently used is first. */ match->next = group_alist; group_alist = match; } return match->name[0] ? match->name : NULL; } /* Translate GROUP to a GID, with cache. Return NULL if there is no such group. (We also cache which group names have no group entry, so we don't keep looking them up.) */ gid_t * getgidbyname (const char *group) { struct userid *tail; struct group *grent; for (tail = group_alist; tail; tail = tail->next) /* Avoid a function call for the most common case. */ if (*tail->name == *group && !strcmp (tail->name, group)) return &tail->id.g; for (tail = nogroup_alist; tail; tail = tail->next) /* Avoid a function call for the most common case. */ if (*tail->name == *group && !strcmp (tail->name, group)) return NULL; grent = getgrnam (group); #ifdef __DJGPP__ /* We need to pretend to belong to group GROUP, to make grp functions know about an arbitrary group name. */ if (!grent && strspn (group, digits) < strlen (group)) { setenv ("GROUP", group, 1); grent = getgrnam (group); /* now it will succeed */ } #endif tail = xmalloc (offsetof (struct userid, name) + strlen (group) + 1); strcpy (tail->name, group); /* Add to the head of the list, so most recently used is first. */ if (grent) { tail->id.g = grent->gr_gid; tail->next = group_alist; group_alist = tail; return &tail->id.g; } tail->next = nogroup_alist; nogroup_alist = tail; return NULL; } gnuit-4.9.5/lib/fsusage.c0000644000175000017500000001740411146671375012170 00000000000000/* fsusage.c -- return space usage of mounted file systems Copyright (C) 1991-1992, 1996, 1998-1999, 2002-2006, 2009 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 3 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, see . */ #include #include "fsusage.h" #include #include #if STAT_STATVFS /* POSIX 1003.1-2001 (and later) with XSI */ # include #else /* Don't include backward-compatibility files unless they're needed. Eventually we'd like to remove all this cruft. */ # include # include # include # if HAVE_SYS_PARAM_H # include # endif # if HAVE_SYS_MOUNT_H # include # endif # if HAVE_SYS_VFS_H # include # endif # if HAVE_SYS_FS_S5PARAM_H /* Fujitsu UXP/V */ # include # endif # if defined HAVE_SYS_FILSYS_H && !defined _CRAY # include /* SVR2 */ # endif # if HAVE_SYS_STATFS_H # include # endif # if HAVE_DUSTAT_H /* AIX PS/2 */ # include # endif # include "full-read.h" #endif /* The results of open() in this file are not used with fchdir, therefore save some unnecessary work in fchdir.c. */ #undef open #undef close /* Many space usage primitives use all 1 bits to denote a value that is not applicable or unknown. Propagate this information by returning a uintmax_t value that is all 1 bits if X is all 1 bits, even if X is unsigned and narrower than uintmax_t. */ #define PROPAGATE_ALL_ONES(x) \ ((sizeof (x) < sizeof (uintmax_t) \ && (~ (x) == (sizeof (x) < sizeof (int) \ ? - (1 << (sizeof (x) * CHAR_BIT)) \ : 0))) \ ? UINTMAX_MAX : (uintmax_t) (x)) /* Extract the top bit of X as an uintmax_t value. */ #define EXTRACT_TOP_BIT(x) ((x) \ & ((uintmax_t) 1 << (sizeof (x) * CHAR_BIT - 1))) /* If a value is negative, many space usage primitives store it into an integer variable by assignment, even if the variable's type is unsigned. So, if a space usage variable X's top bit is set, convert X to the uintmax_t value V such that (- (uintmax_t) V) is the negative of the original value. If X's top bit is clear, just yield X. Use PROPAGATE_TOP_BIT if the original value might be negative; otherwise, use PROPAGATE_ALL_ONES. */ #define PROPAGATE_TOP_BIT(x) ((x) | ~ (EXTRACT_TOP_BIT (x) - 1)) /* Fill in the fields of FSP with information about space usage for the file system on which FILE resides. DISK is the device on which FILE is mounted, for space-getting methods that need to know it. Return 0 if successful, -1 if not. When returning -1, ensure that ERRNO is either a system error value, or zero if DISK is NULL on a system that requires a non-NULL value. */ int get_fs_usage (char const *file, char const *disk, struct fs_usage *fsp) { (void) disk; /* avoid argument-unused warning */ #if defined STAT_STATVFS /* POSIX */ struct statvfs fsd; if (statvfs (file, &fsd) < 0) return -1; /* f_frsize isn't guaranteed to be supported. */ fsp->fsu_blocksize = (fsd.f_frsize ? PROPAGATE_ALL_ONES (fsd.f_frsize) : PROPAGATE_ALL_ONES (fsd.f_bsize)); #elif defined STAT_STATFS2_FS_DATA /* Ultrix */ struct fs_data fsd; if (statfs (file, &fsd) != 1) return -1; fsp->fsu_blocksize = 1024; fsp->fsu_blocks = PROPAGATE_ALL_ONES (fsd.fd_req.btot); fsp->fsu_bfree = PROPAGATE_ALL_ONES (fsd.fd_req.bfree); fsp->fsu_bavail = PROPAGATE_TOP_BIT (fsd.fd_req.bfreen); fsp->fsu_bavail_top_bit_set = EXTRACT_TOP_BIT (fsd.fd_req.bfreen) != 0; fsp->fsu_files = PROPAGATE_ALL_ONES (fsd.fd_req.gtot); fsp->fsu_ffree = PROPAGATE_ALL_ONES (fsd.fd_req.gfree); #elif defined STAT_READ_FILSYS /* SVR2 */ # ifndef SUPERBOFF # define SUPERBOFF (SUPERB * 512) # endif struct filsys fsd; int fd; if (! disk) { errno = 0; return -1; } fd = open (disk, O_RDONLY); if (fd < 0) return -1; lseek (fd, (off_t) SUPERBOFF, 0); if (full_read (fd, (char *) &fsd, sizeof fsd) != sizeof fsd) { close (fd); return -1; } close (fd); fsp->fsu_blocksize = (fsd.s_type == Fs2b ? 1024 : 512); fsp->fsu_blocks = PROPAGATE_ALL_ONES (fsd.s_fsize); fsp->fsu_bfree = PROPAGATE_ALL_ONES (fsd.s_tfree); fsp->fsu_bavail = PROPAGATE_TOP_BIT (fsd.s_tfree); fsp->fsu_bavail_top_bit_set = EXTRACT_TOP_BIT (fsd.s_tfree) != 0; fsp->fsu_files = (fsd.s_isize == -1 ? UINTMAX_MAX : (fsd.s_isize - 2) * INOPB * (fsd.s_type == Fs2b ? 2 : 1)); fsp->fsu_ffree = PROPAGATE_ALL_ONES (fsd.s_tinode); #elif defined STAT_STATFS3_OSF1 struct statfs fsd; if (statfs (file, &fsd, sizeof (struct statfs)) != 0) return -1; fsp->fsu_blocksize = PROPAGATE_ALL_ONES (fsd.f_fsize); #elif defined STAT_STATFS2_BSIZE /* 4.3BSD, SunOS 4, HP-UX, AIX */ struct statfs fsd; if (statfs (file, &fsd) < 0) return -1; fsp->fsu_blocksize = PROPAGATE_ALL_ONES (fsd.f_bsize); # ifdef STATFS_TRUNCATES_BLOCK_COUNTS /* In SunOS 4.1.2, 4.1.3, and 4.1.3_U1, the block counts in the struct statfs are truncated to 2GB. These conditions detect that truncation, presumably without botching the 4.1.1 case, in which the values are not truncated. The correct counts are stored in undocumented spare fields. */ if (fsd.f_blocks == 0x7fffffff / fsd.f_bsize && fsd.f_spare[0] > 0) { fsd.f_blocks = fsd.f_spare[0]; fsd.f_bfree = fsd.f_spare[1]; fsd.f_bavail = fsd.f_spare[2]; } # endif /* STATFS_TRUNCATES_BLOCK_COUNTS */ #elif defined STAT_STATFS2_FSIZE /* 4.4BSD */ struct statfs fsd; if (statfs (file, &fsd) < 0) return -1; fsp->fsu_blocksize = PROPAGATE_ALL_ONES (fsd.f_fsize); #elif defined STAT_STATFS4 /* SVR3, Dynix, Irix, AIX */ # if !_AIX && !defined _SEQUENT_ && !defined DOLPHIN # define f_bavail f_bfree # endif struct statfs fsd; if (statfs (file, &fsd, sizeof fsd, 0) < 0) return -1; /* Empirically, the block counts on most SVR3 and SVR3-derived systems seem to always be in terms of 512-byte blocks, no matter what value f_bsize has. */ # if _AIX || defined _CRAY fsp->fsu_blocksize = PROPAGATE_ALL_ONES (fsd.f_bsize); # else fsp->fsu_blocksize = 512; # endif #endif #if (defined STAT_STATVFS \ || (!defined STAT_STATFS2_FS_DATA && !defined STAT_READ_FILSYS)) fsp->fsu_blocks = PROPAGATE_ALL_ONES (fsd.f_blocks); fsp->fsu_bfree = PROPAGATE_ALL_ONES (fsd.f_bfree); fsp->fsu_bavail = PROPAGATE_TOP_BIT (fsd.f_bavail); fsp->fsu_bavail_top_bit_set = EXTRACT_TOP_BIT (fsd.f_bavail) != 0; fsp->fsu_files = PROPAGATE_ALL_ONES (fsd.f_files); fsp->fsu_ffree = PROPAGATE_ALL_ONES (fsd.f_ffree); #endif return 0; } #if defined _AIX && defined _I386 /* AIX PS/2 does not supply statfs. */ int statfs (char *file, struct statfs *fsb) { struct stat stats; struct dustat fsd; if (stat (file, &stats) != 0) return -1; if (dustat (stats.st_dev, 0, &fsd, sizeof (fsd))) return -1; fsb->f_type = 0; fsb->f_bsize = fsd.du_bsize; fsb->f_blocks = fsd.du_fsize - fsd.du_isize; fsb->f_bfree = fsd.du_tfree; fsb->f_bavail = fsd.du_tfree; fsb->f_files = (fsd.du_isize - 2) * fsd.du_inopb; fsb->f_ffree = fsd.du_tinode; fsb->f_fsid.val[0] = fsd.du_site; fsb->f_fsid.val[1] = fsd.du_pckno; return 0; } #endif /* _AIX && _I386 */ gnuit-4.9.5/lib/streq.h0000644000175000017500000000761211146671375011676 00000000000000/* Optimized string comparison. Copyright (C) 2001-2002, 2007 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 3 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 Lesser General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* Written by Bruno Haible . */ #ifndef _GL_STREQ_H #define _GL_STREQ_H #include /* STREQ allows to optimize string comparison with a small literal string. STREQ (s, "EUC-KR", 'E', 'U', 'C', '-', 'K', 'R', 0, 0, 0) is semantically equivalent to strcmp (s, "EUC-KR") == 0 just faster. */ /* Help GCC to generate good code for string comparisons with immediate strings. */ #if defined (__GNUC__) && defined (__OPTIMIZE__) static inline int streq9 (const char *s1, const char *s2) { return strcmp (s1 + 9, s2 + 9) == 0; } static inline int streq8 (const char *s1, const char *s2, char s28) { if (s1[8] == s28) { if (s28 == 0) return 1; else return streq9 (s1, s2); } else return 0; } static inline int streq7 (const char *s1, const char *s2, char s27, char s28) { if (s1[7] == s27) { if (s27 == 0) return 1; else return streq8 (s1, s2, s28); } else return 0; } static inline int streq6 (const char *s1, const char *s2, char s26, char s27, char s28) { if (s1[6] == s26) { if (s26 == 0) return 1; else return streq7 (s1, s2, s27, s28); } else return 0; } static inline int streq5 (const char *s1, const char *s2, char s25, char s26, char s27, char s28) { if (s1[5] == s25) { if (s25 == 0) return 1; else return streq6 (s1, s2, s26, s27, s28); } else return 0; } static inline int streq4 (const char *s1, const char *s2, char s24, char s25, char s26, char s27, char s28) { if (s1[4] == s24) { if (s24 == 0) return 1; else return streq5 (s1, s2, s25, s26, s27, s28); } else return 0; } static inline int streq3 (const char *s1, const char *s2, char s23, char s24, char s25, char s26, char s27, char s28) { if (s1[3] == s23) { if (s23 == 0) return 1; else return streq4 (s1, s2, s24, s25, s26, s27, s28); } else return 0; } static inline int streq2 (const char *s1, const char *s2, char s22, char s23, char s24, char s25, char s26, char s27, char s28) { if (s1[2] == s22) { if (s22 == 0) return 1; else return streq3 (s1, s2, s23, s24, s25, s26, s27, s28); } else return 0; } static inline int streq1 (const char *s1, const char *s2, char s21, char s22, char s23, char s24, char s25, char s26, char s27, char s28) { if (s1[1] == s21) { if (s21 == 0) return 1; else return streq2 (s1, s2, s22, s23, s24, s25, s26, s27, s28); } else return 0; } static inline int streq0 (const char *s1, const char *s2, char s20, char s21, char s22, char s23, char s24, char s25, char s26, char s27, char s28) { if (s1[0] == s20) { if (s20 == 0) return 1; else return streq1 (s1, s2, s21, s22, s23, s24, s25, s26, s27, s28); } else return 0; } #define STREQ(s1,s2,s20,s21,s22,s23,s24,s25,s26,s27,s28) \ streq0 (s1, s2, s20, s21, s22, s23, s24, s25, s26, s27, s28) #else #define STREQ(s1,s2,s20,s21,s22,s23,s24,s25,s26,s27,s28) \ (strcmp (s1, s2) == 0) #endif #endif /* _GL_STREQ_H */ gnuit-4.9.5/lib/xstrtol.h0000644000175000017500000000477511146671375012266 00000000000000/* A more useful interface to strtol. Copyright (C) 1995, 1996, 1998, 1999, 2001, 2002, 2003, 2004, 2006, 2007, 2008 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 3 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, see . */ #ifndef XSTRTOL_H_ # define XSTRTOL_H_ 1 # include # include # ifndef _STRTOL_ERROR enum strtol_error { LONGINT_OK = 0, /* These two values can be ORed together, to indicate that both errors occurred. */ LONGINT_OVERFLOW = 1, LONGINT_INVALID_SUFFIX_CHAR = 2, LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW = (LONGINT_INVALID_SUFFIX_CHAR | LONGINT_OVERFLOW), LONGINT_INVALID = 4 }; typedef enum strtol_error strtol_error; # endif # define _DECLARE_XSTRTOL(name, type) \ strtol_error name (const char *, char **, int, type *, const char *); _DECLARE_XSTRTOL (xstrtol, long int) _DECLARE_XSTRTOL (xstrtoul, unsigned long int) _DECLARE_XSTRTOL (xstrtoimax, intmax_t) _DECLARE_XSTRTOL (xstrtoumax, uintmax_t) #ifndef __attribute__ # if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 8) # define __attribute__(x) # endif #endif #ifndef ATTRIBUTE_NORETURN # define ATTRIBUTE_NORETURN __attribute__ ((__noreturn__)) #endif /* Report an error for an invalid integer in an option argument. ERR is the error code returned by one of the xstrto* functions. Use OPT_IDX to decide whether to print the short option string "C" or "-C" or a long option string derived from LONG_OPTION. OPT_IDX is -2 if the short option "C" was used, without any leading "-"; it is -1 if the short option "-C" was used; otherwise it is an index into LONG_OPTIONS, which should have a name preceded by two '-' characters. ARG is the option-argument containing the integer. After reporting an error, exit with a failure status. */ void xstrtol_fatal (enum strtol_error, int, char, struct option const *, char const *) ATTRIBUTE_NORETURN; #endif /* not XSTRTOL_H_ */ gnuit-4.9.5/lib/uniwidth/0000777000175000017500000000000011146672037012274 500000000000000gnuit-4.9.5/lib/uniwidth/width.c0000644000175000017500000004706111146671375013507 00000000000000/* Determine display width of Unicode character. Copyright (C) 2001-2002, 2006-2009 Free Software Foundation, Inc. Written by Bruno Haible , 2002. 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 3 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 Lesser General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ #include /* Specification. */ #include "uniwidth.h" #include "cjk.h" /* * Non-spacing attribute table. * Consists of: * - Non-spacing characters; generated from PropList.txt or * "grep '^[^;]*;[^;]*;[^;]*;[^;]*;NSM;' UnicodeData.txt" * - Format control characters; generated from * "grep '^[^;]*;[^;]*;Cf;' UnicodeData.txt" * - Zero width characters; generated from * "grep '^[^;]*;ZERO WIDTH ' UnicodeData.txt" */ static const unsigned char nonspacing_table_data[26*64] = { /* 0x0000-0x01ff */ 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, /* 0x0000-0x003f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, /* 0x0040-0x007f */ 0xff, 0xff, 0xff, 0xff, 0x00, 0x20, 0x00, 0x00, /* 0x0080-0x00bf */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x00c0-0x00ff */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0100-0x013f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0140-0x017f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0180-0x01bf */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x01c0-0x01ff */ /* 0x0200-0x03ff */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0200-0x023f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0240-0x027f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0280-0x02bf */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x02c0-0x02ff */ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, /* 0x0300-0x033f */ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, /* 0x0340-0x037f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0380-0x03bf */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x03c0-0x03ff */ /* 0x0400-0x05ff */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0400-0x043f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0440-0x047f */ 0xf8, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0480-0x04bf */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x04c0-0x04ff */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0500-0x053f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0540-0x057f */ 0x00, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xbf, /* 0x0580-0x05bf */ 0xb6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x05c0-0x05ff */ /* 0x0600-0x07ff */ 0x0f, 0x00, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, /* 0x0600-0x063f */ 0x00, 0xf8, 0xff, 0x7f, 0x00, 0x00, 0x01, 0x00, /* 0x0640-0x067f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0680-0x06bf */ 0x00, 0x00, 0xc0, 0xff, 0x9f, 0x3d, 0x00, 0x00, /* 0x06c0-0x06ff */ 0x00, 0x80, 0x02, 0x00, 0x00, 0x00, 0xff, 0xff, /* 0x0700-0x073f */ 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0740-0x077f */ 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0x01, 0x00, /* 0x0780-0x07bf */ 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x0f, 0x00, /* 0x07c0-0x07ff */ /* 0x0800-0x09ff */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0800-0x083f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0840-0x087f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0880-0x08bf */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x08c0-0x08ff */ 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, /* 0x0900-0x093f */ 0xfe, 0x21, 0x1e, 0x00, 0x0c, 0x00, 0x00, 0x00, /* 0x0940-0x097f */ 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, /* 0x0980-0x09bf */ 0x1e, 0x20, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, /* 0x09c0-0x09ff */ /* 0x0a00-0x0bff */ 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, /* 0x0a00-0x0a3f */ 0x86, 0x39, 0x02, 0x00, 0x00, 0x00, 0x23, 0x00, /* 0x0a40-0x0a7f */ 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, /* 0x0a80-0x0abf */ 0xbe, 0x21, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, /* 0x0ac0-0x0aff */ 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x90, /* 0x0b00-0x0b3f */ 0x1e, 0x20, 0x40, 0x00, 0x0c, 0x00, 0x00, 0x00, /* 0x0b40-0x0b7f */ 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0b80-0x0bbf */ 0x01, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0bc0-0x0bff */ /* 0x0c00-0x0dff */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, /* 0x0c00-0x0c3f */ 0xc1, 0x3d, 0x60, 0x00, 0x0c, 0x00, 0x00, 0x00, /* 0x0c40-0x0c7f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, /* 0x0c80-0x0cbf */ 0x00, 0x30, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, /* 0x0cc0-0x0cff */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0d00-0x0d3f */ 0x1e, 0x20, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, /* 0x0d40-0x0d7f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0d80-0x0dbf */ 0x00, 0x04, 0x5c, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0dc0-0x0dff */ /* 0x0e00-0x0fff */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf2, 0x07, /* 0x0e00-0x0e3f */ 0x80, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0e40-0x0e7f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf2, 0x1b, /* 0x0e80-0x0ebf */ 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0ec0-0x0eff */ 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0xa0, 0x02, /* 0x0f00-0x0f3f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x7f, /* 0x0f40-0x0f7f */ 0xdf, 0x00, 0xff, 0xfe, 0xff, 0xff, 0xff, 0x1f, /* 0x0f80-0x0fbf */ 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0fc0-0x0fff */ /* 0x1000-0x11ff */ 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xfd, 0x66, /* 0x1000-0x103f */ 0x00, 0x00, 0x00, 0xc3, 0x01, 0x00, 0x1e, 0x00, /* 0x1040-0x107f */ 0x64, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1080-0x10bf */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10c0-0x10ff */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1100-0x113f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1140-0x117f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1180-0x11bf */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x11c0-0x11ff */ /* 0x1200-0x13ff */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1200-0x123f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1240-0x127f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1280-0x12bf */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x12c0-0x12ff */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1300-0x133f */ 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, /* 0x1340-0x137f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1380-0x13bf */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x13c0-0x13ff */ /* 0x1600-0x17ff */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1600-0x163f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1640-0x167f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1680-0x16bf */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x16c0-0x16ff */ 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x1c, 0x00, /* 0x1700-0x173f */ 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x0c, 0x00, /* 0x1740-0x177f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb0, 0x3f, /* 0x1780-0x17bf */ 0x40, 0xfe, 0x0f, 0x20, 0x00, 0x00, 0x00, 0x00, /* 0x17c0-0x17ff */ /* 0x1800-0x19ff */ 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1800-0x183f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1840-0x187f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, /* 0x1880-0x18bf */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x18c0-0x18ff */ 0x00, 0x00, 0x00, 0x00, 0x87, 0x01, 0x04, 0x0e, /* 0x1900-0x193f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1940-0x197f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1980-0x19bf */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x19c0-0x19ff */ /* 0x1a00-0x1bff */ 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, /* 0x1a00-0x1a3f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1a40-0x1a7f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1a80-0x1abf */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1ac0-0x1aff */ 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd0, 0x17, /* 0x1b00-0x1b3f */ 0x04, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x0f, 0x00, /* 0x1b40-0x1b7f */ 0x03, 0x00, 0x00, 0x00, 0x3c, 0x03, 0x00, 0x00, /* 0x1b80-0x1bbf */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1bc0-0x1bff */ /* 0x1c00-0x1dff */ 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xcf, 0x00, /* 0x1c00-0x1c3f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1c40-0x1c7f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1c80-0x1cbf */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1cc0-0x1cff */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1d00-0x1d3f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1d40-0x1d7f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1d80-0x1dbf */ 0xff, 0xff, 0xff, 0xff, 0x7f, 0x00, 0x00, 0xc0, /* 0x1dc0-0x1dff */ /* 0x2000-0x21ff */ 0x00, 0xf8, 0x00, 0x00, 0x00, 0x7c, 0x00, 0x00, /* 0x2000-0x203f */ 0x00, 0x00, 0x00, 0x00, 0x1f, 0xfc, 0x00, 0x00, /* 0x2040-0x207f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x2080-0x20bf */ 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00, /* 0x20c0-0x20ff */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x2100-0x213f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x2140-0x217f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x2180-0x21bf */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x21c0-0x21ff */ /* 0x2c00-0x2dff */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x2c00-0x2c3f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x2c40-0x2c7f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x2c80-0x2cbf */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x2cc0-0x2cff */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x2d00-0x2d3f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x2d40-0x2d7f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x2d80-0x2dbf */ 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* 0x2dc0-0x2dff */ /* 0x3000-0x31ff */ 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, /* 0x3000-0x303f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x3040-0x307f */ 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, /* 0x3080-0x30bf */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x30c0-0x30ff */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x3100-0x313f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x3140-0x317f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x3180-0x31bf */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x31c0-0x31ff */ /* 0xa600-0xa7ff */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa600-0xa63f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x07, 0x30, /* 0xa640-0xa67f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa680-0xa6bf */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa6c0-0xa6ff */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa700-0xa73f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa740-0xa77f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa780-0xa7bf */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa7c0-0xa7ff */ /* 0xa800-0xa9ff */ 0x44, 0x08, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, /* 0xa800-0xa83f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa840-0xa87f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa880-0xa8bf */ 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa8c0-0xa8ff */ 0x00, 0x00, 0x00, 0x00, 0xc0, 0x3f, 0x00, 0x00, /* 0xa900-0xa93f */ 0x80, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa940-0xa97f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa980-0xa9bf */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa9c0-0xa9ff */ /* 0xaa00-0xabff */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x66, 0x00, /* 0xaa00-0xaa3f */ 0x08, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xaa40-0xaa7f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xaa80-0xaabf */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xaac0-0xaaff */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xab00-0xab3f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xab40-0xab7f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xab80-0xabbf */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xabc0-0xabff */ /* 0xfa00-0xfbff */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xfa00-0xfa3f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xfa40-0xfa7f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xfa80-0xfabf */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xfac0-0xfaff */ 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, /* 0xfb00-0xfb3f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xfb40-0xfb7f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xfb80-0xfbbf */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xfbc0-0xfbff */ /* 0xfe00-0xffff */ 0xff, 0xff, 0x00, 0x00, 0x7f, 0x00, 0x00, 0x00, /* 0xfe00-0xfe3f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xfe40-0xfe7f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xfe80-0xfebf */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, /* 0xfec0-0xfeff */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xff00-0xff3f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xff40-0xff7f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xff80-0xffbf */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, /* 0xffc0-0xffff */ /* 0x10000-0x101ff */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10000-0x1003f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10040-0x1007f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10080-0x100bf */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x100c0-0x100ff */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10100-0x1013f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10140-0x1017f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10180-0x101bf */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, /* 0x101c0-0x101ff */ /* 0x10a00-0x10bff */ 0x6e, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x87, /* 0x10a00-0x10a3f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10a40-0x10a7f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10a80-0x10abf */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10ac0-0x10aff */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10b00-0x10b3f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10b40-0x10b7f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10b80-0x10bbf */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10bc0-0x10bff */ /* 0x1d000-0x1d1ff */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1d000-0x1d03f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1d040-0x1d07f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1d080-0x1d0bf */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1d0c0-0x1d0ff */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1d100-0x1d13f */ 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0xf8, /* 0x1d140-0x1d17f */ 0xe7, 0x0f, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, /* 0x1d180-0x1d1bf */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1d1c0-0x1d1ff */ /* 0x1d200-0x1d3ff */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1d200-0x1d23f */ 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1d240-0x1d27f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1d280-0x1d2bf */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1d2c0-0x1d2ff */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1d300-0x1d33f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1d340-0x1d37f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1d380-0x1d3bf */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 /* 0x1d3c0-0x1d3ff */ }; static const signed char nonspacing_table_ind[240] = { 0, 1, 2, 3, 4, 5, 6, 7, /* 0x0000-0x0fff */ 8, 9, -1, 10, 11, 12, 13, -1, /* 0x1000-0x1fff */ 14, -1, -1, -1, -1, -1, 15, -1, /* 0x2000-0x2fff */ 16, -1, -1, -1, -1, -1, -1, -1, /* 0x3000-0x3fff */ -1, -1, -1, -1, -1, -1, -1, -1, /* 0x4000-0x4fff */ -1, -1, -1, -1, -1, -1, -1, -1, /* 0x5000-0x5fff */ -1, -1, -1, -1, -1, -1, -1, -1, /* 0x6000-0x6fff */ -1, -1, -1, -1, -1, -1, -1, -1, /* 0x7000-0x7fff */ -1, -1, -1, -1, -1, -1, -1, -1, /* 0x8000-0x8fff */ -1, -1, -1, -1, -1, -1, -1, -1, /* 0x9000-0x9fff */ -1, -1, -1, 17, 18, 19, -1, -1, /* 0xa000-0xafff */ -1, -1, -1, -1, -1, -1, -1, -1, /* 0xb000-0xbfff */ -1, -1, -1, -1, -1, -1, -1, -1, /* 0xc000-0xcfff */ -1, -1, -1, -1, -1, -1, -1, -1, /* 0xd000-0xdfff */ -1, -1, -1, -1, -1, -1, -1, -1, /* 0xe000-0xefff */ -1, -1, -1, -1, -1, 20, -1, 21, /* 0xf000-0xffff */ 22, -1, -1, -1, -1, 23, -1, -1, /* 0x10000-0x10fff */ -1, -1, -1, -1, -1, -1, -1, -1, /* 0x11000-0x11fff */ -1, -1, -1, -1, -1, -1, -1, -1, /* 0x12000-0x12fff */ -1, -1, -1, -1, -1, -1, -1, -1, /* 0x13000-0x13fff */ -1, -1, -1, -1, -1, -1, -1, -1, /* 0x14000-0x14fff */ -1, -1, -1, -1, -1, -1, -1, -1, /* 0x15000-0x15fff */ -1, -1, -1, -1, -1, -1, -1, -1, /* 0x16000-0x16fff */ -1, -1, -1, -1, -1, -1, -1, -1, /* 0x17000-0x17fff */ -1, -1, -1, -1, -1, -1, -1, -1, /* 0x18000-0x18fff */ -1, -1, -1, -1, -1, -1, -1, -1, /* 0x19000-0x19fff */ -1, -1, -1, -1, -1, -1, -1, -1, /* 0x1a000-0x1afff */ -1, -1, -1, -1, -1, -1, -1, -1, /* 0x1b000-0x1bfff */ -1, -1, -1, -1, -1, -1, -1, -1, /* 0x1c000-0x1cfff */ 24, 25, -1, -1, -1, -1, -1, -1 /* 0x1d000-0x1dfff */ }; /* Determine number of column positions required for UC. */ int uc_width (ucs4_t uc, const char *encoding) { /* Test for non-spacing or control character. */ if ((uc >> 9) < 240) { int ind = nonspacing_table_ind[uc >> 9]; if (ind >= 0) if ((nonspacing_table_data[64*ind + ((uc >> 3) & 63)] >> (uc & 7)) & 1) { if (uc > 0 && uc < 0xa0) return -1; else return 0; } } else if ((uc >> 9) == (0xe0000 >> 9)) { if (uc >= 0xe0100) { if (uc <= 0xe01ef) return 0; } else { if (uc >= 0xe0020 ? uc <= 0xe007f : uc == 0xe0001) return 0; } } /* Test for double-width character. * Generated from "grep '^....;[WF]' EastAsianWidth.txt" * and "grep '^....;[^WF]' EastAsianWidth.txt" */ if (uc >= 0x1100 && ((uc < 0x1160) /* Hangul Jamo */ || (uc >= 0x2329 && uc < 0x232b) /* Angle Brackets */ || (uc >= 0x2e80 && uc < 0xa4d0 /* CJK ... Yi */ && !(uc == 0x303f) && !(uc >= 0x4dc0 && uc < 0x4e00)) || (uc >= 0xac00 && uc < 0xd7a4) /* Hangul Syllables */ || (uc >= 0xf900 && uc < 0xfb00) /* CJK Compatibility Ideographs */ || (uc >= 0xfe10 && uc < 0xfe20) /* Presentation Forms for Vertical */ || (uc >= 0xfe30 && uc < 0xfe70) /* CJK Compatibility Forms */ || (uc >= 0xff00 && uc < 0xff61) /* Fullwidth Forms */ || (uc >= 0xffe0 && uc < 0xffe7) /* Fullwidth Signs */ || (uc >= 0x20000 && uc <= 0x2a6d6) /* CJK */ || (uc >= 0x2f800 && uc <= 0x2fa1d) /* CJK Compatibility Ideographs */ ) ) return 2; /* In ancient CJK encodings, Cyrillic and most other characters are double-width as well. */ if (uc >= 0x00A1 && uc < 0xFF61 && uc != 0x20A9 && is_cjk_encoding (encoding)) return 2; return 1; } gnuit-4.9.5/lib/uniwidth/cjk.h0000644000175000017500000000310111146671375013127 00000000000000/* Test for CJK encoding. Copyright (C) 2001-2002, 2005-2007 Free Software Foundation, Inc. Written by Bruno Haible , 2002. 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 3 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 Lesser General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ #include "streq.h" static int is_cjk_encoding (const char *encoding) { if (0 /* Legacy Japanese encodings */ || STREQ (encoding, "EUC-JP", 'E', 'U', 'C', '-', 'J', 'P', 0, 0, 0) /* Legacy Chinese encodings */ || STREQ (encoding, "GB2312", 'G', 'B', '2', '3', '1', '2', 0, 0, 0) || STREQ (encoding, "GBK", 'G', 'B', 'K', 0, 0, 0, 0, 0, 0) || STREQ (encoding, "EUC-TW", 'E', 'U', 'C', '-', 'T', 'W', 0, 0, 0) || STREQ (encoding, "BIG5", 'B', 'I', 'G', '5', 0, 0, 0, 0, 0) /* Legacy Korean encodings */ || STREQ (encoding, "EUC-KR", 'E', 'U', 'C', '-', 'K', 'R', 0, 0, 0) || STREQ (encoding, "CP949", 'C', 'P', '9', '4', '9', 0, 0, 0, 0) || STREQ (encoding, "JOHAB", 'J', 'O', 'H', 'A', 'B', 0, 0, 0, 0)) return 1; return 0; } gnuit-4.9.5/lib/stripslash.c0000644000175000017500000000302311146671375012717 00000000000000/* stripslash.c -- remove redundant trailing slashes from a file name Copyright (C) 1990, 2001, 2003-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 3 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, see . */ #include #include "dirname.h" /* Remove trailing slashes from FILE. Return true if a trailing slash was removed. This is useful when using file name completion from a shell that adds a "/" after directory names (such as tcsh and bash), because on symlinks to directories, several system calls have different semantics according to whether a trailing slash is present. */ bool strip_trailing_slashes (char *file) { char *base = last_component (file); char *base_lim; bool had_slash; /* last_component returns "" for file system roots, but we need to turn `///' into `/'. */ if (! *base) base = file; base_lim = base + base_len (base); had_slash = (*base_lim != '\0'); *base_lim = '\0'; return had_slash; } gnuit-4.9.5/lib/mbsinit.c0000644000175000017500000000332711146671375012177 00000000000000/* Test for initial conversion state. Copyright (C) 2008 Free Software Foundation, Inc. Written by Bruno Haible , 2008. 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 3 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, see . */ #include /* Specification. */ #include #include "verify.h" /* Platforms that lack mbsinit() also lack mbrlen(), mbrtowc(), mbsrtowcs() and wcrtomb(), wcsrtombs(). We assume that - sizeof (mbstate_t) >= 4, - only stateless encodings are supported (such as UTF-8 and EUC-JP, but not ISO-2022 variants), - for each encoding, the number of bytes for a wide character is <= 4. (This maximum is attained for UTF-8, GB18030, EUC-TW.) We define the meaning of mbstate_t as follows: - In mb -> wc direction, mbstate_t's first byte contains the number of buffered bytes (in the range 0..3), followed by up to 3 buffered bytes. - In wc -> mb direction, mbstate_t contains no information. In other words, it is always in the initial state. */ verify (sizeof (mbstate_t) >= 4); int mbsinit (const mbstate_t *ps) { const char *pstate = (const char *)ps; return pstate[0] == 0; } gnuit-4.9.5/lib/time.in.h0000644000175000017500000000714211146671375012101 00000000000000/* A more-standard . Copyright (C) 2007-2008 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 3, 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. */ #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif /* Don't get in the way of glibc when it includes time.h merely to declare a few standard symbols, rather than to declare all the symbols. Also, Solaris 8 eventually includes itself recursively; if that is happening, just include the system without adding our own declarations. */ #if (defined __need_time_t || defined __need_clock_t \ || defined __need_timespec \ || defined _GL_TIME_H) # @INCLUDE_NEXT@ @NEXT_TIME_H@ #else # define _GL_TIME_H # @INCLUDE_NEXT@ @NEXT_TIME_H@ # ifdef __cplusplus extern "C" { # endif /* Some systems don't define struct timespec (e.g., AIX 4.1, Ultrix 4.3). Or they define it with the wrong member names or define it in (e.g., FreeBSD circa 1997). */ # if ! @TIME_H_DEFINES_STRUCT_TIMESPEC@ # if @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ # include # else # undef timespec # define timespec rpl_timespec struct timespec { time_t tv_sec; long int tv_nsec; }; # endif # endif /* Sleep for at least RQTP seconds unless interrupted, If interrupted, return -1 and store the remaining time into RMTP. See . */ # if @REPLACE_NANOSLEEP@ # define nanosleep rpl_nanosleep int nanosleep (struct timespec const *__rqtp, struct timespec *__rmtp); # endif /* Convert TIMER to RESULT, assuming local time and UTC respectively. See and . */ # if @REPLACE_LOCALTIME_R@ # undef localtime_r # define localtime_r rpl_localtime_r # undef gmtime_r # define gmtime_r rpl_gmtime_r struct tm *localtime_r (time_t const *restrict __timer, struct tm *restrict __result); struct tm *gmtime_r (time_t const *restrict __timer, struct tm *restrict __result); # endif /* Parse BUF as a time stamp, assuming FORMAT specifies its layout, and store the resulting broken-down time into TM. See . */ # if @REPLACE_STRPTIME@ # undef strptime # define strptime rpl_strptime char *strptime (char const *restrict __buf, char const *restrict __format, struct tm *restrict __tm); # endif /* Convert TM to a time_t value, assuming UTC. */ # if @REPLACE_TIMEGM@ # undef timegm # define timegm rpl_timegm time_t timegm (struct tm *__tm); # endif /* Encourage applications to avoid unsafe functions that can overrun buffers when given outlandish struct tm values. Portable applications should use strftime (or even sprintf) instead. */ # if GNULIB_PORTCHECK # undef asctime # define asctime eschew_asctime # undef asctime_r # define asctime_r eschew_asctime_r # undef ctime # define ctime eschew_ctime # undef ctime_r # define ctime_r eschew_ctime_r # endif # ifdef __cplusplus } # endif #endif gnuit-4.9.5/lib/strnlen1.h0000644000175000017500000000224711146671375012305 00000000000000/* Find the length of STRING + 1, but scan at most MAXLEN bytes. Copyright (C) 2005 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 3 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, see . */ #ifndef _STRNLEN1_H #define _STRNLEN1_H #include #ifdef __cplusplus extern "C" { #endif /* Find the length of STRING + 1, but scan at most MAXLEN bytes. If no '\0' terminator is found in that many characters, return MAXLEN. */ /* This is the same as strnlen (string, maxlen - 1) + 1. */ extern size_t strnlen1 (const char *string, size_t maxlen); #ifdef __cplusplus } #endif #endif /* _STRNLEN1_H */ gnuit-4.9.5/lib/memmove.c0000644000175000017500000000124111146671375012170 00000000000000/* memmove.c -- copy memory. Copy LENGTH bytes from SOURCE to DEST. Does not null-terminate. In the public domain. By David MacKenzie . */ #include #include void * memmove (void *dest0, void const *source0, size_t length) { char *dest = dest0; char const *source = source0; if (source < dest) /* Moving from low mem to hi mem; start at end. */ for (source += length, dest += length; length; --length) *--dest = *--source; else if (source != dest) { /* Moving from hi mem to low mem; start at beginning. */ for (; length; --length) *dest++ = *source++; } return dest0; } gnuit-4.9.5/lib/xstrtoumax.c0000644000175000017500000000025211146671375012762 00000000000000#define __strtol strtoumax #define __strtol_t uintmax_t #define __xstrtol xstrtoumax #define STRTOL_T_MINIMUM 0 #define STRTOL_T_MAXIMUM UINTMAX_MAX #include "xstrtol.c" gnuit-4.9.5/lib/signal.in.h0000644000175000017500000001207411146671375012420 00000000000000/* A GNU-like . Copyright (C) 2006-2008 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 3 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, see . */ #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif #if defined __need_sig_atomic_t || defined __need_sigset_t /* Special invocation convention inside glibc header files. */ # @INCLUDE_NEXT@ @NEXT_SIGNAL_H@ #else /* Normal invocation convention. */ #ifndef _GL_SIGNAL_H /* The include_next requires a split double-inclusion guard. */ #@INCLUDE_NEXT@ @NEXT_SIGNAL_H@ #ifndef _GL_SIGNAL_H #define _GL_SIGNAL_H /* The definition of GL_LINK_WARNING is copied here. */ /* Define pid_t, uid_t. Also, mingw defines sigset_t not in , but in . */ #include #ifdef __cplusplus extern "C" { #endif #if @GNULIB_SIGNAL_H_SIGPIPE@ # ifndef SIGPIPE /* Define SIGPIPE to a value that does not overlap with other signals. */ # define SIGPIPE 13 # define GNULIB_defined_SIGPIPE 1 /* To actually use SIGPIPE, you also need the gnulib modules 'sigprocmask', 'write', 'stdio'. */ # endif #endif #if !@HAVE_POSIX_SIGNALBLOCKING@ /* Maximum signal number + 1. */ # ifndef NSIG # define NSIG 32 # endif /* This code supports only 32 signals. */ typedef int verify_NSIG_constraint[2 * (NSIG <= 32) - 1]; /* A set or mask of signals. */ # if !@HAVE_SIGSET_T@ typedef unsigned int sigset_t; # endif /* Test whether a given signal is contained in a signal set. */ extern int sigismember (const sigset_t *set, int sig); /* Initialize a signal set to the empty set. */ extern int sigemptyset (sigset_t *set); /* Add a signal to a signal set. */ extern int sigaddset (sigset_t *set, int sig); /* Remove a signal from a signal set. */ extern int sigdelset (sigset_t *set, int sig); /* Fill a signal set with all possible signals. */ extern int sigfillset (sigset_t *set); /* Return the set of those blocked signals that are pending. */ extern int sigpending (sigset_t *set); /* If OLD_SET is not NULL, put the current set of blocked signals in *OLD_SET. Then, if SET is not NULL, affect the current set of blocked signals by combining it with *SET as indicated in OPERATION. In this implementation, you are not allowed to change a signal handler while the signal is blocked. */ # define SIG_BLOCK 0 /* blocked_set = blocked_set | *set; */ # define SIG_SETMASK 1 /* blocked_set = *set; */ # define SIG_UNBLOCK 2 /* blocked_set = blocked_set & ~*set; */ extern int sigprocmask (int operation, const sigset_t *set, sigset_t *old_set); # define signal rpl_signal /* Install the handler FUNC for signal SIG, and return the previous handler. */ extern void (*signal (int sig, void (*func) (int))) (int); # if GNULIB_defined_SIGPIPE /* Raise signal SIG. */ # undef raise # define raise rpl_raise extern int raise (int sig); # endif #endif /* !@HAVE_POSIX_SIGNALBLOCKING@ */ #if !@HAVE_SIGACTION@ # if !@HAVE_SIGINFO_T@ /* Present to allow compilation, but unsupported by gnulib. */ union sigval { int sival_int; void *sival_ptr; }; /* Present to allow compilation, but unsupported by gnulib. */ struct siginfo_t { int si_signo; int si_code; int si_errno; pid_t si_pid; uid_t si_uid; void *si_addr; int si_status; long si_band; union sigval si_value; }; typedef struct siginfo_t siginfo_t; # endif /* !@HAVE_SIGINFO_T@ */ /* We assume that platforms which lack the sigaction() function also lack the 'struct sigaction' type, and vice versa. */ struct sigaction { union { void (*_sa_handler) (int); /* Present to allow compilation, but unsupported by gnulib. POSIX says that implementations may, but not must, make sa_sigaction overlap with sa_handler, but we know of no implementation where they do not overlap. */ void (*_sa_sigaction) (int, siginfo_t *, void *); } _sa_func; sigset_t sa_mask; /* Not all POSIX flags are supported. */ int sa_flags; }; # define sa_handler _sa_func._sa_handler # define sa_sigaction _sa_func._sa_sigaction /* Unsupported flags are not present. */ # define SA_RESETHAND 1 # define SA_NODEFER 2 # define SA_RESTART 4 extern int sigaction (int, const struct sigaction *restrict, struct sigaction *restrict); #elif !@HAVE_STRUCT_SIGACTION_SA_SIGACTION@ # define sa_sigaction sa_handler #endif /* !@HAVE_SIGACTION@, !@HAVE_STRUCT_SIGACTION_SA_SIGACTION@ */ /* Some systems don't have SA_NODEFER. */ #ifndef SA_NODEFER # define SA_NODEFER 0 #endif #ifdef __cplusplus } #endif #endif /* _GL_SIGNAL_H */ #endif /* _GL_SIGNAL_H */ #endif gnuit-4.9.5/lib/strtoul.c0000644000175000017500000000142611146671375012244 00000000000000/* Copyright (C) 1991, 1997 Free Software Foundation, Inc. This file is part of the GNU C Library. 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 3 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, see . */ #define UNSIGNED 1 #include "strtol.c" gnuit-4.9.5/lib/tempname.c0000644000175000017500000002037211146671375012337 00000000000000/* tempname.c - generate the name of a temporary file. Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2005, 2006, 2007 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 3 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, see . */ /* Extracted from glibc sysdeps/posix/tempname.c. See also tmpdir.c. */ #if !_LIBC # include # include "tempname.h" #endif #include #include #include #ifndef __set_errno # define __set_errno(Val) errno = (Val) #endif #include #ifndef P_tmpdir # define P_tmpdir "/tmp" #endif #ifndef TMP_MAX # define TMP_MAX 238328 #endif #ifndef __GT_FILE # define __GT_FILE 0 # define __GT_BIGFILE 1 # define __GT_DIR 2 # define __GT_NOCREATE 3 #endif #include #include #include #include #include #include #include #include #if _LIBC # define struct_stat64 struct stat64 # define small_open __open # define large_open __open64 #else # define struct_stat64 struct stat # define small_open open # define large_open open # define __gen_tempname gen_tempname # define __getpid getpid # define __gettimeofday gettimeofday # define __mkdir mkdir # define __lxstat64(version, file, buf) lstat (file, buf) # define __xstat64(version, file, buf) stat (file, buf) #endif #if ! (HAVE___SECURE_GETENV || _LIBC) # define __secure_getenv getenv #endif #ifdef _LIBC # include # if HP_TIMING_AVAIL # define RANDOM_BITS(Var) \ if (__builtin_expect (value == UINT64_C (0), 0)) \ { \ /* If this is the first time this function is used initialize \ the variable we accumulate the value in to some somewhat \ random value. If we'd not do this programs at startup time \ might have a reduced set of possible names, at least on slow \ machines. */ \ struct timeval tv; \ __gettimeofday (&tv, NULL); \ value = ((uint64_t) tv.tv_usec << 16) ^ tv.tv_sec; \ } \ HP_TIMING_NOW (Var) # endif #endif /* Use the widest available unsigned type if uint64_t is not available. The algorithm below extracts a number less than 62**6 (approximately 2**35.725) from uint64_t, so ancient hosts where uintmax_t is only 32 bits lose about 3.725 bits of randomness, which is better than not having mkstemp at all. */ #if !defined UINT64_MAX && !defined uint64_t # define uint64_t uintmax_t #endif #if _LIBC /* Return nonzero if DIR is an existent directory. */ static int direxists (const char *dir) { struct_stat64 buf; return __xstat64 (_STAT_VER, dir, &buf) == 0 && S_ISDIR (buf.st_mode); } /* Path search algorithm, for tmpnam, tmpfile, etc. If DIR is non-null and exists, uses it; otherwise uses the first of $TMPDIR, P_tmpdir, /tmp that exists. Copies into TMPL a template suitable for use with mk[s]temp. Will fail (-1) if DIR is non-null and doesn't exist, none of the searched dirs exists, or there's not enough space in TMPL. */ int __path_search (char *tmpl, size_t tmpl_len, const char *dir, const char *pfx, int try_tmpdir) { const char *d; size_t dlen, plen; if (!pfx || !pfx[0]) { pfx = "file"; plen = 4; } else { plen = strlen (pfx); if (plen > 5) plen = 5; } if (try_tmpdir) { d = __secure_getenv ("TMPDIR"); if (d != NULL && direxists (d)) dir = d; else if (dir != NULL && direxists (dir)) /* nothing */ ; else dir = NULL; } if (dir == NULL) { if (direxists (P_tmpdir)) dir = P_tmpdir; else if (strcmp (P_tmpdir, "/tmp") != 0 && direxists ("/tmp")) dir = "/tmp"; else { __set_errno (ENOENT); return -1; } } dlen = strlen (dir); while (dlen > 1 && dir[dlen - 1] == '/') dlen--; /* remove trailing slashes */ /* check we have room for "${dir}/${pfx}XXXXXX\0" */ if (tmpl_len < dlen + 1 + plen + 6 + 1) { __set_errno (EINVAL); return -1; } sprintf (tmpl, "%.*s/%.*sXXXXXX", (int) dlen, dir, (int) plen, pfx); return 0; } #endif /* _LIBC */ /* These are the characters used in temporary file names. */ static const char letters[] = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; /* Generate a temporary file name based on TMPL. TMPL must match the rules for mk[s]temp (i.e. end in "XXXXXX"). The name constructed does not exist at the time of the call to __gen_tempname. TMPL is overwritten with the result. KIND may be one of: __GT_NOCREATE: simply verify that the name does not exist at the time of the call. __GT_FILE: create the file using open(O_CREAT|O_EXCL) and return a read-write fd. The file is mode 0600. __GT_BIGFILE: same as __GT_FILE but use open64(). __GT_DIR: create a directory, which will be mode 0700. We use a clever algorithm to get hard-to-predict names. */ int __gen_tempname (char *tmpl, int kind) { int len; char *XXXXXX; static uint64_t value; uint64_t random_time_bits; unsigned int count; int fd = -1; int save_errno = errno; struct_stat64 st; /* A lower bound on the number of temporary files to attempt to generate. The maximum total number of temporary file names that can exist for a given template is 62**6. It should never be necessary to try all these combinations. Instead if a reasonable number of names is tried (we define reasonable as 62**3) fail to give the system administrator the chance to remove the problems. */ #define ATTEMPTS_MIN (62 * 62 * 62) /* The number of times to attempt to generate a temporary file. To conform to POSIX, this must be no smaller than TMP_MAX. */ #if ATTEMPTS_MIN < TMP_MAX unsigned int attempts = TMP_MAX; #else unsigned int attempts = ATTEMPTS_MIN; #endif len = strlen (tmpl); if (len < 6 || strcmp (&tmpl[len - 6], "XXXXXX")) { __set_errno (EINVAL); return -1; } /* This is where the Xs start. */ XXXXXX = &tmpl[len - 6]; /* Get some more or less random data. */ #ifdef RANDOM_BITS RANDOM_BITS (random_time_bits); #else { struct timeval tv; __gettimeofday (&tv, NULL); random_time_bits = ((uint64_t) tv.tv_usec << 16) ^ tv.tv_sec; } #endif value += random_time_bits ^ __getpid (); for (count = 0; count < attempts; value += 7777, ++count) { uint64_t v = value; /* Fill in the random bits. */ XXXXXX[0] = letters[v % 62]; v /= 62; XXXXXX[1] = letters[v % 62]; v /= 62; XXXXXX[2] = letters[v % 62]; v /= 62; XXXXXX[3] = letters[v % 62]; v /= 62; XXXXXX[4] = letters[v % 62]; v /= 62; XXXXXX[5] = letters[v % 62]; switch (kind) { case __GT_FILE: fd = small_open (tmpl, O_RDWR | O_CREAT | O_EXCL, S_IRUSR | S_IWUSR); break; case __GT_BIGFILE: fd = large_open (tmpl, O_RDWR | O_CREAT | O_EXCL, S_IRUSR | S_IWUSR); break; case __GT_DIR: fd = __mkdir (tmpl, S_IRUSR | S_IWUSR | S_IXUSR); break; case __GT_NOCREATE: /* This case is backward from the other three. __gen_tempname succeeds if __xstat fails because the name does not exist. Note the continue to bypass the common logic at the bottom of the loop. */ if (__lxstat64 (_STAT_VER, tmpl, &st) < 0) { if (errno == ENOENT) { __set_errno (save_errno); return 0; } else /* Give up now. */ return -1; } continue; default: assert (! "invalid KIND in __gen_tempname"); } if (fd >= 0) { __set_errno (save_errno); return fd; } else if (errno != EEXIST) return -1; } /* We got out of the loop because we ran out of combinations to try. */ __set_errno (EEXIST); return -1; } gnuit-4.9.5/lib/timespec.h0000644000175000017500000000230611146671375012344 00000000000000/* timespec -- System time interface Copyright (C) 2000, 2002, 2004, 2005, 2007 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 3 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, see . */ #if ! defined TIMESPEC_H # define TIMESPEC_H # include /* Return negative, zero, positive if A < B, A == B, A > B, respectively. Assume the nanosecond components are in range, or close to it. */ static inline int timespec_cmp (struct timespec a, struct timespec b) { return (a.tv_sec < b.tv_sec ? -1 : a.tv_sec > b.tv_sec ? 1 : a.tv_nsec - b.tv_nsec); } void gettime (struct timespec *); int settime (struct timespec const *); #endif gnuit-4.9.5/lib/putenv.c0000644000175000017500000000613711146671375012055 00000000000000/* Copyright (C) 1991, 1994, 1997-1998, 2000, 2003-2008 Free Software Foundation, Inc. NOTE: The canonical source of this file is maintained with the GNU C Library. Bugs can be reported to bug-glibc@prep.ai.mit.edu. 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 3 of the License, or 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, see . */ #include /* Specification. */ #include #include /* Include errno.h *after* sys/types.h to work around header problems on AIX 3.2.5. */ #include #ifndef __set_errno # define __set_errno(ev) ((errno) = (ev)) #endif #include #include #if HAVE_GNU_LD # define environ __environ #else extern char **environ; #endif #if _LIBC /* This lock protects against simultaneous modifications of `environ'. */ # include __libc_lock_define_initialized (static, envlock) # define LOCK __libc_lock_lock (envlock) # define UNLOCK __libc_lock_unlock (envlock) #else # define LOCK # define UNLOCK #endif static int _unsetenv (const char *name) { size_t len; char **ep; if (name == NULL || *name == '\0' || strchr (name, '=') != NULL) { __set_errno (EINVAL); return -1; } len = strlen (name); LOCK; ep = environ; while (*ep != NULL) if (!strncmp (*ep, name, len) && (*ep)[len] == '=') { /* Found it. Remove this pointer by moving later ones back. */ char **dp = ep; do dp[0] = dp[1]; while (*dp++); /* Continue the loop in case NAME appears again. */ } else ++ep; UNLOCK; return 0; } /* Put STRING, which is of the form "NAME=VALUE", in the environment. If STRING contains no `=', then remove STRING from the environment. */ int putenv (char *string) { const char *const name_end = strchr (string, '='); register size_t size; register char **ep; if (name_end == NULL) { /* Remove the variable from the environment. */ return _unsetenv (string); } size = 0; for (ep = environ; *ep != NULL; ++ep) if (!strncmp (*ep, string, name_end - string) && (*ep)[name_end - string] == '=') break; else ++size; if (*ep == NULL) { static char **last_environ = NULL; char **new_environ = (char **) malloc ((size + 2) * sizeof (char *)); if (new_environ == NULL) return -1; (void) memcpy ((void *) new_environ, (void *) environ, size * sizeof (char *)); new_environ[size] = (char *) string; new_environ[size + 1] = NULL; free (last_environ); last_environ = new_environ; environ = new_environ; } else *ep = string; return 0; } gnuit-4.9.5/lib/error.c0000644000175000017500000001753511146671375011671 00000000000000/* Error handler for noninteractive utilities Copyright (C) 1990-1998, 2000-2007 Free Software Foundation, Inc. This file is part of the GNU C Library. 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 3 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, see . */ /* Written by David MacKenzie . */ #if !_LIBC # include #endif #include "error.h" #include #include #include #include #if !_LIBC && ENABLE_NLS # include "gettext.h" # define _(msgid) gettext (msgid) #endif #ifdef _LIBC # include # include # include # include # define mbsrtowcs __mbsrtowcs #endif #if USE_UNLOCKED_IO # include "unlocked-io.h" #endif #ifndef _ # define _(String) String #endif /* If NULL, error will flush stdout, then print on stderr the program name, a colon and a space. Otherwise, error will call this function without parameters instead. */ void (*error_print_progname) (void); /* This variable is incremented each time `error' is called. */ unsigned int error_message_count; #ifdef _LIBC /* In the GNU C library, there is a predefined variable for this. */ # define program_name program_invocation_name # include # include # include /* In GNU libc we want do not want to use the common name `error' directly. Instead make it a weak alias. */ extern void __error (int status, int errnum, const char *message, ...) __attribute__ ((__format__ (__printf__, 3, 4))); extern void __error_at_line (int status, int errnum, const char *file_name, unsigned int line_number, const char *message, ...) __attribute__ ((__format__ (__printf__, 5, 6)));; # define error __error # define error_at_line __error_at_line # include # define fflush(s) INTUSE(_IO_fflush) (s) # undef putc # define putc(c, fp) INTUSE(_IO_putc) (c, fp) # include #else /* not _LIBC */ # if !HAVE_DECL_STRERROR_R && STRERROR_R_CHAR_P # ifndef HAVE_DECL_STRERROR_R "this configure-time declaration test was not run" # endif char *strerror_r (); # endif /* The calling program should define program_name and set it to the name of the executing program. */ extern char *program_name; # if HAVE_STRERROR_R || defined strerror_r # define __strerror_r strerror_r # endif /* HAVE_STRERROR_R || defined strerror_r */ #endif /* not _LIBC */ static void print_errno_message (int errnum) { char const *s; #if defined HAVE_STRERROR_R || _LIBC char errbuf[1024]; # if STRERROR_R_CHAR_P || _LIBC s = __strerror_r (errnum, errbuf, sizeof errbuf); # else if (__strerror_r (errnum, errbuf, sizeof errbuf) == 0) s = errbuf; else s = 0; # endif #else s = strerror (errnum); #endif #if !_LIBC if (! s) s = _("Unknown system error"); #endif #if _LIBC __fxprintf (NULL, ": %s", s); #else fprintf (stderr, ": %s", s); #endif } static void error_tail (int status, int errnum, const char *message, va_list args) { #if _LIBC if (_IO_fwide (stderr, 0) > 0) { # define ALLOCA_LIMIT 2000 size_t len = strlen (message) + 1; wchar_t *wmessage = NULL; mbstate_t st; size_t res; const char *tmp; bool use_malloc = false; while (1) { if (__libc_use_alloca (len * sizeof (wchar_t))) wmessage = (wchar_t *) alloca (len * sizeof (wchar_t)); else { if (!use_malloc) wmessage = NULL; wchar_t *p = (wchar_t *) realloc (wmessage, len * sizeof (wchar_t)); if (p == NULL) { free (wmessage); fputws_unlocked (L"out of memory\n", stderr); return; } wmessage = p; use_malloc = true; } memset (&st, '\0', sizeof (st)); tmp = message; res = mbsrtowcs (wmessage, &tmp, len, &st); if (res != len) break; if (__builtin_expect (len >= SIZE_MAX / 2, 0)) { /* This really should not happen if everything is fine. */ res = (size_t) -1; break; } len *= 2; } if (res == (size_t) -1) { /* The string cannot be converted. */ if (use_malloc) { free (wmessage); use_malloc = false; } wmessage = (wchar_t *) L"???"; } __vfwprintf (stderr, wmessage, args); if (use_malloc) free (wmessage); } else #endif vfprintf (stderr, message, args); va_end (args); ++error_message_count; if (errnum) print_errno_message (errnum); #if _LIBC __fxprintf (NULL, "\n"); #else putc ('\n', stderr); #endif fflush (stderr); if (status) exit (status); } /* Print the program name and error message MESSAGE, which is a printf-style format string with optional args. If ERRNUM is nonzero, print its corresponding system error message. Exit with status STATUS if it is nonzero. */ void error (int status, int errnum, const char *message, ...) { va_list args; #if defined _LIBC && defined __libc_ptf_call /* We do not want this call to be cut short by a thread cancellation. Therefore disable cancellation for now. */ int state = PTHREAD_CANCEL_ENABLE; __libc_ptf_call (pthread_setcancelstate, (PTHREAD_CANCEL_DISABLE, &state), 0); #endif fflush (stdout); #ifdef _LIBC _IO_flockfile (stderr); #endif if (error_print_progname) (*error_print_progname) (); else { #if _LIBC __fxprintf (NULL, "%s: ", program_name); #else fprintf (stderr, "%s: ", program_name); #endif } va_start (args, message); error_tail (status, errnum, message, args); #ifdef _LIBC _IO_funlockfile (stderr); # ifdef __libc_ptf_call __libc_ptf_call (pthread_setcancelstate, (state, NULL), 0); # endif #endif } /* Sometimes we want to have at most one error per line. This variable controls whether this mode is selected or not. */ int error_one_per_line; void error_at_line (int status, int errnum, const char *file_name, unsigned int line_number, const char *message, ...) { va_list args; if (error_one_per_line) { static const char *old_file_name; static unsigned int old_line_number; if (old_line_number == line_number && (file_name == old_file_name || strcmp (old_file_name, file_name) == 0)) /* Simply return and print nothing. */ return; old_file_name = file_name; old_line_number = line_number; } #if defined _LIBC && defined __libc_ptf_call /* We do not want this call to be cut short by a thread cancellation. Therefore disable cancellation for now. */ int state = PTHREAD_CANCEL_ENABLE; __libc_ptf_call (pthread_setcancelstate, (PTHREAD_CANCEL_DISABLE, &state), 0); #endif fflush (stdout); #ifdef _LIBC _IO_flockfile (stderr); #endif if (error_print_progname) (*error_print_progname) (); else { #if _LIBC __fxprintf (NULL, "%s:", program_name); #else fprintf (stderr, "%s:", program_name); #endif } #if _LIBC __fxprintf (NULL, file_name != NULL ? "%s:%d: " : " ", file_name, line_number); #else fprintf (stderr, file_name != NULL ? "%s:%d: " : " ", file_name, line_number); #endif va_start (args, message); error_tail (status, errnum, message, args); #ifdef _LIBC _IO_funlockfile (stderr); # ifdef __libc_ptf_call __libc_ptf_call (pthread_setcancelstate, (state, NULL), 0); # endif #endif } #ifdef _LIBC /* Make the weak alias. */ # undef error # undef error_at_line weak_alias (__error, error) weak_alias (__error_at_line, error_at_line) #endif gnuit-4.9.5/lib/xstrtol-error.c0000644000175000017500000000532711146671375013402 00000000000000/* A more useful interface to strtol. Copyright (C) 1995, 1996, 1998, 1999, 2001-2004, 2006-2008 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 3 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, see . */ #include #include "xstrtol.h" #include #include "error.h" #include "exitfail.h" #include "gettext.h" #define N_(msgid) msgid /* Report an error for an invalid integer in an option argument. ERR is the error code returned by one of the xstrto* functions. Use OPT_IDX to decide whether to print the short option string "C" or "-C" or a long option string derived from LONG_OPTION. OPT_IDX is -2 if the short option "C" was used, without any leading "-"; it is -1 if the short option "-C" was used; otherwise it is an index into LONG_OPTIONS, which should have a name preceded by two '-' characters. ARG is the option-argument containing the integer. After reporting an error, exit with status EXIT_STATUS if it is nonzero. */ static void xstrtol_error (enum strtol_error err, int opt_idx, char c, struct option const *long_options, char const *arg, int exit_status) { char const *hyphens = "--"; char const *msgid; char const *option; char option_buffer[2]; switch (err) { default: abort (); case LONGINT_INVALID: msgid = N_("invalid %s%s argument `%s'"); break; case LONGINT_INVALID_SUFFIX_CHAR: case LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW: msgid = N_("invalid suffix in %s%s argument `%s'"); break; case LONGINT_OVERFLOW: msgid = N_("%s%s argument `%s' too large"); break; } if (opt_idx < 0) { hyphens -= opt_idx; option_buffer[0] = c; option_buffer[1] = '\0'; option = option_buffer; } else option = long_options[opt_idx].name; error (exit_status, 0, gettext (msgid), hyphens, option, arg); } /* Like xstrtol_error, except exit with a failure status. */ void xstrtol_fatal (enum strtol_error err, int opt_idx, char c, struct option const *long_options, char const *arg) { xstrtol_error (err, opt_idx, c, long_options, arg, exit_failure); abort (); } gnuit-4.9.5/lib/xalloc-die.c0000644000175000017500000000245211146671375012551 00000000000000/* Report a memory allocation failure and exit. Copyright (C) 1997, 1998, 1999, 2000, 2002, 2003, 2004, 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 3 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, see . */ #include #include "xalloc.h" #include #include "error.h" #include "exitfail.h" #include "gettext.h" #define _(msgid) gettext (msgid) void xalloc_die (void) { error (exit_failure, 0, "%s", _("memory exhausted")); /* The `noreturn' cannot be given to error, since it may return if its first argument is 0. To help compilers understand the xalloc_die does not return, call abort. Also, the abort is a safety feature if exit_failure is 0 (which shouldn't happen). */ abort (); } gnuit-4.9.5/lib/error.h0000644000175000017500000000455111146671375011670 00000000000000/* Declaration for error-reporting function Copyright (C) 1995, 1996, 1997, 2003, 2006, 2008 Free Software Foundation, Inc. This file is part of the GNU C Library. 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 3 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, see . */ #ifndef _ERROR_H #define _ERROR_H 1 #ifndef __attribute__ /* This feature is available in gcc versions 2.5 and later. */ # if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) # define __attribute__(Spec) /* empty */ # endif /* The __-protected variants of `format' and `printf' attributes are accepted by gcc versions 2.6.4 (effectively 2.7) and later. */ # if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7) # define __format__ format # define __printf__ printf # endif #endif #ifdef __cplusplus extern "C" { #endif /* Print a message with `fprintf (stderr, FORMAT, ...)'; if ERRNUM is nonzero, follow it with ": " and strerror (ERRNUM). If STATUS is nonzero, terminate the program with `exit (STATUS)'. */ extern void error (int __status, int __errnum, const char *__format, ...) __attribute__ ((__format__ (__printf__, 3, 4))); extern void error_at_line (int __status, int __errnum, const char *__fname, unsigned int __lineno, const char *__format, ...) __attribute__ ((__format__ (__printf__, 5, 6))); /* If NULL, error will flush stdout, then print on stderr the program name, a colon and a space. Otherwise, error will call this function without parameters instead. */ extern void (*error_print_progname) (void); /* This variable is incremented each time `error' is called. */ extern unsigned int error_message_count; /* Sometimes we want to have at most one error per line. This variable controls whether this mode is selected or not. */ extern int error_one_per_line; #ifdef __cplusplus } #endif #endif /* error.h */ gnuit-4.9.5/lib/sys_select.in.h0000644000175000017500000000535311146671375013322 00000000000000/* Substitute for . Copyright (C) 2007-2008 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 3, 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. */ # if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ # endif /* On OSF/1, and include . Simply delegate to the system's header in this case. */ #if @HAVE_SYS_SELECT_H@ && defined __osf__ && (defined _SYS_TYPES_H_ && !defined _GL_SYS_SELECT_H_REDIRECT_FROM_SYS_TYPES_H) && defined _OSF_SOURCE # define _GL_SYS_SELECT_H_REDIRECT_FROM_SYS_TYPES_H # @INCLUDE_NEXT@ @NEXT_SYS_SELECT_H@ #elif @HAVE_SYS_SELECT_H@ && defined __osf__ && (defined _SYS_TIME_H_ && !defined _GL_SYS_SELECT_H_REDIRECT_FROM_SYS_TIME_H) && defined _OSF_SOURCE # define _GL_SYS_SELECT_H_REDIRECT_FROM_SYS_TIME_H # @INCLUDE_NEXT@ @NEXT_SYS_SELECT_H@ #else #ifndef _GL_SYS_SELECT_H #if @HAVE_SYS_SELECT_H@ /* On many platforms, assumes prior inclusion of . */ # include /* On OSF/1 4.0, provides only a forward declaration of 'struct timeval', and no definition of this type.. */ # include /* The include_next requires a split double-inclusion guard. */ # @INCLUDE_NEXT@ @NEXT_SYS_SELECT_H@ #endif #ifndef _GL_SYS_SELECT_H #define _GL_SYS_SELECT_H #if !@HAVE_SYS_SELECT_H@ /* A platform that lacks . */ # include /* The definition of GL_LINK_WARNING is copied here. */ # ifdef __cplusplus extern "C" { # endif # if @GNULIB_SELECT@ # if @HAVE_WINSOCK2_H@ # undef select # define select rpl_select extern int rpl_select (int, fd_set *, fd_set *, fd_set *, struct timeval *); # endif # elif @HAVE_WINSOCK2_H@ # undef select # define select select_used_without_requesting_gnulib_module_select # elif defined GNULIB_POSIXCHECK # undef select # define select(n,r,w,e,t) \ (GL_LINK_WARNING ("select is not always POSIX compliant - " \ "use gnulib module select for portability"), \ select (n, r, w, e, t)) # endif # ifdef __cplusplus } # endif #endif #endif /* _GL_SYS_SELECT_H */ #endif /* _GL_SYS_SELECT_H */ #endif /* OSF/1 */ gnuit-4.9.5/lib/getopt.in.h0000644000175000017500000001751611146671375012453 00000000000000/* Declarations for getopt. Copyright (C) 1989-1994,1996-1999,2001,2003,2004,2005,2006,2007 Free Software Foundation, Inc. This file is part of the GNU C Library. 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 3 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, see . */ #ifndef _GETOPT_H #ifndef __need_getopt # define _GETOPT_H 1 #endif /* Standalone applications should #define __GETOPT_PREFIX to an identifier that prefixes the external functions and variables defined in this header. When this happens, include the headers that might declare getopt so that they will not cause confusion if included after this file. Then systematically rename identifiers so that they do not collide with the system functions and variables. Renaming avoids problems with some compilers and linkers. */ #if defined __GETOPT_PREFIX && !defined __need_getopt # include # include # include # undef __need_getopt # undef getopt # undef getopt_long # undef getopt_long_only # undef optarg # undef opterr # undef optind # undef optopt # define __GETOPT_CONCAT(x, y) x ## y # define __GETOPT_XCONCAT(x, y) __GETOPT_CONCAT (x, y) # define __GETOPT_ID(y) __GETOPT_XCONCAT (__GETOPT_PREFIX, y) # define getopt __GETOPT_ID (getopt) # define getopt_long __GETOPT_ID (getopt_long) # define getopt_long_only __GETOPT_ID (getopt_long_only) # define optarg __GETOPT_ID (optarg) # define opterr __GETOPT_ID (opterr) # define optind __GETOPT_ID (optind) # define optopt __GETOPT_ID (optopt) #endif /* Standalone applications get correct prototypes for getopt_long and getopt_long_only; they declare "char **argv". libc uses prototypes with "char *const *argv" that are incorrect because getopt_long and getopt_long_only can permute argv; this is required for backward compatibility (e.g., for LSB 2.0.1). This used to be `#if defined __GETOPT_PREFIX && !defined __need_getopt', but it caused redefinition warnings if both unistd.h and getopt.h were included, since unistd.h includes getopt.h having previously defined __need_getopt. The only place where __getopt_argv_const is used is in definitions of getopt_long and getopt_long_only below, but these are visible only if __need_getopt is not defined, so it is quite safe to rewrite the conditional as follows: */ #if !defined __need_getopt # if defined __GETOPT_PREFIX # define __getopt_argv_const /* empty */ # else # define __getopt_argv_const const # endif #endif /* If __GNU_LIBRARY__ is not already defined, either we are being used standalone, or this is the first header included in the source file. If we are being used with glibc, we need to include , but that does not exist if we are standalone. So: if __GNU_LIBRARY__ is not defined, include , which will pull in for us if it's from glibc. (Why ctype.h? It's guaranteed to exist and it doesn't flood the namespace with stuff the way some other headers do.) */ #if !defined __GNU_LIBRARY__ # include #endif #ifndef __THROW # ifndef __GNUC_PREREQ # define __GNUC_PREREQ(maj, min) (0) # endif # if defined __cplusplus && __GNUC_PREREQ (2,8) # define __THROW throw () # else # define __THROW # endif #endif #ifdef __cplusplus extern "C" { #endif /* For communication from `getopt' to the caller. When `getopt' finds an option that takes an argument, the argument value is returned here. Also, when `ordering' is RETURN_IN_ORDER, each non-option ARGV-element is returned here. */ extern char *optarg; /* Index in ARGV of the next element to be scanned. This is used for communication to and from the caller and for communication between successive calls to `getopt'. On entry to `getopt', zero means this is the first call; initialize. When `getopt' returns -1, this is the index of the first of the non-option elements that the caller should itself scan. Otherwise, `optind' communicates from one call to the next how much of ARGV has been scanned so far. */ extern int optind; /* Callers store zero here to inhibit the error message `getopt' prints for unrecognized options. */ extern int opterr; /* Set to an option character which was unrecognized. */ extern int optopt; #ifndef __need_getopt /* Describe the long-named options requested by the application. The LONG_OPTIONS argument to getopt_long or getopt_long_only is a vector of `struct option' terminated by an element containing a name which is zero. The field `has_arg' is: no_argument (or 0) if the option does not take an argument, required_argument (or 1) if the option requires an argument, optional_argument (or 2) if the option takes an optional argument. If the field `flag' is not NULL, it points to a variable that is set to the value given in the field `val' when the option is found, but left unchanged if the option is not found. To have a long-named option do something other than set an `int' to a compiled-in constant, such as set a value from `optarg', set the option's `flag' field to zero and its `val' field to a nonzero value (the equivalent single-letter option character, if there is one). For long options that have a zero `flag' field, `getopt' returns the contents of the `val' field. */ struct option { const char *name; /* has_arg can't be an enum because some compilers complain about type mismatches in all the code that assumes it is an int. */ int has_arg; int *flag; int val; }; /* Names for the values of the `has_arg' field of `struct option'. */ # define no_argument 0 # define required_argument 1 # define optional_argument 2 #endif /* need getopt */ /* Get definitions and prototypes for functions to process the arguments in ARGV (ARGC of them, minus the program name) for options given in OPTS. Return the option character from OPTS just read. Return -1 when there are no more options. For unrecognized options, or options missing arguments, `optopt' is set to the option letter, and '?' is returned. The OPTS string is a list of characters which are recognized option letters, optionally followed by colons, specifying that that letter takes an argument, to be placed in `optarg'. If a letter in OPTS is followed by two colons, its argument is optional. This behavior is specific to the GNU `getopt'. The argument `--' causes premature termination of argument scanning, explicitly telling `getopt' that there are no more options. If OPTS begins with `-', then non-option arguments are treated as arguments to the option '\1'. This behavior is specific to the GNU `getopt'. If OPTS begins with `+', or POSIXLY_CORRECT is set in the environment, then do not permute arguments. */ extern int getopt (int ___argc, char *const *___argv, const char *__shortopts) __THROW; #ifndef __need_getopt extern int getopt_long (int ___argc, char *__getopt_argv_const *___argv, const char *__shortopts, const struct option *__longopts, int *__longind) __THROW; extern int getopt_long_only (int ___argc, char *__getopt_argv_const *___argv, const char *__shortopts, const struct option *__longopts, int *__longind) __THROW; #endif #ifdef __cplusplus } #endif /* Make sure we later can get all the definitions and declarations. */ #undef __need_getopt #endif /* getopt.h */ gnuit-4.9.5/lib/exitfail.h0000644000175000017500000000136711146671375012346 00000000000000/* Failure exit status Copyright (C) 2002 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 3 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, see . */ extern int volatile exit_failure; gnuit-4.9.5/lib/sys_socket.in.h0000644000175000017500000002717211146671375013336 00000000000000/* Provide a sys/socket header file for systems lacking it (read: MinGW) and for systems where it is incomplete. Copyright (C) 2005-2008 Free Software Foundation, Inc. Written by Simon Josefsson. 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 3, 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. */ /* This file is supposed to be used on platforms that lack , on platforms where cannot be included standalone, and on platforms where does not provide all necessary definitions. It is intended to provide definitions and prototypes needed by an application. */ #ifndef _GL_SYS_SOCKET_H #if @HAVE_SYS_SOCKET_H@ # if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ # endif /* On many platforms, assumes prior inclusion of . */ # include /* The include_next requires a split double-inclusion guard. */ # @INCLUDE_NEXT@ @NEXT_SYS_SOCKET_H@ #endif #ifndef _GL_SYS_SOCKET_H #define _GL_SYS_SOCKET_H #if @HAVE_SYS_SOCKET_H@ /* A platform that has . */ /* For shutdown(). */ # if !defined SHUT_RD # define SHUT_RD 0 # endif # if !defined SHUT_WR # define SHUT_WR 1 # endif # if !defined SHUT_RDWR # define SHUT_RDWR 2 # endif #else # ifdef __CYGWIN__ # error "Cygwin does have a sys/socket.h, doesn't it?!?" # endif /* A platform that lacks . Currently only MinGW is supported. See the gnulib manual regarding Windows sockets. MinGW has the header files winsock2.h and ws2tcpip.h that declare the sys/socket.h definitions we need. Note that you can influence which definitions you get by setting the WINVER symbol before including these two files. For example, getaddrinfo is only available if _WIN32_WINNT >= 0x0501 (that symbol is set indiriectly through WINVER). You can set this by adding AC_DEFINE(WINVER, 0x0501) to configure.ac. Note that your code may not run on older Windows releases then. My Windows 2000 box was not able to run the code, for example. The situation is slightly confusing because: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winsock/winsock/getaddrinfo_2.asp suggests that getaddrinfo should be available on all Windows releases. */ # if @HAVE_WINSOCK2_H@ # include # endif # if @HAVE_WS2TCPIP_H@ # include # endif /* For shutdown(). */ # if !defined SHUT_RD && defined SD_RECEIVE # define SHUT_RD SD_RECEIVE # endif # if !defined SHUT_WR && defined SD_SEND # define SHUT_WR SD_SEND # endif # if !defined SHUT_RDWR && defined SD_BOTH # define SHUT_RDWR SD_BOTH # endif /* The definition of GL_LINK_WARNING is copied here. */ # if @HAVE_WINSOCK2_H@ /* Include headers needed by the emulation code. */ # include # include typedef int socklen_t; # endif # ifdef __cplusplus extern "C" { # endif # if @HAVE_WINSOCK2_H@ /* Re-define FD_ISSET to avoid a WSA call while we are not using network sockets. */ static inline int rpl_fd_isset (SOCKET fd, fd_set * set) { u_int i; if (set == NULL) return 0; for (i = 0; i < set->fd_count; i++) if (set->fd_array[i] == fd) return 1; return 0; } # undef FD_ISSET # define FD_ISSET(fd, set) rpl_fd_isset(fd, set) # endif /* Wrap everything else to use libc file descriptors for sockets. */ # if @HAVE_WINSOCK2_H@ && !defined _GL_UNISTD_H # undef close # define close close_used_without_including_unistd_h # endif # if @HAVE_WINSOCK2_H@ && !defined _GL_UNISTD_H # undef gethostname # define gethostname gethostname_used_without_including_unistd_h # endif # if @GNULIB_SOCKET@ # if @HAVE_WINSOCK2_H@ # undef socket # define socket rpl_socket extern int rpl_socket (int, int, int protocol); # endif # elif @HAVE_WINSOCK2_H@ # undef socket # define socket socket_used_without_requesting_gnulib_module_socket # elif defined GNULIB_POSIXCHECK # undef socket # define socket(d,t,p) \ (GL_LINK_WARNING ("socket is not always POSIX compliant - " \ "use gnulib module socket for portability"), \ socket (d, t, p)) # endif # if @GNULIB_CONNECT@ # if @HAVE_WINSOCK2_H@ # undef connect # define connect rpl_connect extern int rpl_connect (int, struct sockaddr *, int); # endif # elif @HAVE_WINSOCK2_H@ # undef connect # define connect socket_used_without_requesting_gnulib_module_connect # elif defined GNULIB_POSIXCHECK # undef connect # define connect(s,a,l) \ (GL_LINK_WARNING ("connect is not always POSIX compliant - " \ "use gnulib module connect for portability"), \ connect (s, a, l)) # endif # if @GNULIB_ACCEPT@ # if @HAVE_WINSOCK2_H@ # undef accept # define accept rpl_accept extern int rpl_accept (int, struct sockaddr *, int *); # endif # elif @HAVE_WINSOCK2_H@ # undef accept # define accept accept_used_without_requesting_gnulib_module_accept # elif defined GNULIB_POSIXCHECK # undef accept # define accept(s,a,l) \ (GL_LINK_WARNING ("accept is not always POSIX compliant - " \ "use gnulib module accept for portability"), \ accept (s, a, l)) # endif # if @GNULIB_BIND@ # if @HAVE_WINSOCK2_H@ # undef bind # define bind rpl_bind extern int rpl_bind (int, struct sockaddr *, int); # endif # elif @HAVE_WINSOCK2_H@ # undef bind # define bind bind_used_without_requesting_gnulib_module_bind # elif defined GNULIB_POSIXCHECK # undef bind # define bind(s,a,l) \ (GL_LINK_WARNING ("bind is not always POSIX compliant - " \ "use gnulib module bind for portability"), \ bind (s, a, l)) # endif # if @GNULIB_GETPEERNAME@ # if @HAVE_WINSOCK2_H@ # undef getpeername # define getpeername rpl_getpeername extern int rpl_getpeername (int, struct sockaddr *, int *); # endif # elif @HAVE_WINSOCK2_H@ # undef getpeername # define getpeername getpeername_used_without_requesting_gnulib_module_getpeername # elif defined GNULIB_POSIXCHECK # undef getpeername # define getpeername(s,a,l) \ (GL_LINK_WARNING ("getpeername is not always POSIX compliant - " \ "use gnulib module getpeername for portability"), \ getpeername (s, a, l)) # endif # if @GNULIB_GETSOCKNAME@ # if @HAVE_WINSOCK2_H@ # undef getsockname # define getsockname rpl_getsockname extern int rpl_getsockname (int, struct sockaddr *, int *); # endif # elif @HAVE_WINSOCK2_H@ # undef getsockname # define getsockname getsockname_used_without_requesting_gnulib_module_getsockname # elif defined GNULIB_POSIXCHECK # undef getsockname # define getsockname(s,a,l) \ (GL_LINK_WARNING ("getsockname is not always POSIX compliant - " \ "use gnulib module getsockname for portability"), \ getsockname (s, a, l)) # endif # if @GNULIB_GETSOCKOPT@ # if @HAVE_WINSOCK2_H@ # undef getsockopt # define getsockopt rpl_getsockopt extern int rpl_getsockopt (int, int, int, void *, int *); # endif # elif @HAVE_WINSOCK2_H@ # undef getsockopt # define getsockopt getsockopt_used_without_requesting_gnulib_module_getsockopt # elif defined GNULIB_POSIXCHECK # undef getsockopt # define getsockopt(s,lvl,o,v,l) \ (GL_LINK_WARNING ("getsockopt is not always POSIX compliant - " \ "use gnulib module getsockopt for portability"), \ getsockopt (s, lvl, o, v, l)) # endif # if @GNULIB_LISTEN@ # if @HAVE_WINSOCK2_H@ # undef listen # define listen rpl_listen extern int rpl_listen (int, int); # endif # elif @HAVE_WINSOCK2_H@ # undef listen # define listen listen_used_without_requesting_gnulib_module_listen # elif defined GNULIB_POSIXCHECK # undef listen # define listen(s,b) \ (GL_LINK_WARNING ("listen is not always POSIX compliant - " \ "use gnulib module listen for portability"), \ listen (s, b)) # endif # if @GNULIB_RECV@ # if @HAVE_WINSOCK2_H@ # undef recv # define recv rpl_recv extern int rpl_recv (int, void *, int, int); # endif # elif @HAVE_WINSOCK2_H@ # undef recv # define recv recv_used_without_requesting_gnulib_module_recv # elif defined GNULIB_POSIXCHECK # undef recv # define recv(s,b,n,f) \ (GL_LINK_WARNING ("recv is not always POSIX compliant - " \ "use gnulib module recv for portability"), \ recv (s, b, n, f)) # endif # if @GNULIB_SEND@ # if @HAVE_WINSOCK2_H@ # undef send # define send rpl_send extern int rpl_send (int, const void *, int, int); # endif # elif @HAVE_WINSOCK2_H@ # undef send # define send send_used_without_requesting_gnulib_module_send # elif defined GNULIB_POSIXCHECK # undef send # define send(s,b,n,f) \ (GL_LINK_WARNING ("send is not always POSIX compliant - " \ "use gnulib module send for portability"), \ send (s, b, n, f)) # endif # if @GNULIB_RECVFROM@ # if @HAVE_WINSOCK2_H@ # undef recvfrom # define recvfrom rpl_recvfrom extern int rpl_recvfrom (int, void *, int, int, struct sockaddr *, int *); # endif # elif @HAVE_WINSOCK2_H@ # undef recvfrom # define recvfrom recvfrom_used_without_requesting_gnulib_module_recvfrom # elif defined GNULIB_POSIXCHECK # undef recvfrom # define recvfrom(s,b,n,f,a,l) \ (GL_LINK_WARNING ("recvfrom is not always POSIX compliant - " \ "use gnulib module recvfrom for portability"), \ recvfrom (s, b, n, f, a, l)) # endif # if @GNULIB_SENDTO@ # if @HAVE_WINSOCK2_H@ # undef sendto # define sendto rpl_sendto extern int rpl_sendto (int, const void *, int, int, struct sockaddr *, int); # endif # elif @HAVE_WINSOCK2_H@ # undef sendto # define sendto sendto_used_without_requesting_gnulib_module_sendto # elif defined GNULIB_POSIXCHECK # undef sendto # define sendto(s,b,n,f,a,l) \ (GL_LINK_WARNING ("sendto is not always POSIX compliant - " \ "use gnulib module sendto for portability"), \ sendto (s, b, n, f, a, l)) # endif # if @GNULIB_SETSOCKOPT@ # if @HAVE_WINSOCK2_H@ # undef setsockopt # define setsockopt rpl_setsockopt extern int rpl_setsockopt (int, int, int, const void *, int); # endif # elif @HAVE_WINSOCK2_H@ # undef setsockopt # define setsockopt setsockopt_used_without_requesting_gnulib_module_setsockopt # elif defined GNULIB_POSIXCHECK # undef setsockopt # define setsockopt(s,lvl,o,v,l) \ (GL_LINK_WARNING ("setsockopt is not always POSIX compliant - " \ "use gnulib module setsockopt for portability"), \ setsockopt (s, lvl, o, v, l)) # endif # if @GNULIB_SHUTDOWN@ # if @HAVE_WINSOCK2_H@ # undef shutdown # define shutdown rpl_shutdown extern int rpl_shutdown (int, int); # endif # elif @HAVE_WINSOCK2_H@ # undef shutdown # define shutdown shutdown_used_without_requesting_gnulib_module_shutdown # elif defined GNULIB_POSIXCHECK # undef shutdown # define shutdown(s,h) \ (GL_LINK_WARNING ("shutdown is not always POSIX compliant - " \ "use gnulib module shutdown for portability"), \ shutdown (s, h)) # endif # if @HAVE_WINSOCK2_H@ # undef select # define select select_used_without_including_sys_select_h # endif # ifdef __cplusplus } # endif #endif /* HAVE_SYS_SOCKET_H */ #endif /* _GL_SYS_SOCKET_H */ #endif /* _GL_SYS_SOCKET_H */ gnuit-4.9.5/lib/malloc.c0000644000175000017500000000267211146671375012003 00000000000000/* malloc() function that is glibc compatible. Copyright (C) 1997, 1998, 2006, 2007 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 3, 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. */ /* written by Jim Meyering and Bruno Haible */ #include /* Only the AC_FUNC_MALLOC macro defines 'malloc' already in config.h. */ #ifdef malloc # define NEED_MALLOC_GNU # undef malloc #endif /* Specification. */ #include #include /* Call the system's malloc below. */ #undef malloc /* Allocate an N-byte block of memory from the heap. If N is zero, allocate a 1-byte block. */ void * rpl_malloc (size_t n) { void *result; #ifdef NEED_MALLOC_GNU if (n == 0) n = 1; #endif result = malloc (n); #if !HAVE_MALLOC_POSIX if (result == NULL) errno = ENOMEM; #endif return result; } gnuit-4.9.5/lib/fnmatch.in.h0000644000175000017500000000452011146671375012560 00000000000000/* Copyright (C) 1991, 1992, 1993, 1996, 1997, 1998, 1999, 2001, 2002, 2003, 2005, 2007 Free Software Foundation, Inc. This file is part of the GNU C Library. 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 3, 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. */ #ifndef _FNMATCH_H #define _FNMATCH_H 1 #ifdef __cplusplus extern "C" { #endif /* We #undef these before defining them because some losing systems (HP-UX A.08.07 for example) define these in . */ #undef FNM_PATHNAME #undef FNM_NOESCAPE #undef FNM_PERIOD /* Bits set in the FLAGS argument to `fnmatch'. */ #define FNM_PATHNAME (1 << 0) /* No wildcard can ever match `/'. */ #define FNM_NOESCAPE (1 << 1) /* Backslashes don't quote special chars. */ #define FNM_PERIOD (1 << 2) /* Leading `.' is matched only explicitly. */ #if !defined _POSIX_C_SOURCE || _POSIX_C_SOURCE < 2 || defined _GNU_SOURCE # define FNM_FILE_NAME FNM_PATHNAME /* Preferred GNU name. */ # define FNM_LEADING_DIR (1 << 3) /* Ignore `/...' after a match. */ # define FNM_CASEFOLD (1 << 4) /* Compare without regard to case. */ # define FNM_EXTMATCH (1 << 5) /* Use ksh-like extended matching. */ #endif /* Value returned by `fnmatch' if STRING does not match PATTERN. */ #define FNM_NOMATCH 1 /* This value is returned if the implementation does not support `fnmatch'. Since this is not the case here it will never be returned but the conformance test suites still require the symbol to be defined. */ #ifdef _XOPEN_SOURCE # define FNM_NOSYS (-1) #endif /* Match NAME against the file name pattern PATTERN, returning zero if it matches, FNM_NOMATCH if not. */ extern int fnmatch (const char *__pattern, const char *__name, int __flags); #ifdef __cplusplus } #endif #endif /* fnmatch.h */ gnuit-4.9.5/lib/human.h0000644000175000017500000000545711146671375011655 00000000000000/* human.h -- print human readable file size Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 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 3 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, see . */ /* Written by Paul Eggert and Larry McVoy. */ #ifndef HUMAN_H_ # define HUMAN_H_ 1 # include # include # include # include # include /* A conservative bound on the maximum length of a human-readable string. The output can be the square of the largest uintmax_t, so double its size before converting to a bound. log10 (2.0) < 146/485. Add 1 for integer division truncation. Also, the output can have a thousands separator between every digit, so multiply by MB_LEN_MAX + 1 and then subtract MB_LEN_MAX. Append 1 for a space before the suffix. Finally, append 3, the maximum length of a suffix. */ # define LONGEST_HUMAN_READABLE \ ((2 * sizeof (uintmax_t) * CHAR_BIT * 146 / 485 + 1) * (MB_LEN_MAX + 1) \ - MB_LEN_MAX + 1 + 3) /* Options for human_readable. */ enum { /* Unless otherwise specified these options may be ORed together. */ /* The following three options are mutually exclusive. */ /* Round to plus infinity (default). */ human_ceiling = 0, /* Round to nearest, ties to even. */ human_round_to_nearest = 1, /* Round to minus infinity. */ human_floor = 2, /* Group digits together, e.g. `1,000,000'. This uses the locale-defined grouping; the traditional C locale does not group, so this has effect only if some other locale is in use. */ human_group_digits = 4, /* When autoscaling, suppress ".0" at end. */ human_suppress_point_zero = 8, /* Scale output and use SI-style units, ignoring the output block size. */ human_autoscale = 16, /* Prefer base 1024 to base 1000. */ human_base_1024 = 32, /* Prepend " " before unit symbol. */ human_space_before_unit = 64, /* Append SI prefix, e.g. "k" or "M". */ human_SI = 128, /* Append "B" (if base 1000) or "iB" (if base 1024) to SI prefix. */ human_B = 256 }; char *human_readable (uintmax_t, char *, int, uintmax_t, uintmax_t); enum strtol_error human_options (char const *, int *, uintmax_t *); #endif /* HUMAN_H_ */ gnuit-4.9.5/lib/ref-add.sin0000644000175000017500000000205111146671375012374 00000000000000# Add this package to a list of references stored in a text file. # # Copyright (C) 2000 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 3, 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. # # Written by Bruno Haible . # /^# Packages using this file: / { s/# Packages using this file:// ta :a s/ @PACKAGE@ / @PACKAGE@ / tb s/ $/ @PACKAGE@ / :b s/^/# Packages using this file:/ } gnuit-4.9.5/lib/mbsstr.c0000644000175000017500000002621311146671375012043 00000000000000/* Searching in a string. Copyright (C) 2005-2008 Free Software Foundation, Inc. Written by Bruno Haible , 2005. 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 3 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, see . */ #include /* Specification. */ #include #include #include /* for NULL, in case a nonstandard string.h lacks it */ #include "malloca.h" #include "mbuiter.h" /* Knuth-Morris-Pratt algorithm. */ #define CANON_ELEMENT(c) c #include "str-kmp.h" /* Knuth-Morris-Pratt algorithm. See http://en.wikipedia.org/wiki/Knuth-Morris-Pratt_algorithm Return a boolean indicating success: Return true and set *RESULTP if the search was completed. Return false if it was aborted because not enough memory was available. */ static bool knuth_morris_pratt_multibyte (const char *haystack, const char *needle, const char **resultp) { size_t m = mbslen (needle); mbchar_t *needle_mbchars; size_t *table; /* Allocate room for needle_mbchars and the table. */ char *memory = (char *) nmalloca (m, sizeof (mbchar_t) + sizeof (size_t)); if (memory == NULL) return false; needle_mbchars = (mbchar_t *) memory; table = (size_t *) (memory + m * sizeof (mbchar_t)); /* Fill needle_mbchars. */ { mbui_iterator_t iter; size_t j; j = 0; for (mbui_init (iter, needle); mbui_avail (iter); mbui_advance (iter), j++) mb_copy (&needle_mbchars[j], &mbui_cur (iter)); } /* Fill the table. For 0 < i < m: 0 < table[i] <= i is defined such that forall 0 < x < table[i]: needle[x..i-1] != needle[0..i-1-x], and table[i] is as large as possible with this property. This implies: 1) For 0 < i < m: If table[i] < i, needle[table[i]..i-1] = needle[0..i-1-table[i]]. 2) For 0 < i < m: rhaystack[0..i-1] == needle[0..i-1] and exists h, i <= h < m: rhaystack[h] != needle[h] implies forall 0 <= x < table[i]: rhaystack[x..x+m-1] != needle[0..m-1]. table[0] remains uninitialized. */ { size_t i, j; /* i = 1: Nothing to verify for x = 0. */ table[1] = 1; j = 0; for (i = 2; i < m; i++) { /* Here: j = i-1 - table[i-1]. The inequality needle[x..i-1] != needle[0..i-1-x] is known to hold for x < table[i-1], by induction. Furthermore, if j>0: needle[i-1-j..i-2] = needle[0..j-1]. */ mbchar_t *b = &needle_mbchars[i - 1]; for (;;) { /* Invariants: The inequality needle[x..i-1] != needle[0..i-1-x] is known to hold for x < i-1-j. Furthermore, if j>0: needle[i-1-j..i-2] = needle[0..j-1]. */ if (mb_equal (*b, needle_mbchars[j])) { /* Set table[i] := i-1-j. */ table[i] = i - ++j; break; } /* The inequality needle[x..i-1] != needle[0..i-1-x] also holds for x = i-1-j, because needle[i-1] != needle[j] = needle[i-1-x]. */ if (j == 0) { /* The inequality holds for all possible x. */ table[i] = i; break; } /* The inequality needle[x..i-1] != needle[0..i-1-x] also holds for i-1-j < x < i-1-j+table[j], because for these x: needle[x..i-2] = needle[x-(i-1-j)..j-1] != needle[0..j-1-(x-(i-1-j))] (by definition of table[j]) = needle[0..i-2-x], hence needle[x..i-1] != needle[0..i-1-x]. Furthermore needle[i-1-j+table[j]..i-2] = needle[table[j]..j-1] = needle[0..j-1-table[j]] (by definition of table[j]). */ j = j - table[j]; } /* Here: j = i - table[i]. */ } } /* Search, using the table to accelerate the processing. */ { size_t j; mbui_iterator_t rhaystack; mbui_iterator_t phaystack; *resultp = NULL; j = 0; mbui_init (rhaystack, haystack); mbui_init (phaystack, haystack); /* Invariant: phaystack = rhaystack + j. */ while (mbui_avail (phaystack)) if (mb_equal (needle_mbchars[j], mbui_cur (phaystack))) { j++; mbui_advance (phaystack); if (j == m) { /* The entire needle has been found. */ *resultp = mbui_cur_ptr (rhaystack); break; } } else if (j > 0) { /* Found a match of needle[0..j-1], mismatch at needle[j]. */ size_t count = table[j]; j -= count; for (; count > 0; count--) { if (!mbui_avail (rhaystack)) abort (); mbui_advance (rhaystack); } } else { /* Found a mismatch at needle[0] already. */ if (!mbui_avail (rhaystack)) abort (); mbui_advance (rhaystack); mbui_advance (phaystack); } } freea (memory); return true; } /* Find the first occurrence of the character string NEEDLE in the character string HAYSTACK. Return NULL if NEEDLE is not found in HAYSTACK. */ char * mbsstr (const char *haystack, const char *needle) { /* Be careful not to look at the entire extent of haystack or needle until needed. This is useful because of these two cases: - haystack may be very long, and a match of needle found early, - needle may be very long, and not even a short initial segment of needle may be found in haystack. */ if (MB_CUR_MAX > 1) { mbui_iterator_t iter_needle; mbui_init (iter_needle, needle); if (mbui_avail (iter_needle)) { /* Minimizing the worst-case complexity: Let n = mbslen(haystack), m = mbslen(needle). The naïve algorithm is O(n*m) worst-case. The Knuth-Morris-Pratt algorithm is O(n) worst-case but it needs a memory allocation. To achieve linear complexity and yet amortize the cost of the memory allocation, we activate the Knuth-Morris-Pratt algorithm only once the naïve algorithm has already run for some time; more precisely, when - the outer loop count is >= 10, - the average number of comparisons per outer loop is >= 5, - the total number of comparisons is >= m. But we try it only once. If the memory allocation attempt failed, we don't retry it. */ bool try_kmp = true; size_t outer_loop_count = 0; size_t comparison_count = 0; size_t last_ccount = 0; /* last comparison count */ mbui_iterator_t iter_needle_last_ccount; /* = needle + last_ccount */ mbui_iterator_t iter_haystack; mbui_init (iter_needle_last_ccount, needle); mbui_init (iter_haystack, haystack); for (;; mbui_advance (iter_haystack)) { if (!mbui_avail (iter_haystack)) /* No match. */ return NULL; /* See whether it's advisable to use an asymptotically faster algorithm. */ if (try_kmp && outer_loop_count >= 10 && comparison_count >= 5 * outer_loop_count) { /* See if needle + comparison_count now reaches the end of needle. */ size_t count = comparison_count - last_ccount; for (; count > 0 && mbui_avail (iter_needle_last_ccount); count--) mbui_advance (iter_needle_last_ccount); last_ccount = comparison_count; if (!mbui_avail (iter_needle_last_ccount)) { /* Try the Knuth-Morris-Pratt algorithm. */ const char *result; bool success = knuth_morris_pratt_multibyte (haystack, needle, &result); if (success) return (char *) result; try_kmp = false; } } outer_loop_count++; comparison_count++; if (mb_equal (mbui_cur (iter_haystack), mbui_cur (iter_needle))) /* The first character matches. */ { mbui_iterator_t rhaystack; mbui_iterator_t rneedle; memcpy (&rhaystack, &iter_haystack, sizeof (mbui_iterator_t)); mbui_advance (rhaystack); mbui_init (rneedle, needle); if (!mbui_avail (rneedle)) abort (); mbui_advance (rneedle); for (;; mbui_advance (rhaystack), mbui_advance (rneedle)) { if (!mbui_avail (rneedle)) /* Found a match. */ return (char *) mbui_cur_ptr (iter_haystack); if (!mbui_avail (rhaystack)) /* No match. */ return NULL; comparison_count++; if (!mb_equal (mbui_cur (rhaystack), mbui_cur (rneedle))) /* Nothing in this round. */ break; } } } } else return (char *) haystack; } else { if (*needle != '\0') { /* Minimizing the worst-case complexity: Let n = strlen(haystack), m = strlen(needle). The naïve algorithm is O(n*m) worst-case. The Knuth-Morris-Pratt algorithm is O(n) worst-case but it needs a memory allocation. To achieve linear complexity and yet amortize the cost of the memory allocation, we activate the Knuth-Morris-Pratt algorithm only once the naïve algorithm has already run for some time; more precisely, when - the outer loop count is >= 10, - the average number of comparisons per outer loop is >= 5, - the total number of comparisons is >= m. But we try it only once. If the memory allocation attempt failed, we don't retry it. */ bool try_kmp = true; size_t outer_loop_count = 0; size_t comparison_count = 0; size_t last_ccount = 0; /* last comparison count */ const char *needle_last_ccount = needle; /* = needle + last_ccount */ /* Speed up the following searches of needle by caching its first character. */ char b = *needle++; for (;; haystack++) { if (*haystack == '\0') /* No match. */ return NULL; /* See whether it's advisable to use an asymptotically faster algorithm. */ if (try_kmp && outer_loop_count >= 10 && comparison_count >= 5 * outer_loop_count) { /* See if needle + comparison_count now reaches the end of needle. */ if (needle_last_ccount != NULL) { needle_last_ccount += strnlen (needle_last_ccount, comparison_count - last_ccount); if (*needle_last_ccount == '\0') needle_last_ccount = NULL; last_ccount = comparison_count; } if (needle_last_ccount == NULL) { /* Try the Knuth-Morris-Pratt algorithm. */ const char *result; bool success = knuth_morris_pratt_unibyte (haystack, needle - 1, &result); if (success) return (char *) result; try_kmp = false; } } outer_loop_count++; comparison_count++; if (*haystack == b) /* The first character matches. */ { const char *rhaystack = haystack + 1; const char *rneedle = needle; for (;; rhaystack++, rneedle++) { if (*rneedle == '\0') /* Found a match. */ return (char *) haystack; if (*rhaystack == '\0') /* No match. */ return NULL; comparison_count++; if (*rhaystack != *rneedle) /* Nothing in this round. */ break; } } } } else return (char *) haystack; } } gnuit-4.9.5/lib/wchar.in.h0000644000175000017500000002135511146671375012251 00000000000000/* A substitute for ISO C99 , for platforms that have issues. Copyright (C) 2007-2009 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 3, 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. */ /* Written by Eric Blake. */ /* * ISO C 99 for platforms that have issues. * * * For now, this just ensures proper prerequisite inclusion order and * the declaration of wcwidth(). */ #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif #if defined __need_mbstate_t || (defined __hpux && ((defined _INTTYPES_INCLUDED && !defined strtoimax) || defined _GL_JUST_INCLUDE_SYSTEM_WCHAR_H)) || defined _GL_ALREADY_INCLUDING_WCHAR_H /* Special invocation convention: - Inside uClibc header files. - On HP-UX 11.00 we have a sequence of nested includes -> -> , and the latter includes , once indirectly -> -> -> and once directly. In both situations 'wint_t' is not yet defined, therefore we cannot provide the function overrides; instead include only the system's . - On IRIX 6.5, similarly, we have an include -> , and the latter includes . But here, we have no way to detect whether is completely included or is still being included. */ #@INCLUDE_NEXT@ @NEXT_WCHAR_H@ #else /* Normal invocation convention. */ #ifndef _GL_WCHAR_H #define _GL_ALREADY_INCLUDING_WCHAR_H /* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #include /* Include the original if it exists. Some builds of uClibc lack it. */ /* The include_next requires a split double-inclusion guard. */ #if @HAVE_WCHAR_H@ # @INCLUDE_NEXT@ @NEXT_WCHAR_H@ #endif #undef _GL_ALREADY_INCLUDING_WCHAR_H #ifndef _GL_WCHAR_H #define _GL_WCHAR_H /* The definition of GL_LINK_WARNING is copied here. */ #ifdef __cplusplus extern "C" { #endif /* Define wint_t. (Also done in wctype.in.h.) */ #if !@HAVE_WINT_T@ && !defined wint_t # define wint_t int # ifndef WEOF # define WEOF -1 # endif #endif /* Override mbstate_t if it is too small. On IRIX 6.5, sizeof (mbstate_t) == 1, which is not sufficient for implementing mbrtowc for encodings like UTF-8. */ #if !(@HAVE_MBSINIT@ && @HAVE_MBRTOWC@) || @REPLACE_MBSTATE_T@ typedef int rpl_mbstate_t; # undef mbstate_t # define mbstate_t rpl_mbstate_t # define GNULIB_defined_mbstate_t 1 #endif /* Convert a single-byte character to a wide character. */ #if @GNULIB_BTOWC@ # if @REPLACE_BTOWC@ # undef btowc # define btowc rpl_btowc # endif # if !@HAVE_BTOWC@ || @REPLACE_BTOWC@ extern wint_t btowc (int c); # endif #elif defined GNULIB_POSIXCHECK # undef btowc # define btowc(c) \ (GL_LINK_WARNING ("btowc is unportable - " \ "use gnulib module btowc for portability"), \ btowc (c)) #endif /* Convert a wide character to a single-byte character. */ #if @GNULIB_WCTOB@ # if @REPLACE_WCTOB@ # undef wctob # define wctob rpl_wctob # endif # if (!defined wctob && !@HAVE_DECL_WCTOB@) || @REPLACE_WCTOB@ /* wctob is provided by gnulib, or wctob exists but is not declared. */ extern int wctob (wint_t wc); # endif #elif defined GNULIB_POSIXCHECK # undef wctob # define wctob(w) \ (GL_LINK_WARNING ("wctob is unportable - " \ "use gnulib module wctob for portability"), \ wctob (w)) #endif /* Test whether *PS is in the initial state. */ #if @GNULIB_MBSINIT@ # if @REPLACE_MBSINIT@ # undef mbsinit # define mbsinit rpl_mbsinit # endif # if !@HAVE_MBSINIT@ || @REPLACE_MBSINIT@ extern int mbsinit (const mbstate_t *ps); # endif #elif defined GNULIB_POSIXCHECK # undef mbsinit # define mbsinit(p) \ (GL_LINK_WARNING ("mbsinit is unportable - " \ "use gnulib module mbsinit for portability"), \ mbsinit (p)) #endif /* Convert a multibyte character to a wide character. */ #if @GNULIB_MBRTOWC@ # if @REPLACE_MBRTOWC@ # undef mbrtowc # define mbrtowc rpl_mbrtowc # endif # if !@HAVE_MBRTOWC@ || @REPLACE_MBRTOWC@ extern size_t mbrtowc (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps); # endif #elif defined GNULIB_POSIXCHECK # undef mbrtowc # define mbrtowc(w,s,n,p) \ (GL_LINK_WARNING ("mbrtowc is unportable - " \ "use gnulib module mbrtowc for portability"), \ mbrtowc (w, s, n, p)) #endif /* Recognize a multibyte character. */ #if @GNULIB_MBRLEN@ # if @REPLACE_MBRLEN@ # undef mbrlen # define mbrlen rpl_mbrlen # endif # if !@HAVE_MBRLEN@ || @REPLACE_MBRLEN@ extern size_t mbrlen (const char *s, size_t n, mbstate_t *ps); # endif #elif defined GNULIB_POSIXCHECK # undef mbrlen # define mbrlen(s,n,p) \ (GL_LINK_WARNING ("mbrlen is unportable - " \ "use gnulib module mbrlen for portability"), \ mbrlen (s, n, p)) #endif /* Convert a string to a wide string. */ #if @GNULIB_MBSRTOWCS@ # if @REPLACE_MBSRTOWCS@ # undef mbsrtowcs # define mbsrtowcs rpl_mbsrtowcs # endif # if !@HAVE_MBSRTOWCS@ || @REPLACE_MBSRTOWCS@ extern size_t mbsrtowcs (wchar_t *dest, const char **srcp, size_t len, mbstate_t *ps); # endif #elif defined GNULIB_POSIXCHECK # undef mbsrtowcs # define mbsrtowcs(d,s,l,p) \ (GL_LINK_WARNING ("mbsrtowcs is unportable - " \ "use gnulib module mbsrtowcs for portability"), \ mbsrtowcs (d, s, l, p)) #endif /* Convert a string to a wide string. */ #if @GNULIB_MBSNRTOWCS@ # if @REPLACE_MBSNRTOWCS@ # undef mbsnrtowcs # define mbsnrtowcs rpl_mbsnrtowcs # endif # if !@HAVE_MBSNRTOWCS@ || @REPLACE_MBSNRTOWCS@ extern size_t mbsnrtowcs (wchar_t *dest, const char **srcp, size_t srclen, size_t len, mbstate_t *ps); # endif #elif defined GNULIB_POSIXCHECK # undef mbsnrtowcs # define mbsnrtowcs(d,s,n,l,p) \ (GL_LINK_WARNING ("mbsnrtowcs is unportable - " \ "use gnulib module mbsnrtowcs for portability"), \ mbsnrtowcs (d, s, n, l, p)) #endif /* Convert a wide character to a multibyte character. */ #if @GNULIB_WCRTOMB@ # if @REPLACE_WCRTOMB@ # undef wcrtomb # define wcrtomb rpl_wcrtomb # endif # if !@HAVE_WCRTOMB@ || @REPLACE_WCRTOMB@ extern size_t wcrtomb (char *s, wchar_t wc, mbstate_t *ps); # endif #elif defined GNULIB_POSIXCHECK # undef wcrtomb # define wcrtomb(s,w,p) \ (GL_LINK_WARNING ("wcrtomb is unportable - " \ "use gnulib module wcrtomb for portability"), \ wcrtomb (s, w, p)) #endif /* Convert a wide string to a string. */ #if @GNULIB_WCSRTOMBS@ # if @REPLACE_WCSRTOMBS@ # undef wcsrtombs # define wcsrtombs rpl_wcsrtombs # endif # if !@HAVE_WCSRTOMBS@ || @REPLACE_WCSRTOMBS@ extern size_t wcsrtombs (char *dest, const wchar_t **srcp, size_t len, mbstate_t *ps); # endif #elif defined GNULIB_POSIXCHECK # undef wcsrtombs # define wcsrtombs(d,s,l,p) \ (GL_LINK_WARNING ("wcsrtombs is unportable - " \ "use gnulib module wcsrtombs for portability"), \ wcsrtombs (d, s, l, p)) #endif /* Convert a wide string to a string. */ #if @GNULIB_WCSNRTOMBS@ # if !@HAVE_WCSNRTOMBS@ extern size_t wcsnrtombs (char *dest, const wchar_t **srcp, size_t srclen, size_t len, mbstate_t *ps); # endif #elif defined GNULIB_POSIXCHECK # undef wcsnrtombs # define wcsnrtombs(d,s,n,l,p) \ (GL_LINK_WARNING ("wcsnrtombs is unportable - " \ "use gnulib module wcsnrtombs for portability"), \ wcsnrtombs (d, s, n, l, p)) #endif /* Return the number of screen columns needed for WC. */ #if @GNULIB_WCWIDTH@ # if @REPLACE_WCWIDTH@ # undef wcwidth # define wcwidth rpl_wcwidth extern int wcwidth (wchar_t); # else # if !defined wcwidth && !@HAVE_DECL_WCWIDTH@ /* wcwidth exists but is not declared. */ extern int wcwidth (int /* actually wchar_t */); # endif # endif #elif defined GNULIB_POSIXCHECK # undef wcwidth # define wcwidth(w) \ (GL_LINK_WARNING ("wcwidth is unportable - " \ "use gnulib module wcwidth for portability"), \ wcwidth (w)) #endif #ifdef __cplusplus } #endif #endif /* _GL_WCHAR_H */ #endif /* _GL_WCHAR_H */ #endif gnuit-4.9.5/lib/sys_time.in.h0000644000175000017500000000277311146671375013004 00000000000000/* Provide a more complete sys/time.h. Copyright (C) 2007-2008 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 3, 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. */ /* Written by Paul Eggert. */ #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif #if defined _GL_SYS_TIME_H /* Simply delegate to the system's header, without adding anything. */ # if @HAVE_SYS_TIME_H@ # @INCLUDE_NEXT@ @NEXT_SYS_TIME_H@ # endif #else # define _GL_SYS_TIME_H # if @HAVE_SYS_TIME_H@ # @INCLUDE_NEXT@ @NEXT_SYS_TIME_H@ # else # include # endif #ifdef __cplusplus extern "C" { #endif # if ! @HAVE_STRUCT_TIMEVAL@ struct timeval { time_t tv_sec; long int tv_usec; }; # endif # if @REPLACE_GETTIMEOFDAY@ # undef gettimeofday # define gettimeofday rpl_gettimeofday int gettimeofday (struct timeval *restrict, void *restrict); # endif #ifdef __cplusplus } #endif #endif /* _GL_SYS_TIME_H */ gnuit-4.9.5/lib/sys_stat.in.h0000644000175000017500000001717511146671375013023 00000000000000/* Provide a more complete sys/stat header file. Copyright (C) 2005-2009 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 3, 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. */ /* Written by Eric Blake, Paul Eggert, and Jim Meyering. */ /* This file is supposed to be used on platforms where is incomplete. It is intended to provide definitions and prototypes needed by an application. Start with what the system provides. */ #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif #if defined __need_system_sys_stat_h /* Special invocation convention. */ #@INCLUDE_NEXT@ @NEXT_SYS_STAT_H@ #else /* Normal invocation convention. */ #ifndef _GL_SYS_STAT_H /* Get nlink_t. */ #include /* The include_next requires a split double-inclusion guard. */ #@INCLUDE_NEXT@ @NEXT_SYS_STAT_H@ #ifndef _GL_SYS_STAT_H #define _GL_SYS_STAT_H /* The definition of GL_LINK_WARNING is copied here. */ /* Before doing "#define mkdir rpl_mkdir" below, we need to include all headers that may declare mkdir(). */ #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ # include #endif #ifndef S_IFMT # define S_IFMT 0170000 #endif #if STAT_MACROS_BROKEN # undef S_ISBLK # undef S_ISCHR # undef S_ISDIR # undef S_ISFIFO # undef S_ISLNK # undef S_ISNAM # undef S_ISMPB # undef S_ISMPC # undef S_ISNWK # undef S_ISREG # undef S_ISSOCK #endif #ifndef S_ISBLK # ifdef S_IFBLK # define S_ISBLK(m) (((m) & S_IFMT) == S_IFBLK) # else # define S_ISBLK(m) 0 # endif #endif #ifndef S_ISCHR # ifdef S_IFCHR # define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR) # else # define S_ISCHR(m) 0 # endif #endif #ifndef S_ISDIR # ifdef S_IFDIR # define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR) # else # define S_ISDIR(m) 0 # endif #endif #ifndef S_ISDOOR /* Solaris 2.5 and up */ # define S_ISDOOR(m) 0 #endif #ifndef S_ISFIFO # ifdef S_IFIFO # define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO) # else # define S_ISFIFO(m) 0 # endif #endif #ifndef S_ISLNK # ifdef S_IFLNK # define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK) # else # define S_ISLNK(m) 0 # endif #endif #ifndef S_ISMPB /* V7 */ # ifdef S_IFMPB # define S_ISMPB(m) (((m) & S_IFMT) == S_IFMPB) # define S_ISMPC(m) (((m) & S_IFMT) == S_IFMPC) # else # define S_ISMPB(m) 0 # define S_ISMPC(m) 0 # endif #endif #ifndef S_ISNAM /* Xenix */ # ifdef S_IFNAM # define S_ISNAM(m) (((m) & S_IFMT) == S_IFNAM) # else # define S_ISNAM(m) 0 # endif #endif #ifndef S_ISNWK /* HP/UX */ # ifdef S_IFNWK # define S_ISNWK(m) (((m) & S_IFMT) == S_IFNWK) # else # define S_ISNWK(m) 0 # endif #endif #ifndef S_ISPORT /* Solaris 10 and up */ # define S_ISPORT(m) 0 #endif #ifndef S_ISREG # ifdef S_IFREG # define S_ISREG(m) (((m) & S_IFMT) == S_IFREG) # else # define S_ISREG(m) 0 # endif #endif #ifndef S_ISSOCK # ifdef S_IFSOCK # define S_ISSOCK(m) (((m) & S_IFMT) == S_IFSOCK) # else # define S_ISSOCK(m) 0 # endif #endif #ifndef S_TYPEISMQ # define S_TYPEISMQ(p) 0 #endif #ifndef S_TYPEISTMO # define S_TYPEISTMO(p) 0 #endif #ifndef S_TYPEISSEM # ifdef S_INSEM # define S_TYPEISSEM(p) (S_ISNAM ((p)->st_mode) && (p)->st_rdev == S_INSEM) # else # define S_TYPEISSEM(p) 0 # endif #endif #ifndef S_TYPEISSHM # ifdef S_INSHD # define S_TYPEISSHM(p) (S_ISNAM ((p)->st_mode) && (p)->st_rdev == S_INSHD) # else # define S_TYPEISSHM(p) 0 # endif #endif /* high performance ("contiguous data") */ #ifndef S_ISCTG # define S_ISCTG(p) 0 #endif /* Cray DMF (data migration facility): off line, with data */ #ifndef S_ISOFD # define S_ISOFD(p) 0 #endif /* Cray DMF (data migration facility): off line, with no data */ #ifndef S_ISOFL # define S_ISOFL(p) 0 #endif /* 4.4BSD whiteout */ #ifndef S_ISWHT # define S_ISWHT(m) 0 #endif /* If any of the following are undefined, define them to their de facto standard values. */ #if !S_ISUID # define S_ISUID 04000 #endif #if !S_ISGID # define S_ISGID 02000 #endif /* S_ISVTX is a common extension to POSIX. */ #ifndef S_ISVTX # define S_ISVTX 01000 #endif #if !S_IRUSR && S_IREAD # define S_IRUSR S_IREAD #endif #if !S_IRUSR # define S_IRUSR 00400 #endif #if !S_IRGRP # define S_IRGRP (S_IRUSR >> 3) #endif #if !S_IROTH # define S_IROTH (S_IRUSR >> 6) #endif #if !S_IWUSR && S_IWRITE # define S_IWUSR S_IWRITE #endif #if !S_IWUSR # define S_IWUSR 00200 #endif #if !S_IWGRP # define S_IWGRP (S_IWUSR >> 3) #endif #if !S_IWOTH # define S_IWOTH (S_IWUSR >> 6) #endif #if !S_IXUSR && S_IEXEC # define S_IXUSR S_IEXEC #endif #if !S_IXUSR # define S_IXUSR 00100 #endif #if !S_IXGRP # define S_IXGRP (S_IXUSR >> 3) #endif #if !S_IXOTH # define S_IXOTH (S_IXUSR >> 6) #endif #if !S_IRWXU # define S_IRWXU (S_IRUSR | S_IWUSR | S_IXUSR) #endif #if !S_IRWXG # define S_IRWXG (S_IRGRP | S_IWGRP | S_IXGRP) #endif #if !S_IRWXO # define S_IRWXO (S_IROTH | S_IWOTH | S_IXOTH) #endif /* S_IXUGO is a common extension to POSIX. */ #if !S_IXUGO # define S_IXUGO (S_IXUSR | S_IXGRP | S_IXOTH) #endif #ifndef S_IRWXUGO # define S_IRWXUGO (S_IRWXU | S_IRWXG | S_IRWXO) #endif #ifdef __cplusplus extern "C" { #endif #if @GNULIB_LSTAT@ # if ! @HAVE_LSTAT@ /* mingw does not support symlinks, therefore it does not have lstat. But without links, stat does just fine. */ # define lstat stat # elif @REPLACE_LSTAT@ # undef lstat # define lstat rpl_lstat extern int rpl_lstat (const char *name, struct stat *buf); # endif #elif defined GNULIB_POSIXCHECK # undef lstat # define lstat(p,b) \ (GL_LINK_WARNING ("lstat is unportable - " \ "use gnulib module lstat for portability"), \ lstat (p, b)) #endif #if @REPLACE_MKDIR@ # undef mkdir # define mkdir rpl_mkdir extern int mkdir (char const *name, mode_t mode); #else /* mingw's _mkdir() function has 1 argument, but we pass 2 arguments. Additionally, it declares _mkdir (and depending on compile flags, an alias mkdir), only in the nonstandard , which is included above. */ # if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ static inline int rpl_mkdir (char const *name, mode_t mode) { return _mkdir (name); } # define mkdir rpl_mkdir # endif #endif /* Declare BSD extensions. */ #if @GNULIB_LCHMOD@ /* Change the mode of FILENAME to MODE, without dereferencing it if FILENAME denotes a symbolic link. */ # if !@HAVE_LCHMOD@ /* The lchmod replacement follows symbolic links. Callers should take this into account; lchmod should be applied only to arguments that are known to not be symbolic links. On hosts that lack lchmod, this can lead to race conditions between the check and the invocation of lchmod, but we know of no workarounds that are reliable in general. You might try requesting support for lchmod from your operating system supplier. */ # define lchmod chmod # endif # if 0 /* assume already declared */ extern int lchmod (const char *filename, mode_t mode); # endif #elif defined GNULIB_POSIXCHECK # undef lchmod # define lchmod(f,m) \ (GL_LINK_WARNING ("lchmod is unportable - " \ "use gnulib module lchmod for portability"), \ lchmod (f, m)) #endif #ifdef __cplusplus } #endif #endif /* _GL_SYS_STAT_H */ #endif /* _GL_SYS_STAT_H */ #endif gnuit-4.9.5/lib/open.c0000644000175000017500000001040611146671375011467 00000000000000/* Open a descriptor to a file. Copyright (C) 2007-2008 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 3 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, see . */ /* Written by Bruno Haible , 2007. */ #include /* Get the original definition of open. It might be defined as a macro. */ #define __need_system_fcntl_h #include #undef __need_system_fcntl_h #include static inline int orig_open (const char *filename, int flags, mode_t mode) { return open (filename, flags, mode); } /* Specification. */ #include #include #include #include #include #include int open (const char *filename, int flags, ...) { mode_t mode; int fd; mode = 0; if (flags & O_CREAT) { va_list arg; va_start (arg, flags); /* If mode_t is narrower than int, use the promoted type (int), not mode_t. Use sizeof to guess whether mode_t is narrower; we don't know of any practical counterexamples. */ mode = (sizeof (mode_t) < sizeof (int) ? va_arg (arg, int) : va_arg (arg, mode_t)); va_end (arg); } #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ if (strcmp (filename, "/dev/null") == 0) filename = "NUL"; #endif #if OPEN_TRAILING_SLASH_BUG /* If the filename ends in a slash and one of O_CREAT, O_WRONLY, O_RDWR is specified, then fail. Rationale: POSIX says that "A pathname that contains at least one non-slash character and that ends with one or more trailing slashes shall be resolved as if a single dot character ( '.' ) were appended to the pathname." and "The special filename dot shall refer to the directory specified by its predecessor." If the named file already exists as a directory, then - if O_CREAT is specified, open() must fail because of the semantics of O_CREAT, - if O_WRONLY or O_RDWR is specified, open() must fail because POSIX says that it fails with errno = EISDIR in this case. If the named file does not exist or does not name a directory, then - if O_CREAT is specified, open() must fail since open() cannot create directories, - if O_WRONLY or O_RDWR is specified, open() must fail because the file does not contain a '.' directory. */ if (flags & (O_CREAT | O_WRONLY | O_RDWR)) { size_t len = strlen (filename); if (len > 0 && filename[len - 1] == '/') { errno = EISDIR; return -1; } } #endif fd = orig_open (filename, flags, mode); #if OPEN_TRAILING_SLASH_BUG /* If the filename ends in a slash and fd does not refer to a directory, then fail. Rationale: POSIX says that "A pathname that contains at least one non-slash character and that ends with one or more trailing slashes shall be resolved as if a single dot character ( '.' ) were appended to the pathname." and "The special filename dot shall refer to the directory specified by its predecessor." If the named file without the slash is not a directory, open() must fail with ENOTDIR. */ if (fd >= 0) { size_t len = strlen (filename); if (len > 0 && filename[len - 1] == '/') { struct stat statbuf; if (fstat (fd, &statbuf) >= 0 && !S_ISDIR (statbuf.st_mode)) { close (fd); errno = ENOTDIR; return -1; } } } #endif #ifdef FCHDIR_REPLACEMENT if (fd >= 0) _gl_register_fd (fd, filename); #endif return fd; } gnuit-4.9.5/lib/stdint.in.h0000644000175000017500000004026511146671375012453 00000000000000/* Copyright (C) 2001-2002, 2004-2009 Free Software Foundation, Inc. Written by Paul Eggert, Bruno Haible, Sam Steingold, Peter Burwood. This file is part of gnulib. 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 3, 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. */ /* * ISO C 99 for platforms that lack it. * */ #ifndef _GL_STDINT_H /* When including a system file that in turn includes , use the system , not our substitute. This avoids problems with (for example) VMS, whose includes . */ #define _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H /* Get those types that are already defined in other system include files, so that we can "#define int8_t signed char" below without worrying about a later system include file containing a "typedef signed char int8_t;" that will get messed up by our macro. Our macros should all be consistent with the system versions, except for the "fast" types and macros, which we recommend against using in public interfaces due to compiler differences. */ #if @HAVE_STDINT_H@ # if defined __sgi && ! defined __c99 /* Bypass IRIX's if in C89 mode, since it merely annoys users with "This header file is to be used only for c99 mode compilations" diagnostics. */ # define __STDINT_H__ # endif /* Other systems may have an incomplete or buggy . Include it before , since any "#include " in would reinclude us, skipping our contents because _GL_STDINT_H is defined. The include_next requires a split double-inclusion guard. */ # if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ # endif # @INCLUDE_NEXT@ @NEXT_STDINT_H@ #endif #if ! defined _GL_STDINT_H && ! defined _GL_JUST_INCLUDE_SYSTEM_STDINT_H #define _GL_STDINT_H /* defines some of the stdint.h types as well, on glibc, IRIX 6.5, and OpenBSD 3.8 (via ). AIX 5.2 isn't needed and causes troubles. MacOS X 10.4.6 includes (which is us), but relies on the system definitions, so include after @NEXT_STDINT_H@. */ #if @HAVE_SYS_TYPES_H@ && ! defined _AIX # include #endif /* Get LONG_MIN, LONG_MAX, ULONG_MAX. */ #include #if @HAVE_INTTYPES_H@ /* In OpenBSD 3.8, includes , which defines int{8,16,32,64}_t, uint{8,16,32,64}_t and __BIT_TYPES_DEFINED__. also defines intptr_t and uintptr_t. */ # include #elif @HAVE_SYS_INTTYPES_H@ /* Solaris 7 has the types except the *_fast*_t types, and the macros except for *_FAST*_*, INTPTR_MIN, PTRDIFF_MIN, PTRDIFF_MAX. */ # include #endif #if @HAVE_SYS_BITYPES_H@ && ! defined __BIT_TYPES_DEFINED__ /* Linux libc4 >= 4.6.7 and libc5 have a that defines int{8,16,32,64}_t and __BIT_TYPES_DEFINED__. In libc5 >= 5.2.2 it is included by . */ # include #endif #undef _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H /* Minimum and maximum values for a integer type under the usual assumption. Return an unspecified value if BITS == 0, adding a check to pacify picky compilers. */ #define _STDINT_MIN(signed, bits, zero) \ ((signed) ? (- ((zero) + 1) << ((bits) ? (bits) - 1 : 0)) : (zero)) #define _STDINT_MAX(signed, bits, zero) \ ((signed) \ ? ~ _STDINT_MIN (signed, bits, zero) \ : /* The expression for the unsigned case. The subtraction of (signed) \ is a nop in the unsigned case and avoids "signed integer overflow" \ warnings in the signed case. */ \ ((((zero) + 1) << ((bits) ? (bits) - 1 - (signed) : 0)) - 1) * 2 + 1) /* 7.18.1.1. Exact-width integer types */ /* Here we assume a standard architecture where the hardware integer types have 8, 16, 32, optionally 64 bits. */ #undef int8_t #undef uint8_t typedef signed char gl_int8_t; typedef unsigned char gl_uint8_t; #define int8_t gl_int8_t #define uint8_t gl_uint8_t #undef int16_t #undef uint16_t typedef short int gl_int16_t; typedef unsigned short int gl_uint16_t; #define int16_t gl_int16_t #define uint16_t gl_uint16_t #undef int32_t #undef uint32_t typedef int gl_int32_t; typedef unsigned int gl_uint32_t; #define int32_t gl_int32_t #define uint32_t gl_uint32_t /* Do not undefine int64_t if gnulib is not being used with 64-bit types, since otherwise it breaks platforms like Tandem/NSK. */ #if LONG_MAX >> 31 >> 31 == 1 # undef int64_t typedef long int gl_int64_t; # define int64_t gl_int64_t # define GL_INT64_T #elif defined _MSC_VER # undef int64_t typedef __int64 gl_int64_t; # define int64_t gl_int64_t # define GL_INT64_T #elif @HAVE_LONG_LONG_INT@ # undef int64_t typedef long long int gl_int64_t; # define int64_t gl_int64_t # define GL_INT64_T #endif #if ULONG_MAX >> 31 >> 31 >> 1 == 1 # undef uint64_t typedef unsigned long int gl_uint64_t; # define uint64_t gl_uint64_t # define GL_UINT64_T #elif defined _MSC_VER # undef uint64_t typedef unsigned __int64 gl_uint64_t; # define uint64_t gl_uint64_t # define GL_UINT64_T #elif @HAVE_UNSIGNED_LONG_LONG_INT@ # undef uint64_t typedef unsigned long long int gl_uint64_t; # define uint64_t gl_uint64_t # define GL_UINT64_T #endif /* Avoid collision with Solaris 2.5.1 etc. */ #define _UINT8_T #define _UINT32_T #define _UINT64_T /* 7.18.1.2. Minimum-width integer types */ /* Here we assume a standard architecture where the hardware integer types have 8, 16, 32, optionally 64 bits. Therefore the leastN_t types are the same as the corresponding N_t types. */ #undef int_least8_t #undef uint_least8_t #undef int_least16_t #undef uint_least16_t #undef int_least32_t #undef uint_least32_t #undef int_least64_t #undef uint_least64_t #define int_least8_t int8_t #define uint_least8_t uint8_t #define int_least16_t int16_t #define uint_least16_t uint16_t #define int_least32_t int32_t #define uint_least32_t uint32_t #ifdef GL_INT64_T # define int_least64_t int64_t #endif #ifdef GL_UINT64_T # define uint_least64_t uint64_t #endif /* 7.18.1.3. Fastest minimum-width integer types */ /* Note: Other substitutes may define these types differently. It is not recommended to use these types in public header files. */ /* Here we assume a standard architecture where the hardware integer types have 8, 16, 32, optionally 64 bits. Therefore the fastN_t types are taken from the same list of types. Assume that 'long int' is fast enough for all narrower integers. */ #undef int_fast8_t #undef uint_fast8_t #undef int_fast16_t #undef uint_fast16_t #undef int_fast32_t #undef uint_fast32_t #undef int_fast64_t #undef uint_fast64_t typedef long int gl_int_fast8_t; typedef unsigned long int gl_uint_fast8_t; typedef long int gl_int_fast16_t; typedef unsigned long int gl_uint_fast16_t; typedef long int gl_int_fast32_t; typedef unsigned long int gl_uint_fast32_t; #define int_fast8_t gl_int_fast8_t #define uint_fast8_t gl_uint_fast8_t #define int_fast16_t gl_int_fast16_t #define uint_fast16_t gl_uint_fast16_t #define int_fast32_t gl_int_fast32_t #define uint_fast32_t gl_uint_fast32_t #ifdef GL_INT64_T # define int_fast64_t int64_t #endif #ifdef GL_UINT64_T # define uint_fast64_t uint64_t #endif /* 7.18.1.4. Integer types capable of holding object pointers */ #undef intptr_t #undef uintptr_t typedef long int gl_intptr_t; typedef unsigned long int gl_uintptr_t; #define intptr_t gl_intptr_t #define uintptr_t gl_uintptr_t /* 7.18.1.5. Greatest-width integer types */ /* Note: These types are compiler dependent. It may be unwise to use them in public header files. */ #undef intmax_t #if @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1 typedef long long int gl_intmax_t; # define intmax_t gl_intmax_t #elif defined GL_INT64_T # define intmax_t int64_t #else typedef long int gl_intmax_t; # define intmax_t gl_intmax_t #endif #undef uintmax_t #if @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1 typedef unsigned long long int gl_uintmax_t; # define uintmax_t gl_uintmax_t #elif defined GL_UINT64_T # define uintmax_t uint64_t #else typedef unsigned long int gl_uintmax_t; # define uintmax_t gl_uintmax_t #endif /* Verify that intmax_t and uintmax_t have the same size. Too much code breaks if this is not the case. If this check fails, the reason is likely to be found in the autoconf macros. */ typedef int _verify_intmax_size[2 * (sizeof (intmax_t) == sizeof (uintmax_t)) - 1]; /* 7.18.2. Limits of specified-width integer types */ #if ! defined __cplusplus || defined __STDC_LIMIT_MACROS /* 7.18.2.1. Limits of exact-width integer types */ /* Here we assume a standard architecture where the hardware integer types have 8, 16, 32, optionally 64 bits. */ #undef INT8_MIN #undef INT8_MAX #undef UINT8_MAX #define INT8_MIN (~ INT8_MAX) #define INT8_MAX 127 #define UINT8_MAX 255 #undef INT16_MIN #undef INT16_MAX #undef UINT16_MAX #define INT16_MIN (~ INT16_MAX) #define INT16_MAX 32767 #define UINT16_MAX 65535 #undef INT32_MIN #undef INT32_MAX #undef UINT32_MAX #define INT32_MIN (~ INT32_MAX) #define INT32_MAX 2147483647 #define UINT32_MAX 4294967295U #undef INT64_MIN #undef INT64_MAX #ifdef GL_INT64_T /* Prefer (- INTMAX_C (1) << 63) over (~ INT64_MAX) because SunPRO C 5.0 evaluates the latter incorrectly in preprocessor expressions. */ # define INT64_MIN (- INTMAX_C (1) << 63) # define INT64_MAX INTMAX_C (9223372036854775807) #endif #undef UINT64_MAX #ifdef GL_UINT64_T # define UINT64_MAX UINTMAX_C (18446744073709551615) #endif /* 7.18.2.2. Limits of minimum-width integer types */ /* Here we assume a standard architecture where the hardware integer types have 8, 16, 32, optionally 64 bits. Therefore the leastN_t types are the same as the corresponding N_t types. */ #undef INT_LEAST8_MIN #undef INT_LEAST8_MAX #undef UINT_LEAST8_MAX #define INT_LEAST8_MIN INT8_MIN #define INT_LEAST8_MAX INT8_MAX #define UINT_LEAST8_MAX UINT8_MAX #undef INT_LEAST16_MIN #undef INT_LEAST16_MAX #undef UINT_LEAST16_MAX #define INT_LEAST16_MIN INT16_MIN #define INT_LEAST16_MAX INT16_MAX #define UINT_LEAST16_MAX UINT16_MAX #undef INT_LEAST32_MIN #undef INT_LEAST32_MAX #undef UINT_LEAST32_MAX #define INT_LEAST32_MIN INT32_MIN #define INT_LEAST32_MAX INT32_MAX #define UINT_LEAST32_MAX UINT32_MAX #undef INT_LEAST64_MIN #undef INT_LEAST64_MAX #ifdef GL_INT64_T # define INT_LEAST64_MIN INT64_MIN # define INT_LEAST64_MAX INT64_MAX #endif #undef UINT_LEAST64_MAX #ifdef GL_UINT64_T # define UINT_LEAST64_MAX UINT64_MAX #endif /* 7.18.2.3. Limits of fastest minimum-width integer types */ /* Here we assume a standard architecture where the hardware integer types have 8, 16, 32, optionally 64 bits. Therefore the fastN_t types are taken from the same list of types. */ #undef INT_FAST8_MIN #undef INT_FAST8_MAX #undef UINT_FAST8_MAX #define INT_FAST8_MIN LONG_MIN #define INT_FAST8_MAX LONG_MAX #define UINT_FAST8_MAX ULONG_MAX #undef INT_FAST16_MIN #undef INT_FAST16_MAX #undef UINT_FAST16_MAX #define INT_FAST16_MIN LONG_MIN #define INT_FAST16_MAX LONG_MAX #define UINT_FAST16_MAX ULONG_MAX #undef INT_FAST32_MIN #undef INT_FAST32_MAX #undef UINT_FAST32_MAX #define INT_FAST32_MIN LONG_MIN #define INT_FAST32_MAX LONG_MAX #define UINT_FAST32_MAX ULONG_MAX #undef INT_FAST64_MIN #undef INT_FAST64_MAX #ifdef GL_INT64_T # define INT_FAST64_MIN INT64_MIN # define INT_FAST64_MAX INT64_MAX #endif #undef UINT_FAST64_MAX #ifdef GL_UINT64_T # define UINT_FAST64_MAX UINT64_MAX #endif /* 7.18.2.4. Limits of integer types capable of holding object pointers */ #undef INTPTR_MIN #undef INTPTR_MAX #undef UINTPTR_MAX #define INTPTR_MIN LONG_MIN #define INTPTR_MAX LONG_MAX #define UINTPTR_MAX ULONG_MAX /* 7.18.2.5. Limits of greatest-width integer types */ #undef INTMAX_MIN #undef INTMAX_MAX #ifdef INT64_MAX # define INTMAX_MIN INT64_MIN # define INTMAX_MAX INT64_MAX #else # define INTMAX_MIN INT32_MIN # define INTMAX_MAX INT32_MAX #endif #undef UINTMAX_MAX #ifdef UINT64_MAX # define UINTMAX_MAX UINT64_MAX #else # define UINTMAX_MAX UINT32_MAX #endif /* 7.18.3. Limits of other integer types */ /* ptrdiff_t limits */ #undef PTRDIFF_MIN #undef PTRDIFF_MAX #if @APPLE_UNIVERSAL_BUILD@ # if _LP64 # define PTRDIFF_MIN _STDINT_MIN (1, 64, 0l) # define PTRDIFF_MAX _STDINT_MAX (1, 64, 0l) # else # define PTRDIFF_MIN _STDINT_MIN (1, 32, 0) # define PTRDIFF_MAX _STDINT_MAX (1, 32, 0) # endif #else # define PTRDIFF_MIN \ _STDINT_MIN (1, @BITSIZEOF_PTRDIFF_T@, 0@PTRDIFF_T_SUFFIX@) # define PTRDIFF_MAX \ _STDINT_MAX (1, @BITSIZEOF_PTRDIFF_T@, 0@PTRDIFF_T_SUFFIX@) #endif /* sig_atomic_t limits */ #undef SIG_ATOMIC_MIN #undef SIG_ATOMIC_MAX #define SIG_ATOMIC_MIN \ _STDINT_MIN (@HAVE_SIGNED_SIG_ATOMIC_T@, @BITSIZEOF_SIG_ATOMIC_T@, \ 0@SIG_ATOMIC_T_SUFFIX@) #define SIG_ATOMIC_MAX \ _STDINT_MAX (@HAVE_SIGNED_SIG_ATOMIC_T@, @BITSIZEOF_SIG_ATOMIC_T@, \ 0@SIG_ATOMIC_T_SUFFIX@) /* size_t limit */ #undef SIZE_MAX #if @APPLE_UNIVERSAL_BUILD@ # if _LP64 # define SIZE_MAX _STDINT_MAX (0, 64, 0ul) # else # define SIZE_MAX _STDINT_MAX (0, 32, 0ul) # endif #else # define SIZE_MAX _STDINT_MAX (0, @BITSIZEOF_SIZE_T@, 0@SIZE_T_SUFFIX@) #endif /* wchar_t limits */ /* Get WCHAR_MIN, WCHAR_MAX. This include is not on the top, above, because on OSF/1 4.0 we have a sequence of nested includes -> -> -> , and the latter includes and assumes its types are already defined. */ #if ! (defined WCHAR_MIN && defined WCHAR_MAX) # define _GL_JUST_INCLUDE_SYSTEM_WCHAR_H # include # undef _GL_JUST_INCLUDE_SYSTEM_WCHAR_H #endif #undef WCHAR_MIN #undef WCHAR_MAX #define WCHAR_MIN \ _STDINT_MIN (@HAVE_SIGNED_WCHAR_T@, @BITSIZEOF_WCHAR_T@, 0@WCHAR_T_SUFFIX@) #define WCHAR_MAX \ _STDINT_MAX (@HAVE_SIGNED_WCHAR_T@, @BITSIZEOF_WCHAR_T@, 0@WCHAR_T_SUFFIX@) /* wint_t limits */ #undef WINT_MIN #undef WINT_MAX #define WINT_MIN \ _STDINT_MIN (@HAVE_SIGNED_WINT_T@, @BITSIZEOF_WINT_T@, 0@WINT_T_SUFFIX@) #define WINT_MAX \ _STDINT_MAX (@HAVE_SIGNED_WINT_T@, @BITSIZEOF_WINT_T@, 0@WINT_T_SUFFIX@) #endif /* !defined __cplusplus || defined __STDC_LIMIT_MACROS */ /* 7.18.4. Macros for integer constants */ #if ! defined __cplusplus || defined __STDC_CONSTANT_MACROS /* 7.18.4.1. Macros for minimum-width integer constants */ /* According to ISO C 99 Technical Corrigendum 1 */ /* Here we assume a standard architecture where the hardware integer types have 8, 16, 32, optionally 64 bits, and int is 32 bits. */ #undef INT8_C #undef UINT8_C #define INT8_C(x) x #define UINT8_C(x) x #undef INT16_C #undef UINT16_C #define INT16_C(x) x #define UINT16_C(x) x #undef INT32_C #undef UINT32_C #define INT32_C(x) x #define UINT32_C(x) x ## U #undef INT64_C #undef UINT64_C #if LONG_MAX >> 31 >> 31 == 1 # define INT64_C(x) x##L #elif defined _MSC_VER # define INT64_C(x) x##i64 #elif @HAVE_LONG_LONG_INT@ # define INT64_C(x) x##LL #endif #if ULONG_MAX >> 31 >> 31 >> 1 == 1 # define UINT64_C(x) x##UL #elif defined _MSC_VER # define UINT64_C(x) x##ui64 #elif @HAVE_UNSIGNED_LONG_LONG_INT@ # define UINT64_C(x) x##ULL #endif /* 7.18.4.2. Macros for greatest-width integer constants */ #undef INTMAX_C #if @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1 # define INTMAX_C(x) x##LL #elif defined GL_INT64_T # define INTMAX_C(x) INT64_C(x) #else # define INTMAX_C(x) x##L #endif #undef UINTMAX_C #if @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1 # define UINTMAX_C(x) x##ULL #elif defined GL_UINT64_T # define UINTMAX_C(x) UINT64_C(x) #else # define UINTMAX_C(x) x##UL #endif #endif /* !defined __cplusplus || defined __STDC_CONSTANT_MACROS */ #endif /* _GL_STDINT_H */ #endif /* !defined _GL_STDINT_H && !defined _GL_JUST_INCLUDE_SYSTEM_STDINT_H */ gnuit-4.9.5/lib/quotearg.c0000644000175000017500000005262711146671375012370 00000000000000/* quotearg.c - quote arguments for output Copyright (C) 1998, 1999, 2000, 2001, 2002, 2004, 2005, 2006, 2007, 2008 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 3 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, see . */ /* Written by Paul Eggert */ #include #include "quotearg.h" #include "xalloc.h" #include #include #include #include #include #include #include #include #include "gettext.h" #define _(msgid) gettext (msgid) #define N_(msgid) msgid #ifndef SIZE_MAX # define SIZE_MAX ((size_t) -1) #endif #define INT_BITS (sizeof (int) * CHAR_BIT) struct quoting_options { /* Basic quoting style. */ enum quoting_style style; /* Additional flags. Bitwise combination of enum quoting_flags. */ int flags; /* Quote the characters indicated by this bit vector even if the quoting style would not normally require them to be quoted. */ unsigned int quote_these_too[(UCHAR_MAX / INT_BITS) + 1]; }; /* Names of quoting styles. */ char const *const quoting_style_args[] = { "literal", "shell", "shell-always", "c", "c-maybe", "escape", "locale", "clocale", 0 }; /* Correspondences to quoting style names. */ enum quoting_style const quoting_style_vals[] = { literal_quoting_style, shell_quoting_style, shell_always_quoting_style, c_quoting_style, c_maybe_quoting_style, escape_quoting_style, locale_quoting_style, clocale_quoting_style }; /* The default quoting options. */ static struct quoting_options default_quoting_options; /* Allocate a new set of quoting options, with contents initially identical to O if O is not null, or to the default if O is null. It is the caller's responsibility to free the result. */ struct quoting_options * clone_quoting_options (struct quoting_options *o) { int e = errno; struct quoting_options *p = xmemdup (o ? o : &default_quoting_options, sizeof *o); errno = e; return p; } /* Get the value of O's quoting style. If O is null, use the default. */ enum quoting_style get_quoting_style (struct quoting_options *o) { return (o ? o : &default_quoting_options)->style; } /* In O (or in the default if O is null), set the value of the quoting style to S. */ void set_quoting_style (struct quoting_options *o, enum quoting_style s) { (o ? o : &default_quoting_options)->style = s; } /* In O (or in the default if O is null), set the value of the quoting options for character C to I. Return the old value. Currently, the only values defined for I are 0 (the default) and 1 (which means to quote the character even if it would not otherwise be quoted). */ int set_char_quoting (struct quoting_options *o, char c, int i) { unsigned char uc = c; unsigned int *p = (o ? o : &default_quoting_options)->quote_these_too + uc / INT_BITS; int shift = uc % INT_BITS; int r = (*p >> shift) & 1; *p ^= ((i & 1) ^ r) << shift; return r; } /* In O (or in the default if O is null), set the value of the quoting options flag to I, which can be a bitwise combination of enum quoting_flags, or 0 for default behavior. Return the old value. */ int set_quoting_flags (struct quoting_options *o, int i) { int r; if (!o) o = &default_quoting_options; r = o->flags; o->flags = i; return r; } /* Return quoting options for STYLE, with no extra quoting. */ static struct quoting_options quoting_options_from_style (enum quoting_style style) { struct quoting_options o; o.style = style; o.flags = 0; memset (o.quote_these_too, 0, sizeof o.quote_these_too); return o; } /* MSGID approximates a quotation mark. Return its translation if it has one; otherwise, return either it or "\"", depending on S. */ static char const * gettext_quote (char const *msgid, enum quoting_style s) { char const *translation = _(msgid); if (translation == msgid && s == clocale_quoting_style) translation = "\""; return translation; } /* Place into buffer BUFFER (of size BUFFERSIZE) a quoted version of argument ARG (of size ARGSIZE), using QUOTING_STYLE, FLAGS, and QUOTE_THESE_TOO to control quoting. Terminate the output with a null character, and return the written size of the output, not counting the terminating null. If BUFFERSIZE is too small to store the output string, return the value that would have been returned had BUFFERSIZE been large enough. If ARGSIZE is SIZE_MAX, use the string length of the argument for ARGSIZE. This function acts like quotearg_buffer (BUFFER, BUFFERSIZE, ARG, ARGSIZE, O), except it breaks O into its component pieces and is not careful about errno. */ static size_t quotearg_buffer_restyled (char *buffer, size_t buffersize, char const *arg, size_t argsize, enum quoting_style quoting_style, int flags, unsigned int const *quote_these_too) { size_t i; size_t len = 0; char const *quote_string = 0; size_t quote_string_len = 0; bool backslash_escapes = false; bool unibyte_locale = MB_CUR_MAX == 1; bool elide_outer_quotes = (flags & QA_ELIDE_OUTER_QUOTES) != 0; #define STORE(c) \ do \ { \ if (len < buffersize) \ buffer[len] = (c); \ len++; \ } \ while (0) switch (quoting_style) { case c_maybe_quoting_style: quoting_style = c_quoting_style; elide_outer_quotes = true; /* Fall through. */ case c_quoting_style: if (!elide_outer_quotes) STORE ('"'); backslash_escapes = true; quote_string = "\""; quote_string_len = 1; break; case escape_quoting_style: backslash_escapes = true; elide_outer_quotes = false; break; case locale_quoting_style: case clocale_quoting_style: { /* TRANSLATORS: Get translations for open and closing quotation marks. The message catalog should translate "`" to a left quotation mark suitable for the locale, and similarly for "'". If the catalog has no translation, locale_quoting_style quotes `like this', and clocale_quoting_style quotes "like this". For example, an American English Unicode locale should translate "`" to U+201C (LEFT DOUBLE QUOTATION MARK), and should translate "'" to U+201D (RIGHT DOUBLE QUOTATION MARK). A British English Unicode locale should instead translate these to U+2018 (LEFT SINGLE QUOTATION MARK) and U+2019 (RIGHT SINGLE QUOTATION MARK), respectively. If you don't know what to put here, please see and use glyphs suitable for your language. */ char const *left = gettext_quote (N_("`"), quoting_style); char const *right = gettext_quote (N_("'"), quoting_style); if (!elide_outer_quotes) for (quote_string = left; *quote_string; quote_string++) STORE (*quote_string); backslash_escapes = true; quote_string = right; quote_string_len = strlen (quote_string); } break; case shell_quoting_style: quoting_style = shell_always_quoting_style; elide_outer_quotes = true; /* Fall through. */ case shell_always_quoting_style: if (!elide_outer_quotes) STORE ('\''); quote_string = "'"; quote_string_len = 1; break; case literal_quoting_style: elide_outer_quotes = false; break; default: abort (); } for (i = 0; ! (argsize == SIZE_MAX ? arg[i] == '\0' : i == argsize); i++) { unsigned char c; unsigned char esc; if (backslash_escapes && quote_string_len && i + quote_string_len <= argsize && memcmp (arg + i, quote_string, quote_string_len) == 0) { if (elide_outer_quotes) goto force_outer_quoting_style; STORE ('\\'); } c = arg[i]; switch (c) { case '\0': if (backslash_escapes) { if (elide_outer_quotes) goto force_outer_quoting_style; STORE ('\\'); if (i + 1 < argsize && '0' <= arg[i + 1] && arg[i + 1] <= '9') { STORE ('0'); STORE ('0'); } c = '0'; } else if (flags & QA_ELIDE_NULL_BYTES) continue; break; case '?': switch (quoting_style) { case shell_always_quoting_style: if (elide_outer_quotes) goto force_outer_quoting_style; break; case c_quoting_style: if ((flags & QA_SPLIT_TRIGRAPHS) && i + 2 < argsize && arg[i + 1] == '?') switch (arg[i + 2]) { case '!': case '\'': case '(': case ')': case '-': case '/': case '<': case '=': case '>': /* Escape the second '?' in what would otherwise be a trigraph. */ if (elide_outer_quotes) goto force_outer_quoting_style; c = arg[i + 2]; i += 2; STORE ('?'); STORE ('"'); STORE ('"'); STORE ('?'); break; default: break; } break; default: break; } break; case '\a': esc = 'a'; goto c_escape; case '\b': esc = 'b'; goto c_escape; case '\f': esc = 'f'; goto c_escape; case '\n': esc = 'n'; goto c_and_shell_escape; case '\r': esc = 'r'; goto c_and_shell_escape; case '\t': esc = 't'; goto c_and_shell_escape; case '\v': esc = 'v'; goto c_escape; case '\\': esc = c; /* No need to escape the escape if we are trying to elide outer quotes and nothing else is problematic. */ if (backslash_escapes && elide_outer_quotes && quote_string_len) goto store_c; c_and_shell_escape: if (quoting_style == shell_always_quoting_style && elide_outer_quotes) goto force_outer_quoting_style; /* Fall through. */ c_escape: if (backslash_escapes) { c = esc; goto store_escape; } break; case '{': case '}': /* sometimes special if isolated */ if (! (argsize == SIZE_MAX ? arg[1] == '\0' : argsize == 1)) break; /* Fall through. */ case '#': case '~': if (i != 0) break; /* Fall through. */ case ' ': case '!': /* special in bash */ case '"': case '$': case '&': case '(': case ')': case '*': case ';': case '<': case '=': /* sometimes special in 0th or (with "set -k") later args */ case '>': case '[': case '^': /* special in old /bin/sh, e.g. SunOS 4.1.4 */ case '`': case '|': /* A shell special character. In theory, '$' and '`' could be the first bytes of multibyte characters, which means we should check them with mbrtowc, but in practice this doesn't happen so it's not worth worrying about. */ if (quoting_style == shell_always_quoting_style && elide_outer_quotes) goto force_outer_quoting_style; break; case '\'': if (quoting_style == shell_always_quoting_style) { if (elide_outer_quotes) goto force_outer_quoting_style; STORE ('\''); STORE ('\\'); STORE ('\''); } break; case '%': case '+': case ',': case '-': case '.': case '/': case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': case ':': case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': case 'G': case 'H': case 'I': case 'J': case 'K': case 'L': case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R': case 'S': case 'T': case 'U': case 'V': case 'W': case 'X': case 'Y': case 'Z': case ']': case '_': case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': case 'g': case 'h': case 'i': case 'j': case 'k': case 'l': case 'm': case 'n': case 'o': case 'p': case 'q': case 'r': case 's': case 't': case 'u': case 'v': case 'w': case 'x': case 'y': case 'z': /* These characters don't cause problems, no matter what the quoting style is. They cannot start multibyte sequences. */ break; default: /* If we have a multibyte sequence, copy it until we reach its end, find an error, or come back to the initial shift state. For C-like styles, if the sequence has unprintable characters, escape the whole sequence, since we can't easily escape single characters within it. */ { /* Length of multibyte sequence found so far. */ size_t m; bool printable; if (unibyte_locale) { m = 1; printable = isprint (c) != 0; } else { mbstate_t mbstate; memset (&mbstate, 0, sizeof mbstate); m = 0; printable = true; if (argsize == SIZE_MAX) argsize = strlen (arg); do { wchar_t w; size_t bytes = mbrtowc (&w, &arg[i + m], argsize - (i + m), &mbstate); if (bytes == 0) break; else if (bytes == (size_t) -1) { printable = false; break; } else if (bytes == (size_t) -2) { printable = false; while (i + m < argsize && arg[i + m]) m++; break; } else { /* Work around a bug with older shells that "see" a '\' that is really the 2nd byte of a multibyte character. In practice the problem is limited to ASCII chars >= '@' that are shell special chars. */ if ('[' == 0x5b && elide_outer_quotes && quoting_style == shell_always_quoting_style) { size_t j; for (j = 1; j < bytes; j++) switch (arg[i + m + j]) { case '[': case '\\': case '^': case '`': case '|': goto force_outer_quoting_style; default: break; } } if (! iswprint (w)) printable = false; m += bytes; } } while (! mbsinit (&mbstate)); } if (1 < m || (backslash_escapes && ! printable)) { /* Output a multibyte sequence, or an escaped unprintable unibyte character. */ size_t ilim = i + m; for (;;) { if (backslash_escapes && ! printable) { if (elide_outer_quotes) goto force_outer_quoting_style; STORE ('\\'); STORE ('0' + (c >> 6)); STORE ('0' + ((c >> 3) & 7)); c = '0' + (c & 7); } if (ilim <= i + 1) break; STORE (c); c = arg[++i]; } goto store_c; } } } if (! ((backslash_escapes || elide_outer_quotes) && quote_these_too && quote_these_too[c / INT_BITS] & (1 << (c % INT_BITS)))) goto store_c; store_escape: if (elide_outer_quotes) goto force_outer_quoting_style; STORE ('\\'); store_c: STORE (c); } if (len == 0 && quoting_style == shell_always_quoting_style && elide_outer_quotes) goto force_outer_quoting_style; if (quote_string && !elide_outer_quotes) for (; *quote_string; quote_string++) STORE (*quote_string); if (len < buffersize) buffer[len] = '\0'; return len; force_outer_quoting_style: /* Don't reuse quote_these_too, since the addition of outer quotes sufficiently quotes the specified characters. */ return quotearg_buffer_restyled (buffer, buffersize, arg, argsize, quoting_style, flags & ~QA_ELIDE_OUTER_QUOTES, NULL); } /* Place into buffer BUFFER (of size BUFFERSIZE) a quoted version of argument ARG (of size ARGSIZE), using O to control quoting. If O is null, use the default. Terminate the output with a null character, and return the written size of the output, not counting the terminating null. If BUFFERSIZE is too small to store the output string, return the value that would have been returned had BUFFERSIZE been large enough. If ARGSIZE is SIZE_MAX, use the string length of the argument for ARGSIZE. */ size_t quotearg_buffer (char *buffer, size_t buffersize, char const *arg, size_t argsize, struct quoting_options const *o) { struct quoting_options const *p = o ? o : &default_quoting_options; int e = errno; size_t r = quotearg_buffer_restyled (buffer, buffersize, arg, argsize, p->style, p->flags, p->quote_these_too); errno = e; return r; } /* Equivalent to quotearg_alloc (ARG, ARGSIZE, NULL, O). */ char * quotearg_alloc (char const *arg, size_t argsize, struct quoting_options const *o) { return quotearg_alloc_mem (arg, argsize, NULL, o); } /* Like quotearg_buffer (..., ARG, ARGSIZE, O), except return newly allocated storage containing the quoted string, and store the resulting size into *SIZE, if non-NULL. The result can contain embedded null bytes only if ARGSIZE is not SIZE_MAX, SIZE is not NULL, and set_quoting_flags has not set the null byte elision flag. */ char * quotearg_alloc_mem (char const *arg, size_t argsize, size_t *size, struct quoting_options const *o) { struct quoting_options const *p = o ? o : &default_quoting_options; int e = errno; /* Elide embedded null bytes if we can't return a size. */ int flags = p->flags | (size ? 0 : QA_ELIDE_NULL_BYTES); size_t bufsize = quotearg_buffer_restyled (0, 0, arg, argsize, p->style, flags, p->quote_these_too) + 1; char *buf = xcharalloc (bufsize); quotearg_buffer_restyled (buf, bufsize, arg, argsize, p->style, flags, p->quote_these_too); errno = e; if (size) *size = bufsize - 1; return buf; } /* A storage slot with size and pointer to a value. */ struct slotvec { size_t size; char *val; }; /* Preallocate a slot 0 buffer, so that the caller can always quote one small component of a "memory exhausted" message in slot 0. */ static char slot0[256]; static unsigned int nslots = 1; static struct slotvec slotvec0 = {sizeof slot0, slot0}; static struct slotvec *slotvec = &slotvec0; void quotearg_free (void) { struct slotvec *sv = slotvec; unsigned int i; for (i = 1; i < nslots; i++) free (sv[i].val); if (sv[0].val != slot0) { free (sv[0].val); slotvec0.size = sizeof slot0; slotvec0.val = slot0; } if (sv != &slotvec0) { free (sv); slotvec = &slotvec0; } nslots = 1; } /* Use storage slot N to return a quoted version of argument ARG. ARG is of size ARGSIZE, but if that is SIZE_MAX, ARG is a null-terminated string. OPTIONS specifies the quoting options. The returned value points to static storage that can be reused by the next call to this function with the same value of N. N must be nonnegative. N is deliberately declared with type "int" to allow for future extensions (using negative values). */ static char * quotearg_n_options (int n, char const *arg, size_t argsize, struct quoting_options const *options) { int e = errno; unsigned int n0 = n; struct slotvec *sv = slotvec; if (n < 0) abort (); if (nslots <= n0) { /* FIXME: technically, the type of n1 should be `unsigned int', but that evokes an unsuppressible warning from gcc-4.0.1 and older. If gcc ever provides an option to suppress that warning, revert to the original type, so that the test in xalloc_oversized is once again performed only at compile time. */ size_t n1 = n0 + 1; bool preallocated = (sv == &slotvec0); if (xalloc_oversized (n1, sizeof *sv)) xalloc_die (); slotvec = sv = xrealloc (preallocated ? NULL : sv, n1 * sizeof *sv); if (preallocated) *sv = slotvec0; memset (sv + nslots, 0, (n1 - nslots) * sizeof *sv); nslots = n1; } { size_t size = sv[n].size; char *val = sv[n].val; /* Elide embedded null bytes since we don't return a size. */ int flags = options->flags | QA_ELIDE_NULL_BYTES; size_t qsize = quotearg_buffer_restyled (val, size, arg, argsize, options->style, flags, options->quote_these_too); if (size <= qsize) { sv[n].size = size = qsize + 1; if (val != slot0) free (val); sv[n].val = val = xcharalloc (size); quotearg_buffer_restyled (val, size, arg, argsize, options->style, flags, options->quote_these_too); } errno = e; return val; } } char * quotearg_n (int n, char const *arg) { return quotearg_n_options (n, arg, SIZE_MAX, &default_quoting_options); } char * quotearg_n_mem (int n, char const *arg, size_t argsize) { return quotearg_n_options (n, arg, argsize, &default_quoting_options); } char * quotearg (char const *arg) { return quotearg_n (0, arg); } char * quotearg_mem (char const *arg, size_t argsize) { return quotearg_n_mem (0, arg, argsize); } char * quotearg_n_style (int n, enum quoting_style s, char const *arg) { struct quoting_options const o = quoting_options_from_style (s); return quotearg_n_options (n, arg, SIZE_MAX, &o); } char * quotearg_n_style_mem (int n, enum quoting_style s, char const *arg, size_t argsize) { struct quoting_options const o = quoting_options_from_style (s); return quotearg_n_options (n, arg, argsize, &o); } char * quotearg_style (enum quoting_style s, char const *arg) { return quotearg_n_style (0, s, arg); } char * quotearg_style_mem (enum quoting_style s, char const *arg, size_t argsize) { return quotearg_n_style_mem (0, s, arg, argsize); } char * quotearg_char_mem (char const *arg, size_t argsize, char ch) { struct quoting_options options; options = default_quoting_options; set_char_quoting (&options, ch, 1); return quotearg_n_options (0, arg, argsize, &options); } char * quotearg_char (char const *arg, char ch) { return quotearg_char_mem (arg, SIZE_MAX, ch); } char * quotearg_colon (char const *arg) { return quotearg_char (arg, ':'); } char * quotearg_colon_mem (char const *arg, size_t argsize) { return quotearg_char_mem (arg, argsize, ':'); } gnuit-4.9.5/lib/readlink.c0000644000175000017500000000304211146671375012315 00000000000000/* Stub for readlink(). Copyright (C) 2003-2007 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 3 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, see . */ #include /* Specification. */ #include #include #include #include #include #if !HAVE_READLINK /* readlink() substitute for systems that don't have a readlink() function, such as DJGPP 2.03 and mingw32. */ /* The official POSIX return type of readlink() is ssize_t, but since here we have no declaration in a public header file, we use 'int' as return type. */ int readlink (const char *path, char *buf, size_t bufsize) { struct stat statbuf; /* In general we should use lstat() here, not stat(). But on platforms without symbolic links lstat() - if it exists - would be equivalent to stat(), therefore we can use stat(). This saves us a configure check. */ if (stat (path, &statbuf) >= 0) errno = EINVAL; return -1; } #endif gnuit-4.9.5/lib/write.c0000644000175000017500000000345511146671375011666 00000000000000/* POSIX compatible write() function. Copyright (C) 2008 Free Software Foundation, Inc. Written by Bruno Haible , 2008. 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 3 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, see . */ #include /* Specification. */ #include /* Replace this function only if module 'sigpipe' is requested. */ #if GNULIB_SIGPIPE /* On native Windows platforms, SIGPIPE does not exist. When write() is called on a pipe with no readers, WriteFile() fails with error GetLastError() = ERROR_NO_DATA, and write() in consequence fails with error EINVAL. */ # if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ # include # include # include # define WIN32_LEAN_AND_MEAN /* avoid including junk */ # include ssize_t rpl_write (int fd, const void *buf, size_t count) #undef write { ssize_t ret = write (fd, buf, count); if (ret < 0) { if (GetLastError () == ERROR_NO_DATA && GetFileType (_get_osfhandle (fd)) == FILE_TYPE_PIPE) { /* Try to raise signal SIGPIPE. */ raise (SIGPIPE); /* If it is currently blocked or ignored, change errno from EINVAL to EPIPE. */ errno = EPIPE; } } return ret; } # endif #endif gnuit-4.9.5/lib/strndup.c0000644000175000017500000000214711146671375012230 00000000000000/* A replacement function, for systems that lack strndup. Copyright (C) 1996, 1997, 1998, 2001, 2002, 2003, 2005, 2006, 2007 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 3, 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. */ #include #include #include char * strndup (char const *s, size_t n) { size_t len = strnlen (s, n); char *new = malloc (len + 1); if (new == NULL) return NULL; new[len] = '\0'; return memcpy (new, s, len); } gnuit-4.9.5/lib/gettimeofday.c0000644000175000017500000000742111146671375013212 00000000000000/* Provide gettimeofday for systems that don't have it or for which it's broken. Copyright (C) 2001, 2002, 2003, 2005, 2006, 2007 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 3, 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. */ /* written by Jim Meyering */ #include /* Specification. */ #include #include #if HAVE_SYS_TIMEB_H # include #endif #if GETTIMEOFDAY_CLOBBERS_LOCALTIME || TZSET_CLOBBERS_LOCALTIME /* Work around the bug in some systems whereby gettimeofday clobbers the static buffer that localtime uses for its return value. The gettimeofday function from Mac OS X 10.0.4 (i.e., Darwin 1.3.7) has this problem. The tzset replacement is necessary for at least Solaris 2.5, 2.5.1, and 2.6. */ static struct tm tm_zero_buffer; static struct tm *localtime_buffer_addr = &tm_zero_buffer; #undef localtime extern struct tm *localtime (time_t const *); #undef gmtime extern struct tm *gmtime (time_t const *); /* This is a wrapper for localtime. It is used only on systems for which gettimeofday clobbers the static buffer used for localtime's result. On the first call, record the address of the static buffer that localtime uses for its result. */ struct tm * rpl_localtime (time_t const *timep) { struct tm *tm = localtime (timep); if (localtime_buffer_addr == &tm_zero_buffer) localtime_buffer_addr = tm; return tm; } /* Same as above, since gmtime and localtime use the same buffer. */ struct tm * rpl_gmtime (time_t const *timep) { struct tm *tm = gmtime (timep); if (localtime_buffer_addr == &tm_zero_buffer) localtime_buffer_addr = tm; return tm; } #endif /* GETTIMEOFDAY_CLOBBERS_LOCALTIME || TZSET_CLOBBERS_LOCALTIME */ #if TZSET_CLOBBERS_LOCALTIME #undef tzset extern void tzset (void); /* This is a wrapper for tzset, for systems on which tzset may clobber the static buffer used for localtime's result. */ void rpl_tzset (void) { /* Save and restore the contents of the buffer used for localtime's result around the call to tzset. */ struct tm save = *localtime_buffer_addr; tzset (); *localtime_buffer_addr = save; } #endif /* This is a wrapper for gettimeofday. It is used only on systems that lack this function, or whose implementation of this function causes problems. */ int rpl_gettimeofday (struct timeval *restrict tv, void *restrict tz) { #undef gettimeofday #if HAVE_GETTIMEOFDAY # if GETTIMEOFDAY_CLOBBERS_LOCALTIME /* Save and restore the contents of the buffer used for localtime's result around the call to gettimeofday. */ struct tm save = *localtime_buffer_addr; # endif int result = gettimeofday (tv, tz); # if GETTIMEOFDAY_CLOBBERS_LOCALTIME *localtime_buffer_addr = save; # endif return result; #else # if HAVE__FTIME struct _timeb timebuf; _ftime (&timebuf); tv->tv_sec = timebuf.time; tv->tv_usec = timebuf.millitm * 1000; # else # if !defined OK_TO_USE_1S_CLOCK # error "Only 1-second nominal clock resolution found. Is that intended?" \ "If so, compile with the -DOK_TO_USE_1S_CLOCK option." # endif tv->tv_sec = time (NULL); tv->tv_usec = 0; # endif return 0; #endif } gnuit-4.9.5/lib/mkstemp.c0000644000175000017500000000247611146671375012216 00000000000000/* Copyright (C) 1998, 1999, 2001, 2005, 2006, 2007 Free Software Foundation, Inc. This file is derived from the one in the GNU C Library. 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 3 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, see . */ #if !_LIBC # include #endif #include #if !_LIBC # include "tempname.h" # define __gen_tempname gen_tempname # define __GT_FILE GT_FILE #endif #include #ifndef __GT_FILE # define __GT_FILE 0 #endif /* Generate a unique temporary file name from TEMPLATE. The last six characters of TEMPLATE must be "XXXXXX"; they are replaced with a string that makes the file name unique. Then open the file and return a fd. */ int mkstemp (template) char *template; { return __gen_tempname (template, __GT_FILE); } gnuit-4.9.5/lib/basename.c0000644000175000017500000000736311146671375012311 00000000000000/* basename.c -- return the last element in a file name Copyright (C) 1990, 1998, 1999, 2000, 2001, 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 3 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, see . */ #include #include "dirname.h" #include #include "xalloc.h" #include "xstrndup.h" /* Return the address of the last file name component of NAME. If NAME has no relative file name components because it is a file system root, return the empty string. */ char * last_component (char const *name) { char const *base = name + FILE_SYSTEM_PREFIX_LEN (name); char const *p; bool saw_slash = false; while (ISSLASH (*base)) base++; for (p = base; *p; p++) { if (ISSLASH (*p)) saw_slash = true; else if (saw_slash) { base = p; saw_slash = false; } } return (char *) base; } /* In general, we can't use the builtin `basename' function if available, since it has different meanings in different environments. In some environments the builtin `basename' modifies its argument. Return the last file name component of NAME, allocated with xmalloc. On systems with drive letters, a leading "./" distinguishes relative names that would otherwise look like a drive letter. Unlike POSIX basename(), NAME cannot be NULL, base_name("") returns "", and the first trailing slash is not stripped. If lstat (NAME) would succeed, then { chdir (dir_name (NAME)); lstat (base_name (NAME)); } will access the same file. Likewise, if the sequence { chdir (dir_name (NAME)); rename (base_name (NAME), "foo"); } succeeds, you have renamed NAME to "foo" in the same directory NAME was in. */ char * base_name (char const *name) { char const *base = last_component (name); size_t length; /* If there is no last component, then name is a file system root or the empty string. */ if (! *base) return xstrndup (name, base_len (name)); /* Collapse a sequence of trailing slashes into one. */ length = base_len (base); if (ISSLASH (base[length])) length++; /* On systems with drive letters, `a/b:c' must return `./b:c' rather than `b:c' to avoid confusion with a drive letter. On systems with pure POSIX semantics, this is not an issue. */ if (FILE_SYSTEM_PREFIX_LEN (base)) { char *p = xmalloc (length + 3); p[0] = '.'; p[1] = '/'; memcpy (p + 2, base, length); p[length + 2] = '\0'; return p; } /* Finally, copy the basename. */ return xstrndup (base, length); } /* Return the length of the basename NAME. Typically NAME is the value returned by base_name or last_component. Act like strlen (NAME), except omit all trailing slashes. */ size_t base_len (char const *name) { size_t len; size_t prefix_len = FILE_SYSTEM_PREFIX_LEN (name); for (len = strlen (name); 1 < len && ISSLASH (name[len - 1]); len--) continue; if (DOUBLE_SLASH_IS_DISTINCT_ROOT && len == 1 && ISSLASH (name[0]) && ISSLASH (name[1]) && ! name[2]) return 2; if (FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE && prefix_len && len == prefix_len && ISSLASH (name[prefix_len])) return prefix_len + 1; return len; } gnuit-4.9.5/lib/full-write.c0000644000175000017500000000437011146671375012623 00000000000000/* An interface to read and write that retries (if necessary) until complete. Copyright (C) 1993, 1994, 1997, 1998, 1999, 2000, 2001, 2002, 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 3 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, see . */ #include /* Specification. */ #ifdef FULL_READ # include "full-read.h" #else # include "full-write.h" #endif #include #ifdef FULL_READ # include "safe-read.h" # define safe_rw safe_read # define full_rw full_read # undef const # define const /* empty */ #else # include "safe-write.h" # define safe_rw safe_write # define full_rw full_write #endif #ifdef FULL_READ /* Set errno to zero upon EOF. */ # define ZERO_BYTE_TRANSFER_ERRNO 0 #else /* Some buggy drivers return 0 when one tries to write beyond a device's end. (Example: Linux 1.2.13 on /dev/fd0.) Set errno to ENOSPC so they get a sensible diagnostic. */ # define ZERO_BYTE_TRANSFER_ERRNO ENOSPC #endif /* Write(read) COUNT bytes at BUF to(from) descriptor FD, retrying if interrupted or if a partial write(read) occurs. Return the number of bytes transferred. When writing, set errno if fewer than COUNT bytes are written. When reading, if fewer than COUNT bytes are read, you must examine errno to distinguish failure from EOF (errno == 0). */ size_t full_rw (int fd, const void *buf, size_t count) { size_t total = 0; const char *ptr = (const char *) buf; while (count > 0) { size_t n_rw = safe_rw (fd, ptr, count); if (n_rw == (size_t) -1) break; if (n_rw == 0) { errno = ZERO_BYTE_TRANSFER_ERRNO; break; } total += n_rw; ptr += n_rw; count -= n_rw; } return total; } gnuit-4.9.5/lib/alloca.in.h0000644000175000017500000000355211146671375012377 00000000000000/* Memory allocation on the stack. Copyright (C) 1995, 1999, 2001-2004, 2006-2008 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 3, 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. */ /* Avoid using the symbol _ALLOCA_H here, as Bison assumes _ALLOCA_H means there is a real alloca function. */ #ifndef _GL_ALLOCA_H #define _GL_ALLOCA_H /* alloca (N) returns a pointer to N bytes of memory allocated on the stack, which will last until the function returns. Use of alloca should be avoided: - inside arguments of function calls - undefined behaviour, - in inline functions - the allocation may actually last until the calling function returns, - for huge N (say, N >= 65536) - you never know how large (or small) the stack is, and when the stack cannot fulfill the memory allocation request, the program just crashes. */ #ifndef alloca # ifdef __GNUC__ # define alloca __builtin_alloca # elif defined _AIX # define alloca __alloca # elif defined _MSC_VER # include # define alloca _alloca # elif defined __DECC && defined __VMS # define alloca __ALLOCA # else # include # ifdef __cplusplus extern "C" # endif void *alloca (size_t); # endif #endif #endif /* _GL_ALLOCA_H */ gnuit-4.9.5/lib/strtoumax.c0000644000175000017500000000005211146671375012570 00000000000000#define UNSIGNED 1 #include "strtoimax.c" gnuit-4.9.5/lib/fnmatch_loop.c0000644000175000017500000007221111146671375013201 00000000000000/* Copyright (C) 1991,1992,1993,1996,1997,1998,1999,2000,2001,2002,2003,2004,2005,2006 Free Software Foundation, Inc. This file is part of the GNU C Library. 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 3, 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. */ /* Match STRING against the file name pattern PATTERN, returning zero if it matches, nonzero if not. */ static int EXT (INT opt, const CHAR *pattern, const CHAR *string, const CHAR *string_end, bool no_leading_period, int flags) internal_function; static const CHAR *END (const CHAR *patternp) internal_function; static int internal_function FCT (const CHAR *pattern, const CHAR *string, const CHAR *string_end, bool no_leading_period, int flags) { register const CHAR *p = pattern, *n = string; register UCHAR c; #ifdef _LIBC # if WIDE_CHAR_VERSION const char *collseq = (const char *) _NL_CURRENT(LC_COLLATE, _NL_COLLATE_COLLSEQWC); # else const UCHAR *collseq = (const UCHAR *) _NL_CURRENT(LC_COLLATE, _NL_COLLATE_COLLSEQMB); # endif #endif while ((c = *p++) != L_('\0')) { bool new_no_leading_period = false; c = FOLD (c); switch (c) { case L_('?'): if (__builtin_expect (flags & FNM_EXTMATCH, 0) && *p == '(') { int res; res = EXT (c, p, n, string_end, no_leading_period, flags); if (res != -1) return res; } if (n == string_end) return FNM_NOMATCH; else if (*n == L_('/') && (flags & FNM_FILE_NAME)) return FNM_NOMATCH; else if (*n == L_('.') && no_leading_period) return FNM_NOMATCH; break; case L_('\\'): if (!(flags & FNM_NOESCAPE)) { c = *p++; if (c == L_('\0')) /* Trailing \ loses. */ return FNM_NOMATCH; c = FOLD (c); } if (n == string_end || FOLD ((UCHAR) *n) != c) return FNM_NOMATCH; break; case L_('*'): if (__builtin_expect (flags & FNM_EXTMATCH, 0) && *p == '(') { int res; res = EXT (c, p, n, string_end, no_leading_period, flags); if (res != -1) return res; } if (n != string_end && *n == L_('.') && no_leading_period) return FNM_NOMATCH; for (c = *p++; c == L_('?') || c == L_('*'); c = *p++) { if (*p == L_('(') && (flags & FNM_EXTMATCH) != 0) { const CHAR *endp = END (p); if (endp != p) { /* This is a pattern. Skip over it. */ p = endp; continue; } } if (c == L_('?')) { /* A ? needs to match one character. */ if (n == string_end) /* There isn't another character; no match. */ return FNM_NOMATCH; else if (*n == L_('/') && __builtin_expect (flags & FNM_FILE_NAME, 0)) /* A slash does not match a wildcard under FNM_FILE_NAME. */ return FNM_NOMATCH; else /* One character of the string is consumed in matching this ? wildcard, so *??? won't match if there are less than three characters. */ ++n; } } if (c == L_('\0')) /* The wildcard(s) is/are the last element of the pattern. If the name is a file name and contains another slash this means it cannot match, unless the FNM_LEADING_DIR flag is set. */ { int result = (flags & FNM_FILE_NAME) == 0 ? 0 : FNM_NOMATCH; if (flags & FNM_FILE_NAME) { if (flags & FNM_LEADING_DIR) result = 0; else { if (MEMCHR (n, L_('/'), string_end - n) == NULL) result = 0; } } return result; } else { const CHAR *endp; endp = MEMCHR (n, (flags & FNM_FILE_NAME) ? L_('/') : L_('\0'), string_end - n); if (endp == NULL) endp = string_end; if (c == L_('[') || (__builtin_expect (flags & FNM_EXTMATCH, 0) != 0 && (c == L_('@') || c == L_('+') || c == L_('!')) && *p == L_('('))) { int flags2 = ((flags & FNM_FILE_NAME) ? flags : (flags & ~FNM_PERIOD)); bool no_leading_period2 = no_leading_period; for (--p; n < endp; ++n, no_leading_period2 = false) if (FCT (p, n, string_end, no_leading_period2, flags2) == 0) return 0; } else if (c == L_('/') && (flags & FNM_FILE_NAME)) { while (n < string_end && *n != L_('/')) ++n; if (n < string_end && *n == L_('/') && (FCT (p, n + 1, string_end, flags & FNM_PERIOD, flags) == 0)) return 0; } else { int flags2 = ((flags & FNM_FILE_NAME) ? flags : (flags & ~FNM_PERIOD)); int no_leading_period2 = no_leading_period; if (c == L_('\\') && !(flags & FNM_NOESCAPE)) c = *p; c = FOLD (c); for (--p; n < endp; ++n, no_leading_period2 = false) if (FOLD ((UCHAR) *n) == c && (FCT (p, n, string_end, no_leading_period2, flags2) == 0)) return 0; } } /* If we come here no match is possible with the wildcard. */ return FNM_NOMATCH; case L_('['): { /* Nonzero if the sense of the character class is inverted. */ register bool not; CHAR cold; UCHAR fn; if (posixly_correct == 0) posixly_correct = getenv ("POSIXLY_CORRECT") != NULL ? 1 : -1; if (n == string_end) return FNM_NOMATCH; if (*n == L_('.') && no_leading_period) return FNM_NOMATCH; if (*n == L_('/') && (flags & FNM_FILE_NAME)) /* `/' cannot be matched. */ return FNM_NOMATCH; not = (*p == L_('!') || (posixly_correct < 0 && *p == L_('^'))); if (not) ++p; fn = FOLD ((UCHAR) *n); c = *p++; for (;;) { if (!(flags & FNM_NOESCAPE) && c == L_('\\')) { if (*p == L_('\0')) return FNM_NOMATCH; c = FOLD ((UCHAR) *p); ++p; goto normal_bracket; } else if (c == L_('[') && *p == L_(':')) { /* Leave room for the null. */ CHAR str[CHAR_CLASS_MAX_LENGTH + 1]; size_t c1 = 0; #if defined _LIBC || WIDE_CHAR_SUPPORT wctype_t wt; #endif const CHAR *startp = p; for (;;) { if (c1 == CHAR_CLASS_MAX_LENGTH) /* The name is too long and therefore the pattern is ill-formed. */ return FNM_NOMATCH; c = *++p; if (c == L_(':') && p[1] == L_(']')) { p += 2; break; } if (c < L_('a') || c >= L_('z')) { /* This cannot possibly be a character class name. Match it as a normal range. */ p = startp; c = L_('['); goto normal_bracket; } str[c1++] = c; } str[c1] = L_('\0'); #if defined _LIBC || WIDE_CHAR_SUPPORT wt = IS_CHAR_CLASS (str); if (wt == 0) /* Invalid character class name. */ return FNM_NOMATCH; # if defined _LIBC && ! WIDE_CHAR_VERSION /* The following code is glibc specific but does there a good job in speeding up the code since we can avoid the btowc() call. */ if (_ISCTYPE ((UCHAR) *n, wt)) goto matched; # else if (ISWCTYPE (BTOWC ((UCHAR) *n), wt)) goto matched; # endif #else if ((STREQ (str, L_("alnum")) && isalnum ((UCHAR) *n)) || (STREQ (str, L_("alpha")) && isalpha ((UCHAR) *n)) || (STREQ (str, L_("blank")) && isblank ((UCHAR) *n)) || (STREQ (str, L_("cntrl")) && iscntrl ((UCHAR) *n)) || (STREQ (str, L_("digit")) && isdigit ((UCHAR) *n)) || (STREQ (str, L_("graph")) && isgraph ((UCHAR) *n)) || (STREQ (str, L_("lower")) && islower ((UCHAR) *n)) || (STREQ (str, L_("print")) && isprint ((UCHAR) *n)) || (STREQ (str, L_("punct")) && ispunct ((UCHAR) *n)) || (STREQ (str, L_("space")) && isspace ((UCHAR) *n)) || (STREQ (str, L_("upper")) && isupper ((UCHAR) *n)) || (STREQ (str, L_("xdigit")) && isxdigit ((UCHAR) *n))) goto matched; #endif c = *p++; } #ifdef _LIBC else if (c == L_('[') && *p == L_('=')) { UCHAR str[1]; uint32_t nrules = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES); const CHAR *startp = p; c = *++p; if (c == L_('\0')) { p = startp; c = L_('['); goto normal_bracket; } str[0] = c; c = *++p; if (c != L_('=') || p[1] != L_(']')) { p = startp; c = L_('['); goto normal_bracket; } p += 2; if (nrules == 0) { if ((UCHAR) *n == str[0]) goto matched; } else { const int32_t *table; # if WIDE_CHAR_VERSION const int32_t *weights; const int32_t *extra; # else const unsigned char *weights; const unsigned char *extra; # endif const int32_t *indirect; int32_t idx; const UCHAR *cp = (const UCHAR *) str; /* This #include defines a local function! */ # if WIDE_CHAR_VERSION # include # else # include # endif # if WIDE_CHAR_VERSION table = (const int32_t *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_TABLEWC); weights = (const int32_t *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_WEIGHTWC); extra = (const int32_t *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_EXTRAWC); indirect = (const int32_t *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_INDIRECTWC); # else table = (const int32_t *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_TABLEMB); weights = (const unsigned char *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_WEIGHTMB); extra = (const unsigned char *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_EXTRAMB); indirect = (const int32_t *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_INDIRECTMB); # endif idx = findidx (&cp); if (idx != 0) { /* We found a table entry. Now see whether the character we are currently at has the same equivalance class value. */ int len = weights[idx]; int32_t idx2; const UCHAR *np = (const UCHAR *) n; idx2 = findidx (&np); if (idx2 != 0 && len == weights[idx2]) { int cnt = 0; while (cnt < len && (weights[idx + 1 + cnt] == weights[idx2 + 1 + cnt])) ++cnt; if (cnt == len) goto matched; } } } c = *p++; } #endif else if (c == L_('\0')) /* [ (unterminated) loses. */ return FNM_NOMATCH; else { bool is_range = false; #ifdef _LIBC bool is_seqval = false; if (c == L_('[') && *p == L_('.')) { uint32_t nrules = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES); const CHAR *startp = p; size_t c1 = 0; while (1) { c = *++p; if (c == L_('.') && p[1] == L_(']')) { p += 2; break; } if (c == '\0') return FNM_NOMATCH; ++c1; } /* We have to handling the symbols differently in ranges since then the collation sequence is important. */ is_range = *p == L_('-') && p[1] != L_('\0'); if (nrules == 0) { /* There are no names defined in the collation data. Therefore we only accept the trivial names consisting of the character itself. */ if (c1 != 1) return FNM_NOMATCH; if (!is_range && *n == startp[1]) goto matched; cold = startp[1]; c = *p++; } else { int32_t table_size; const int32_t *symb_table; # ifdef WIDE_CHAR_VERSION char str[c1]; size_t strcnt; # else # define str (startp + 1) # endif const unsigned char *extra; int32_t idx; int32_t elem; int32_t second; int32_t hash; # ifdef WIDE_CHAR_VERSION /* We have to convert the name to a single-byte string. This is possible since the names consist of ASCII characters and the internal representation is UCS4. */ for (strcnt = 0; strcnt < c1; ++strcnt) str[strcnt] = startp[1 + strcnt]; # endif table_size = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_SYMB_HASH_SIZEMB); symb_table = (const int32_t *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_SYMB_TABLEMB); extra = (const unsigned char *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_SYMB_EXTRAMB); /* Locate the character in the hashing table. */ hash = elem_hash (str, c1); idx = 0; elem = hash % table_size; if (symb_table[2 * elem] != 0) { second = hash % (table_size - 2) + 1; do { /* First compare the hashing value. */ if (symb_table[2 * elem] == hash && (c1 == extra[symb_table[2 * elem + 1]]) && memcmp (str, &extra[symb_table[2 * elem + 1] + 1], c1) == 0) { /* Yep, this is the entry. */ idx = symb_table[2 * elem + 1]; idx += 1 + extra[idx]; break; } /* Next entry. */ elem += second; } while (symb_table[2 * elem] != 0); } if (symb_table[2 * elem] != 0) { /* Compare the byte sequence but only if this is not part of a range. */ # ifdef WIDE_CHAR_VERSION int32_t *wextra; idx += 1 + extra[idx]; /* Adjust for the alignment. */ idx = (idx + 3) & ~3; wextra = (int32_t *) &extra[idx + 4]; # endif if (! is_range) { # ifdef WIDE_CHAR_VERSION for (c1 = 0; (int32_t) c1 < wextra[idx]; ++c1) if (n[c1] != wextra[1 + c1]) break; if ((int32_t) c1 == wextra[idx]) goto matched; # else for (c1 = 0; c1 < extra[idx]; ++c1) if (n[c1] != extra[1 + c1]) break; if (c1 == extra[idx]) goto matched; # endif } /* Get the collation sequence value. */ is_seqval = true; # ifdef WIDE_CHAR_VERSION cold = wextra[1 + wextra[idx]]; # else /* Adjust for the alignment. */ idx += 1 + extra[idx]; idx = (idx + 3) & ~4; cold = *((int32_t *) &extra[idx]); # endif c = *p++; } else if (c1 == 1) { /* No valid character. Match it as a single byte. */ if (!is_range && *n == str[0]) goto matched; cold = str[0]; c = *p++; } else return FNM_NOMATCH; } } else # undef str #endif { c = FOLD (c); normal_bracket: /* We have to handling the symbols differently in ranges since then the collation sequence is important. */ is_range = (*p == L_('-') && p[1] != L_('\0') && p[1] != L_(']')); if (!is_range && c == fn) goto matched; #if _LIBC /* This is needed if we goto normal_bracket; from outside of is_seqval's scope. */ is_seqval = false; #endif cold = c; c = *p++; } if (c == L_('-') && *p != L_(']')) { #if _LIBC /* We have to find the collation sequence value for C. Collation sequence is nothing we can regularly access. The sequence value is defined by the order in which the definitions of the collation values for the various characters appear in the source file. A strange concept, nowhere documented. */ uint32_t fcollseq; uint32_t lcollseq; UCHAR cend = *p++; # ifdef WIDE_CHAR_VERSION /* Search in the `names' array for the characters. */ fcollseq = __collseq_table_lookup (collseq, fn); if (fcollseq == ~((uint32_t) 0)) /* XXX We don't know anything about the character we are supposed to match. This means we are failing. */ goto range_not_matched; if (is_seqval) lcollseq = cold; else lcollseq = __collseq_table_lookup (collseq, cold); # else fcollseq = collseq[fn]; lcollseq = is_seqval ? cold : collseq[(UCHAR) cold]; # endif is_seqval = false; if (cend == L_('[') && *p == L_('.')) { uint32_t nrules = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES); const CHAR *startp = p; size_t c1 = 0; while (1) { c = *++p; if (c == L_('.') && p[1] == L_(']')) { p += 2; break; } if (c == '\0') return FNM_NOMATCH; ++c1; } if (nrules == 0) { /* There are no names defined in the collation data. Therefore we only accept the trivial names consisting of the character itself. */ if (c1 != 1) return FNM_NOMATCH; cend = startp[1]; } else { int32_t table_size; const int32_t *symb_table; # ifdef WIDE_CHAR_VERSION char str[c1]; size_t strcnt; # else # define str (startp + 1) # endif const unsigned char *extra; int32_t idx; int32_t elem; int32_t second; int32_t hash; # ifdef WIDE_CHAR_VERSION /* We have to convert the name to a single-byte string. This is possible since the names consist of ASCII characters and the internal representation is UCS4. */ for (strcnt = 0; strcnt < c1; ++strcnt) str[strcnt] = startp[1 + strcnt]; # endif table_size = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_SYMB_HASH_SIZEMB); symb_table = (const int32_t *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_SYMB_TABLEMB); extra = (const unsigned char *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_SYMB_EXTRAMB); /* Locate the character in the hashing table. */ hash = elem_hash (str, c1); idx = 0; elem = hash % table_size; if (symb_table[2 * elem] != 0) { second = hash % (table_size - 2) + 1; do { /* First compare the hashing value. */ if (symb_table[2 * elem] == hash && (c1 == extra[symb_table[2 * elem + 1]]) && memcmp (str, &extra[symb_table[2 * elem + 1] + 1], c1) == 0) { /* Yep, this is the entry. */ idx = symb_table[2 * elem + 1]; idx += 1 + extra[idx]; break; } /* Next entry. */ elem += second; } while (symb_table[2 * elem] != 0); } if (symb_table[2 * elem] != 0) { /* Compare the byte sequence but only if this is not part of a range. */ # ifdef WIDE_CHAR_VERSION int32_t *wextra; idx += 1 + extra[idx]; /* Adjust for the alignment. */ idx = (idx + 3) & ~4; wextra = (int32_t *) &extra[idx + 4]; # endif /* Get the collation sequence value. */ is_seqval = true; # ifdef WIDE_CHAR_VERSION cend = wextra[1 + wextra[idx]]; # else /* Adjust for the alignment. */ idx += 1 + extra[idx]; idx = (idx + 3) & ~4; cend = *((int32_t *) &extra[idx]); # endif } else if (symb_table[2 * elem] != 0 && c1 == 1) { cend = str[0]; c = *p++; } else return FNM_NOMATCH; } # undef str } else { if (!(flags & FNM_NOESCAPE) && cend == L_('\\')) cend = *p++; if (cend == L_('\0')) return FNM_NOMATCH; cend = FOLD (cend); } /* XXX It is not entirely clear to me how to handle characters which are not mentioned in the collation specification. */ if ( # ifdef WIDE_CHAR_VERSION lcollseq == 0xffffffff || # endif lcollseq <= fcollseq) { /* We have to look at the upper bound. */ uint32_t hcollseq; if (is_seqval) hcollseq = cend; else { # ifdef WIDE_CHAR_VERSION hcollseq = __collseq_table_lookup (collseq, cend); if (hcollseq == ~((uint32_t) 0)) { /* Hum, no information about the upper bound. The matching succeeds if the lower bound is matched exactly. */ if (lcollseq != fcollseq) goto range_not_matched; goto matched; } # else hcollseq = collseq[cend]; # endif } if (lcollseq <= hcollseq && fcollseq <= hcollseq) goto matched; } # ifdef WIDE_CHAR_VERSION range_not_matched: # endif #else /* We use a boring value comparison of the character values. This is better than comparing using `strcoll' since the latter would have surprising and sometimes fatal consequences. */ UCHAR cend = *p++; if (!(flags & FNM_NOESCAPE) && cend == L_('\\')) cend = *p++; if (cend == L_('\0')) return FNM_NOMATCH; /* It is a range. */ if (cold <= fn && fn <= cend) goto matched; #endif c = *p++; } } if (c == L_(']')) break; } if (!not) return FNM_NOMATCH; break; matched: /* Skip the rest of the [...] that already matched. */ do { ignore_next: c = *p++; if (c == L_('\0')) /* [... (unterminated) loses. */ return FNM_NOMATCH; if (!(flags & FNM_NOESCAPE) && c == L_('\\')) { if (*p == L_('\0')) return FNM_NOMATCH; /* XXX 1003.2d11 is unclear if this is right. */ ++p; } else if (c == L_('[') && *p == L_(':')) { int c1 = 0; const CHAR *startp = p; while (1) { c = *++p; if (++c1 == CHAR_CLASS_MAX_LENGTH) return FNM_NOMATCH; if (*p == L_(':') && p[1] == L_(']')) break; if (c < L_('a') || c >= L_('z')) { p = startp; goto ignore_next; } } p += 2; c = *p++; } else if (c == L_('[') && *p == L_('=')) { c = *++p; if (c == L_('\0')) return FNM_NOMATCH; c = *++p; if (c != L_('=') || p[1] != L_(']')) return FNM_NOMATCH; p += 2; c = *p++; } else if (c == L_('[') && *p == L_('.')) { ++p; while (1) { c = *++p; if (c == '\0') return FNM_NOMATCH; if (*p == L_('.') && p[1] == L_(']')) break; } p += 2; c = *p++; } } while (c != L_(']')); if (not) return FNM_NOMATCH; } break; case L_('+'): case L_('@'): case L_('!'): if (__builtin_expect (flags & FNM_EXTMATCH, 0) && *p == '(') { int res; res = EXT (c, p, n, string_end, no_leading_period, flags); if (res != -1) return res; } goto normal_match; case L_('/'): if (NO_LEADING_PERIOD (flags)) { if (n == string_end || c != (UCHAR) *n) return FNM_NOMATCH; new_no_leading_period = true; break; } /* FALLTHROUGH */ default: normal_match: if (n == string_end || c != FOLD ((UCHAR) *n)) return FNM_NOMATCH; } no_leading_period = new_no_leading_period; ++n; } if (n == string_end) return 0; if ((flags & FNM_LEADING_DIR) && n != string_end && *n == L_('/')) /* The FNM_LEADING_DIR flag says that "foo*" matches "foobar/frobozz". */ return 0; return FNM_NOMATCH; } static const CHAR * internal_function END (const CHAR *pattern) { const CHAR *p = pattern; while (1) if (*++p == L_('\0')) /* This is an invalid pattern. */ return pattern; else if (*p == L_('[')) { /* Handle brackets special. */ if (posixly_correct == 0) posixly_correct = getenv ("POSIXLY_CORRECT") != NULL ? 1 : -1; /* Skip the not sign. We have to recognize it because of a possibly following ']'. */ if (*++p == L_('!') || (posixly_correct < 0 && *p == L_('^'))) ++p; /* A leading ']' is recognized as such. */ if (*p == L_(']')) ++p; /* Skip over all characters of the list. */ while (*p != L_(']')) if (*p++ == L_('\0')) /* This is no valid pattern. */ return pattern; } else if ((*p == L_('?') || *p == L_('*') || *p == L_('+') || *p == L_('@') || *p == L_('!')) && p[1] == L_('(')) p = END (p + 1); else if (*p == L_(')')) break; return p + 1; } static int internal_function EXT (INT opt, const CHAR *pattern, const CHAR *string, const CHAR *string_end, bool no_leading_period, int flags) { const CHAR *startp; size_t level; struct patternlist { struct patternlist *next; CHAR str[1]; } *list = NULL; struct patternlist **lastp = &list; size_t pattern_len = STRLEN (pattern); const CHAR *p; const CHAR *rs; enum { ALLOCA_LIMIT = 8000 }; /* Parse the pattern. Store the individual parts in the list. */ level = 0; for (startp = p = pattern + 1; ; ++p) if (*p == L_('\0')) /* This is an invalid pattern. */ return -1; else if (*p == L_('[')) { /* Handle brackets special. */ if (posixly_correct == 0) posixly_correct = getenv ("POSIXLY_CORRECT") != NULL ? 1 : -1; /* Skip the not sign. We have to recognize it because of a possibly following ']'. */ if (*++p == L_('!') || (posixly_correct < 0 && *p == L_('^'))) ++p; /* A leading ']' is recognized as such. */ if (*p == L_(']')) ++p; /* Skip over all characters of the list. */ while (*p != L_(']')) if (*p++ == L_('\0')) /* This is no valid pattern. */ return -1; } else if ((*p == L_('?') || *p == L_('*') || *p == L_('+') || *p == L_('@') || *p == L_('!')) && p[1] == L_('(')) /* Remember the nesting level. */ ++level; else if (*p == L_(')')) { if (level-- == 0) { /* This means we found the end of the pattern. */ #define NEW_PATTERN \ struct patternlist *newp; \ size_t plen; \ size_t plensize; \ size_t newpsize; \ \ plen = (opt == L_('?') || opt == L_('@') \ ? pattern_len \ : p - startp + 1); \ plensize = plen * sizeof (CHAR); \ newpsize = offsetof (struct patternlist, str) + plensize; \ if ((size_t) -1 / sizeof (CHAR) < plen \ || newpsize < offsetof (struct patternlist, str) \ || ALLOCA_LIMIT <= newpsize) \ return -1; \ newp = (struct patternlist *) alloca (newpsize); \ *((CHAR *) MEMPCPY (newp->str, startp, p - startp)) = L_('\0'); \ newp->next = NULL; \ *lastp = newp; \ lastp = &newp->next NEW_PATTERN; break; } } else if (*p == L_('|')) { if (level == 0) { NEW_PATTERN; startp = p + 1; } } assert (list != NULL); assert (p[-1] == L_(')')); #undef NEW_PATTERN switch (opt) { case L_('*'): if (FCT (p, string, string_end, no_leading_period, flags) == 0) return 0; /* FALLTHROUGH */ case L_('+'): do { for (rs = string; rs <= string_end; ++rs) /* First match the prefix with the current pattern with the current pattern. */ if (FCT (list->str, string, rs, no_leading_period, flags & FNM_FILE_NAME ? flags : flags & ~FNM_PERIOD) == 0 /* This was successful. Now match the rest with the rest of the pattern. */ && (FCT (p, rs, string_end, rs == string ? no_leading_period : rs[-1] == '/' && NO_LEADING_PERIOD (flags), flags & FNM_FILE_NAME ? flags : flags & ~FNM_PERIOD) == 0 /* This didn't work. Try the whole pattern. */ || (rs != string && FCT (pattern - 1, rs, string_end, rs == string ? no_leading_period : rs[-1] == '/' && NO_LEADING_PERIOD (flags), flags & FNM_FILE_NAME ? flags : flags & ~FNM_PERIOD) == 0))) /* It worked. Signal success. */ return 0; } while ((list = list->next) != NULL); /* None of the patterns lead to a match. */ return FNM_NOMATCH; case L_('?'): if (FCT (p, string, string_end, no_leading_period, flags) == 0) return 0; /* FALLTHROUGH */ case L_('@'): do /* I cannot believe it but `strcat' is actually acceptable here. Match the entire string with the prefix from the pattern list and the rest of the pattern following the pattern list. */ if (FCT (STRCAT (list->str, p), string, string_end, no_leading_period, flags & FNM_FILE_NAME ? flags : flags & ~FNM_PERIOD) == 0) /* It worked. Signal success. */ return 0; while ((list = list->next) != NULL); /* None of the patterns lead to a match. */ return FNM_NOMATCH; case L_('!'): for (rs = string; rs <= string_end; ++rs) { struct patternlist *runp; for (runp = list; runp != NULL; runp = runp->next) if (FCT (runp->str, string, rs, no_leading_period, flags & FNM_FILE_NAME ? flags : flags & ~FNM_PERIOD) == 0) break; /* If none of the patterns matched see whether the rest does. */ if (runp == NULL && (FCT (p, rs, string_end, rs == string ? no_leading_period : rs[-1] == '/' && NO_LEADING_PERIOD (flags), flags & FNM_FILE_NAME ? flags : flags & ~FNM_PERIOD) == 0)) /* This is successful. */ return 0; } /* None of the patterns together with the rest of the pattern lead to a match. */ return FNM_NOMATCH; default: assert (! "Invalid extended matching operator"); break; } return -1; } #undef FOLD #undef CHAR #undef UCHAR #undef INT #undef FCT #undef EXT #undef END #undef MEMPCPY #undef MEMCHR #undef STRCOLL #undef STRLEN #undef STRCAT #undef L_ #undef BTOWC gnuit-4.9.5/lib/sigprocmask.c0000644000175000017500000001702711146671375013056 00000000000000/* POSIX compatible signal blocking. Copyright (C) 2006-2008 Free Software Foundation, Inc. Written by Bruno Haible , 2006. 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 3 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, see . */ #include /* Specification. */ #include #include #include #include /* We assume that a platform without POSIX signal blocking functions also does not have the POSIX sigaction() function, only the signal() function. We also assume signal() has SysV semantics, where any handler is uninstalled prior to being invoked. This is true for Woe32 platforms. */ /* We use raw signal(), but also provide a wrapper rpl_signal() so that applications can query or change a blocked signal. */ #undef signal /* Provide invalid signal numbers as fallbacks if the uncatchable signals are not defined. */ #ifndef SIGKILL # define SIGKILL (-1) #endif #ifndef SIGSTOP # define SIGSTOP (-1) #endif /* On native Windows, as of 2008, the signal SIGABRT_COMPAT is an alias for the signal SIGABRT. Only one signal handler is stored for both SIGABRT and SIGABRT_COMPAT. SIGABRT_COMPAT is not a signal of its own. */ #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ # undef SIGABRT_COMPAT # define SIGABRT_COMPAT 6 #endif #ifdef SIGABRT_COMPAT # define SIGABRT_COMPAT_MASK (1U << SIGABRT_COMPAT) #else # define SIGABRT_COMPAT_MASK 0 #endif typedef void (*handler_t) (int); /* Handling of gnulib defined signals. */ #if GNULIB_defined_SIGPIPE static handler_t SIGPIPE_handler = SIG_DFL; #endif #if GNULIB_defined_SIGPIPE static handler_t ext_signal (int sig, handler_t handler) { switch (sig) { case SIGPIPE: { handler_t old_handler = SIGPIPE_handler; SIGPIPE_handler = handler; return old_handler; } default: /* System defined signal */ return signal (sig, handler); } } # define signal ext_signal #endif int sigismember (const sigset_t *set, int sig) { if (sig >= 0 && sig < NSIG) { #ifdef SIGABRT_COMPAT if (sig == SIGABRT_COMPAT) sig = SIGABRT; #endif return (*set >> sig) & 1; } else return 0; } int sigemptyset (sigset_t *set) { *set = 0; return 0; } int sigaddset (sigset_t *set, int sig) { if (sig >= 0 && sig < NSIG) { #ifdef SIGABRT_COMPAT if (sig == SIGABRT_COMPAT) sig = SIGABRT; #endif *set |= 1U << sig; return 0; } else { errno = EINVAL; return -1; } } int sigdelset (sigset_t *set, int sig) { if (sig >= 0 && sig < NSIG) { #ifdef SIGABRT_COMPAT if (sig == SIGABRT_COMPAT) sig = SIGABRT; #endif *set &= ~(1U << sig); return 0; } else { errno = EINVAL; return -1; } } int sigfillset (sigset_t *set) { *set = ((2U << (NSIG - 1)) - 1) & ~ SIGABRT_COMPAT_MASK; return 0; } /* Set of currently blocked signals. */ static volatile sigset_t blocked_set /* = 0 */; /* Set of currently blocked and pending signals. */ static volatile sig_atomic_t pending_array[NSIG] /* = { 0 } */; /* Signal handler that is installed for blocked signals. */ static void blocked_handler (int sig) { /* Reinstall the handler, in case the signal occurs multiple times while blocked. There is an inherent race where an asynchronous signal in between when the kernel uninstalled the handler and when we reinstall it will trigger the default handler; oh well. */ signal (sig, blocked_handler); if (sig >= 0 && sig < NSIG) pending_array[sig] = 1; } int sigpending (sigset_t *set) { sigset_t pending = 0; int sig; for (sig = 0; sig < NSIG; sig++) if (pending_array[sig]) pending |= 1U << sig; *set = pending; return 0; } /* The previous signal handlers. Only the array elements corresponding to blocked signals are relevant. */ static volatile handler_t old_handlers[NSIG]; int sigprocmask (int operation, const sigset_t *set, sigset_t *old_set) { if (old_set != NULL) *old_set = blocked_set; if (set != NULL) { sigset_t new_blocked_set; sigset_t to_unblock; sigset_t to_block; switch (operation) { case SIG_BLOCK: new_blocked_set = blocked_set | *set; break; case SIG_SETMASK: new_blocked_set = *set; break; case SIG_UNBLOCK: new_blocked_set = blocked_set & ~*set; break; default: errno = EINVAL; return -1; } to_unblock = blocked_set & ~new_blocked_set; to_block = new_blocked_set & ~blocked_set; if (to_block != 0) { int sig; for (sig = 0; sig < NSIG; sig++) if ((to_block >> sig) & 1) { pending_array[sig] = 0; if ((old_handlers[sig] = signal (sig, blocked_handler)) != SIG_ERR) blocked_set |= 1U << sig; } } if (to_unblock != 0) { sig_atomic_t received[NSIG]; int sig; for (sig = 0; sig < NSIG; sig++) if ((to_unblock >> sig) & 1) { if (signal (sig, old_handlers[sig]) != blocked_handler) /* The application changed a signal handler while the signal was blocked, bypassing our rpl_signal replacement. We don't support this. */ abort (); received[sig] = pending_array[sig]; blocked_set &= ~(1U << sig); pending_array[sig] = 0; } else received[sig] = 0; for (sig = 0; sig < NSIG; sig++) if (received[sig]) raise (sig); } } return 0; } /* Install the handler FUNC for signal SIG, and return the previous handler. */ handler_t rpl_signal (int sig, handler_t handler) { /* We must provide a wrapper, so that a user can query what handler they installed even if that signal is currently blocked. */ if (sig >= 0 && sig < NSIG && sig != SIGKILL && sig != SIGSTOP && handler != SIG_ERR) { #ifdef SIGABRT_COMPAT if (sig == SIGABRT_COMPAT) sig = SIGABRT; #endif if (blocked_set & (1U << sig)) { /* POSIX states that sigprocmask and signal are both async-signal-safe. This is not true of our implementation - there is a slight data race where an asynchronous interrupt on signal A can occur after we install blocked_handler but before we have updated old_handlers for signal B, such that handler A can see stale information if it calls signal(B). Oh well - signal handlers really shouldn't try to manipulate the installed handlers of unrelated signals. */ handler_t result = old_handlers[sig]; old_handlers[sig] = handler; return result; } else return signal (sig, handler); } else { errno = EINVAL; return SIG_ERR; } } #if GNULIB_defined_SIGPIPE /* Raise the signal SIG. */ int rpl_raise (int sig) # undef raise { switch (sig) { case SIGPIPE: if (blocked_set & (1U << sig)) pending_array[sig] = 1; else { handler_t handler = SIGPIPE_handler; if (handler == SIG_DFL) exit (128 + SIGPIPE); else if (handler != SIG_IGN) (*handler) (sig); } return 0; default: /* System defined signal */ return raise (sig); } } #endif gnuit-4.9.5/lib/strcasestr.c0000644000175000017500000000556211146671375012732 00000000000000/* Case-insensitive searching in a string. Copyright (C) 2005-2008 Free Software Foundation, Inc. Written by Bruno Haible , 2005. 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 3, 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. */ #include /* Specification. */ #include #include #include #include #define TOLOWER(Ch) (isupper (Ch) ? tolower (Ch) : (Ch)) /* Two-Way algorithm. */ #define RETURN_TYPE char * #define AVAILABLE(h, h_l, j, n_l) \ (!memchr ((h) + (h_l), '\0', (j) + (n_l) - (h_l)) \ && ((h_l) = (j) + (n_l))) #define CANON_ELEMENT(c) TOLOWER (c) #define CMP_FUNC(p1, p2, l) \ strncasecmp ((const char *) (p1), (const char *) (p2), l) #include "str-two-way.h" /* Find the first occurrence of NEEDLE in HAYSTACK, using case-insensitive comparison. This function gives unspecified results in multibyte locales. */ char * strcasestr (const char *haystack_start, const char *needle_start) { const char *haystack = haystack_start; const char *needle = needle_start; size_t needle_len; /* Length of NEEDLE. */ size_t haystack_len; /* Known minimum length of HAYSTACK. */ bool ok = true; /* True if NEEDLE is prefix of HAYSTACK. */ /* Determine length of NEEDLE, and in the process, make sure HAYSTACK is at least as long (no point processing all of a long NEEDLE if HAYSTACK is too short). */ while (*haystack && *needle) { ok &= (TOLOWER ((unsigned char) *haystack) == TOLOWER ((unsigned char) *needle)); haystack++; needle++; } if (*needle) return NULL; if (ok) return (char *) haystack_start; needle_len = needle - needle_start; haystack = haystack_start + 1; haystack_len = needle_len - 1; /* Perform the search. Abstract memory is considered to be an array of 'unsigned char' values, not an array of 'char' values. See ISO C 99 section 6.2.6.1. */ if (needle_len < LONG_NEEDLE_THRESHOLD) return two_way_short_needle ((const unsigned char *) haystack, haystack_len, (const unsigned char *) needle_start, needle_len); return two_way_long_needle ((const unsigned char *) haystack, haystack_len, (const unsigned char *) needle_start, needle_len); } #undef LONG_NEEDLE_THRESHOLD gnuit-4.9.5/lib/quotearg.h0000644000175000017500000002731511146671375012371 00000000000000/* quotearg.h - quote arguments for output Copyright (C) 1998, 1999, 2000, 2001, 2002, 2004, 2006, 2008 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 3 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, see . */ /* Written by Paul Eggert */ #ifndef QUOTEARG_H_ # define QUOTEARG_H_ 1 # include /* Basic quoting styles. For each style, an example is given on the input strings "simple", "\0 \t\n'\"\033?""?/\\", and "a:b", using quotearg_buffer, quotearg_mem, and quotearg_colon_mem with that style and the default flags and quoted characters. Note that the examples are shown here as valid C strings rather than what displays on a terminal (with "??/" as a trigraph for "\\"). */ enum quoting_style { /* Output names as-is (ls --quoting-style=literal). Can result in embedded null bytes if QA_ELIDE_NULL_BYTES is not in effect. quotearg_buffer: "simple", "\0 \t\n'\"\033??/\\", "a:b" quotearg: "simple", " \t\n'\"\033??/\\", "a:b" quotearg_colon: "simple", " \t\n'\"\033??/\\", "a:b" */ literal_quoting_style, /* Quote names for the shell if they contain shell metacharacters or would cause ambiguous output (ls --quoting-style=shell). Can result in embedded null bytes if QA_ELIDE_NULL_BYTES is not in effect. quotearg_buffer: "simple", "'\0 \t\n'\\''\"\033??/\\'", "a:b" quotearg: "simple", "' \t\n'\\''\"\033??/\\'", "a:b" quotearg_colon: "simple", "' \t\n'\\''\"\033??/\\'", "'a:b'" */ shell_quoting_style, /* Quote names for the shell, even if they would normally not require quoting (ls --quoting-style=shell-always). Can result in embedded null bytes if QA_ELIDE_NULL_BYTES is not in effect. Behaves like shell_quoting_style if QA_ELIDE_OUTER_QUOTES is in effect. quotearg_buffer: "'simple'", "'\0 \t\n'\\''\"\033??/\\'", "'a:b'" quotearg: "'simple'", "' \t\n'\\''\"\033??/\\'", "'a:b'" quotearg_colon: "'simple'", "' \t\n'\\''\"\033??/\\'", "'a:b'" */ shell_always_quoting_style, /* Quote names as for a C language string (ls --quoting-style=c). Behaves like c_maybe_quoting_style if QA_ELIDE_OUTER_QUOTES is in effect. Split into consecutive strings if QA_SPLIT_TRIGRAPHS. quotearg_buffer: "\"simple\"", "\"\\0 \\t\\n'\\\"\\033??/\\\\\"", "\"a:b\"" quotearg: "\"simple\"", "\"\\0 \\t\\n'\\\"\\033??/\\\\\"", "\"a:b\"" quotearg_colon: "\"simple\"", "\"\\0 \\t\\n'\\\"\\033??/\\\\\"", "\"a\\:b\"" */ c_quoting_style, /* Like c_quoting_style except omit the surrounding double-quote characters if no quoted characters are encountered. quotearg_buffer: "simple", "\"\\0 \\t\\n'\\\"\\033??/\\\\\"", "a:b" quotearg: "simple", "\"\\0 \\t\\n'\\\"\\033??/\\\\\"", "a:b" quotearg_colon: "simple", "\"\\0 \\t\\n'\\\"\\033??/\\\\\"", "\"a:b\"" */ c_maybe_quoting_style, /* Like c_quoting_style except always omit the surrounding double-quote characters (ls --quoting-style=escape). quotearg_buffer: "simple", "\\0 \\t\\n'\"\\033??/\\\\", "a:b" quotearg: "simple", "\\0 \\t\\n'\"\\033??/\\\\", "a:b" quotearg_colon: "simple", "\\0 \\t\\n'\"\\033??/\\\\", "a\\:b" */ escape_quoting_style, /* Like clocale_quoting_style, but quote `like this' instead of "like this" in the default C locale (ls --quoting-style=locale). LC_MESSAGES=C quotearg_buffer: "`simple'", "`\\0 \\t\\n\\'\"\\033??/\\\\'", "`a:b'" quotearg: "`simple'", "`\\0 \\t\\n\\'\"\\033??/\\\\'", "`a:b'" quotearg_colon: "`simple'", "`\\0 \\t\\n\\'\"\\033??/\\\\'", "`a\\:b'" LC_MESSAGES=pt_PT.utf8 quotearg_buffer: "\302\253simple\302\273", "\302\253\\0 \\t\\n'\"\\033??/\\\\\302\253", "\302\253a:b\302\273" quotearg: "\302\253simple\302\273", "\302\253\\0 \\t\\n'\"\\033??/\\\\\302\253", "\302\253a:b\302\273" quotearg_colon: "\302\253simple\302\273", "\302\253\\0 \\t\\n'\"\\033??/\\\\\302\253", "\302\253a\\:b\302\273" */ locale_quoting_style, /* Like c_quoting_style except use quotation marks appropriate for the locale (ls --quoting-style=clocale). LC_MESSAGES=C quotearg_buffer: "\"simple\"", "\"\\0 \\t\\n'\\\"\\033??/\\\\\"", "\"a:b\"" quotearg: "\"simple\"", "\"\\0 \\t\\n'\\\"\\033??/\\\\\"", "\"a:b\"" quotearg_colon: "\"simple\"", "\"\\0 \\t\\n'\\\"\\033??/\\\\\"", "\"a\\:b\"" LC_MESSAGES=pt_PT.utf8 quotearg_buffer: "\302\253simple\302\273", "\302\253\\0 \\t\\n'\"\\033??/\\\\\302\253", "\302\253a:b\302\273" quotearg: "\302\253simple\302\273", "\302\253\\0 \\t\\n'\"\\033??/\\\\\302\253", "\302\253a:b\302\273" quotearg_colon: "\302\253simple\302\273", "\302\253\\0 \\t\\n'\"\\033??/\\\\\302\253", "\302\253a\\:b\302\273" */ clocale_quoting_style }; /* Flags for use in set_quoting_flags. */ enum quoting_flags { /* Always elide null bytes from styles that do not quote them, even when the length of the result is available to the caller. */ QA_ELIDE_NULL_BYTES = 0x01, /* Omit the surrounding quote characters if no escaped characters are encountered. Note that if no other character needs escaping, then neither does the escape character. */ QA_ELIDE_OUTER_QUOTES = 0x02, /* In the c_quoting_style and c_maybe_quoting_style, split ANSI trigraph sequences into concatenated strings (for example, "?""?/" rather than "??/", which could be confused with "\\"). */ QA_SPLIT_TRIGRAPHS = 0x04 }; /* For now, --quoting-style=literal is the default, but this may change. */ # ifndef DEFAULT_QUOTING_STYLE # define DEFAULT_QUOTING_STYLE literal_quoting_style # endif /* Names of quoting styles and their corresponding values. */ extern char const *const quoting_style_args[]; extern enum quoting_style const quoting_style_vals[]; struct quoting_options; /* The functions listed below set and use a hidden variable that contains the default quoting style options. */ /* Allocate a new set of quoting options, with contents initially identical to O if O is not null, or to the default if O is null. It is the caller's responsibility to free the result. */ struct quoting_options *clone_quoting_options (struct quoting_options *o); /* Get the value of O's quoting style. If O is null, use the default. */ enum quoting_style get_quoting_style (struct quoting_options *o); /* In O (or in the default if O is null), set the value of the quoting style to S. */ void set_quoting_style (struct quoting_options *o, enum quoting_style s); /* In O (or in the default if O is null), set the value of the quoting options for character C to I. Return the old value. Currently, the only values defined for I are 0 (the default) and 1 (which means to quote the character even if it would not otherwise be quoted). */ int set_char_quoting (struct quoting_options *o, char c, int i); /* In O (or in the default if O is null), set the value of the quoting options flag to I, which can be a bitwise combination of enum quoting_flags, or 0 for default behavior. Return the old value. */ int set_quoting_flags (struct quoting_options *o, int i); /* Place into buffer BUFFER (of size BUFFERSIZE) a quoted version of argument ARG (of size ARGSIZE), using O to control quoting. If O is null, use the default. Terminate the output with a null character, and return the written size of the output, not counting the terminating null. If BUFFERSIZE is too small to store the output string, return the value that would have been returned had BUFFERSIZE been large enough. If ARGSIZE is -1, use the string length of the argument for ARGSIZE. On output, BUFFER might contain embedded null bytes if ARGSIZE was not -1, the style of O does not use backslash escapes, and the flags of O do not request elision of null bytes.*/ size_t quotearg_buffer (char *buffer, size_t buffersize, char const *arg, size_t argsize, struct quoting_options const *o); /* Like quotearg_buffer, except return the result in a newly allocated buffer. It is the caller's responsibility to free the result. The result will not contain embedded null bytes. */ char *quotearg_alloc (char const *arg, size_t argsize, struct quoting_options const *o); /* Like quotearg_alloc, except that the length of the result, excluding the terminating null byte, is stored into SIZE if it is non-NULL. The result might contain embedded null bytes if ARGSIZE was not -1, SIZE was not NULL, the style of O does not use backslash escapes, and the flags of O do not request elision of null bytes.*/ char *quotearg_alloc_mem (char const *arg, size_t argsize, size_t *size, struct quoting_options const *o); /* Use storage slot N to return a quoted version of the string ARG. Use the default quoting options. The returned value points to static storage that can be reused by the next call to this function with the same value of N. N must be nonnegative. The output of all functions in the quotearg_n family are guaranteed to not contain embedded null bytes.*/ char *quotearg_n (int n, char const *arg); /* Equivalent to quotearg_n (0, ARG). */ char *quotearg (char const *arg); /* Use storage slot N to return a quoted version of the argument ARG of size ARGSIZE. This is like quotearg_n (N, ARG), except it can quote null bytes. */ char *quotearg_n_mem (int n, char const *arg, size_t argsize); /* Equivalent to quotearg_n_mem (0, ARG, ARGSIZE). */ char *quotearg_mem (char const *arg, size_t argsize); /* Use style S and storage slot N to return a quoted version of the string ARG. This is like quotearg_n (N, ARG), except that it uses S with no other options to specify the quoting method. */ char *quotearg_n_style (int n, enum quoting_style s, char const *arg); /* Use style S and storage slot N to return a quoted version of the argument ARG of size ARGSIZE. This is like quotearg_n_style (N, S, ARG), except it can quote null bytes. */ char *quotearg_n_style_mem (int n, enum quoting_style s, char const *arg, size_t argsize); /* Equivalent to quotearg_n_style (0, S, ARG). */ char *quotearg_style (enum quoting_style s, char const *arg); /* Equivalent to quotearg_n_style_mem (0, S, ARG, ARGSIZE). */ char *quotearg_style_mem (enum quoting_style s, char const *arg, size_t argsize); /* Like quotearg (ARG), except also quote any instances of CH. */ char *quotearg_char (char const *arg, char ch); /* Like quotearg_char (ARG, CH), except it can quote null bytes. */ char *quotearg_char_mem (char const *arg, size_t argsize, char ch); /* Equivalent to quotearg_char (ARG, ':'). */ char *quotearg_colon (char const *arg); /* Like quotearg_colon (ARG), except it can quote null bytes. */ char *quotearg_colon_mem (char const *arg, size_t argsize); /* Free any dynamically allocated memory. */ void quotearg_free (void); #endif /* !QUOTEARG_H_ */ gnuit-4.9.5/lib/argmatch.h0000644000175000017500000000675411146671375012334 00000000000000/* argmatch.h -- definitions and prototypes for argmatch.c Copyright (C) 1990, 1998, 1999, 2001, 2002, 2004, 2005 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 3 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, see . */ /* Written by David MacKenzie Modified by Akim Demaille */ #ifndef ARGMATCH_H_ # define ARGMATCH_H_ 1 # include # include "verify.h" # define ARRAY_CARDINALITY(Array) (sizeof (Array) / sizeof *(Array)) /* Assert there are as many real arguments as there are values (argument list ends with a NULL guard). */ # define ARGMATCH_VERIFY(Arglist, Vallist) \ verify (ARRAY_CARDINALITY (Arglist) == ARRAY_CARDINALITY (Vallist) + 1) /* Return the index of the element of ARGLIST (NULL terminated) that matches with ARG. If VALLIST is not NULL, then use it to resolve false ambiguities (i.e., different matches of ARG but corresponding to the same values in VALLIST). */ ptrdiff_t argmatch (char const *arg, char const *const *arglist, char const *vallist, size_t valsize); # define ARGMATCH(Arg, Arglist, Vallist) \ argmatch (Arg, Arglist, (char const *) (Vallist), sizeof *(Vallist)) /* xargmatch calls this function when it fails. This function should not return. By default, this is a function that calls ARGMATCH_DIE which in turn defaults to `exit (exit_failure)'. */ typedef void (*argmatch_exit_fn) (void); extern argmatch_exit_fn argmatch_die; /* Report on stderr why argmatch failed. Report correct values. */ void argmatch_invalid (char const *context, char const *value, ptrdiff_t problem); /* Left for compatibility with the old name invalid_arg */ # define invalid_arg(Context, Value, Problem) \ argmatch_invalid (Context, Value, Problem) /* Report on stderr the list of possible arguments. */ void argmatch_valid (char const *const *arglist, char const *vallist, size_t valsize); # define ARGMATCH_VALID(Arglist, Vallist) \ argmatch_valid (Arglist, (char const *) (Vallist), sizeof *(Vallist)) /* Same as argmatch, but upon failure, reports a explanation on the failure, and exits using the function EXIT_FN. */ ptrdiff_t __xargmatch_internal (char const *context, char const *arg, char const *const *arglist, char const *vallist, size_t valsize, argmatch_exit_fn exit_fn); /* Programmer friendly interface to __xargmatch_internal. */ # define XARGMATCH(Context, Arg, Arglist, Vallist) \ ((Vallist) [__xargmatch_internal (Context, Arg, Arglist, \ (char const *) (Vallist), \ sizeof *(Vallist), \ argmatch_die)]) /* Convert a value into a corresponding argument. */ char const *argmatch_to_argument (char const *value, char const *const *arglist, char const *vallist, size_t valsize); # define ARGMATCH_TO_ARGUMENT(Value, Arglist, Vallist) \ argmatch_to_argument (Value, Arglist, \ (char const *) (Vallist), sizeof *(Vallist)) #endif /* ARGMATCH_H_ */ gnuit-4.9.5/lib/strtoull.c0000644000175000017500000000201211146671375012410 00000000000000/* Function to parse an `unsigned long long int' from text. Copyright (C) 1995, 1996, 1997, 1999 Free Software Foundation, Inc. NOTE: The canonical source of this file is maintained with the GNU C Library. Bugs can be reported to bug-glibc@gnu.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 3 of the License, or 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, see . */ #define QUAD 1 #include "strtoul.c" #ifdef _LIBC strong_alias (__strtoull_internal, __strtouq_internal) weak_alias (strtoull, strtouq) #endif gnuit-4.9.5/lib/stdbool.in.h0000644000175000017500000001145211146671375012610 00000000000000/* Copyright (C) 2001-2003, 2006-2008 Free Software Foundation, Inc. Written by Bruno Haible , 2001. 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 3, 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. */ #ifndef _GL_STDBOOL_H #define _GL_STDBOOL_H /* ISO C 99 for platforms that lack it. */ /* Usage suggestions: Programs that use should be aware of some limitations and standards compliance issues. Standards compliance: - must be #included before 'bool', 'false', 'true' can be used. - You cannot assume that sizeof (bool) == 1. - Programs should not undefine the macros bool, true, and false, as C99 lists that as an "obsolescent feature". Limitations of this substitute, when used in a C89 environment: - must be #included before the '_Bool' type can be used. - You cannot assume that _Bool is a typedef; it might be a macro. - Bit-fields of type 'bool' are not supported. Portable code should use 'unsigned int foo : 1;' rather than 'bool foo : 1;'. - In C99, casts and automatic conversions to '_Bool' or 'bool' are performed in such a way that every nonzero value gets converted to 'true', and zero gets converted to 'false'. This doesn't work with this substitute. With this substitute, only the values 0 and 1 give the expected result when converted to _Bool' or 'bool'. Also, it is suggested that programs use 'bool' rather than '_Bool'; this isn't required, but 'bool' is more common. */ /* 7.16. Boolean type and values */ /* BeOS already #defines false 0, true 1. We use the same definitions below, but temporarily we have to #undef them. */ #if defined __BEOS__ && !defined __HAIKU__ # include /* defines bool but not _Bool */ # undef false # undef true #endif /* For the sake of symbolic names in gdb, we define true and false as enum constants, not only as macros. It is tempting to write typedef enum { false = 0, true = 1 } _Bool; so that gdb prints values of type 'bool' symbolically. But if we do this, values of type '_Bool' may promote to 'int' or 'unsigned int' (see ISO C 99 6.7.2.2.(4)); however, '_Bool' must promote to 'int' (see ISO C 99 6.3.1.1.(2)). So we add a negative value to the enum; this ensures that '_Bool' promotes to 'int'. */ #if defined __cplusplus || (defined __BEOS__ && !defined __HAIKU__) /* A compiler known to have 'bool'. */ /* If the compiler already has both 'bool' and '_Bool', we can assume they are the same types. */ # if !@HAVE__BOOL@ typedef bool _Bool; # endif #else # if !defined __GNUC__ /* If @HAVE__BOOL@: Some HP-UX cc and AIX IBM C compiler versions have compiler bugs when the built-in _Bool type is used. See http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html http://lists.gnu.org/archive/html/bug-coreutils/2005-10/msg00086.html Similar bugs are likely with other compilers as well; this file wouldn't be used if was working. So we override the _Bool type. If !@HAVE__BOOL@: Need to define _Bool ourselves. As 'signed char' or as an enum type? Use of a typedef, with SunPRO C, leads to a stupid "warning: _Bool is a keyword in ISO C99". Use of an enum type, with IRIX cc, leads to a stupid "warning(1185): enumerated type mixed with another type". Even the existence of an enum type, without a typedef, "Invalid enumerator. (badenum)" with HP-UX cc on Tru64. The only benefit of the enum, debuggability, is not important with these compilers. So use 'signed char' and no enum. */ # define _Bool signed char # else /* With this compiler, trust the _Bool type if the compiler has it. */ # if !@HAVE__BOOL@ typedef enum { _Bool_must_promote_to_int = -1, false = 0, true = 1 } _Bool; # endif # endif #endif #define bool _Bool /* The other macros must be usable in preprocessor directives. */ #define false 0 #define true 1 #define __bool_true_false_are_defined 1 #endif /* _GL_STDBOOL_H */ gnuit-4.9.5/lib/malloca.valgrind0000644000175000017500000000025711146671375013525 00000000000000# Suppress a valgrind message about use of uninitialized memory in freea(). # This use is OK because it provides only a speedup. { freea Memcheck:Cond fun:freea } gnuit-4.9.5/lib/getopt1.c0000644000175000017500000000753211146671375012117 00000000000000/* getopt_long and getopt_long_only entry points for GNU getopt. Copyright (C) 1987,88,89,90,91,92,93,94,96,97,98,2004,2006 Free Software Foundation, Inc. This file is part of the GNU C Library. 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 3 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, see . */ #ifdef _LIBC # include #else # include # include "getopt.h" #endif #include "getopt_int.h" #include /* This needs to come after some library #include to get __GNU_LIBRARY__ defined. */ #ifdef __GNU_LIBRARY__ #include #endif #ifndef NULL #define NULL 0 #endif int getopt_long (int argc, char *__getopt_argv_const *argv, const char *options, const struct option *long_options, int *opt_index) { return _getopt_internal (argc, (char **) argv, options, long_options, opt_index, 0, 0); } int _getopt_long_r (int argc, char **argv, const char *options, const struct option *long_options, int *opt_index, struct _getopt_data *d) { return _getopt_internal_r (argc, argv, options, long_options, opt_index, 0, 0, d); } /* Like getopt_long, but '-' as well as '--' can indicate a long option. If an option that starts with '-' (not '--') doesn't match a long option, but does match a short option, it is parsed as a short option instead. */ int getopt_long_only (int argc, char *__getopt_argv_const *argv, const char *options, const struct option *long_options, int *opt_index) { return _getopt_internal (argc, (char **) argv, options, long_options, opt_index, 1, 0); } int _getopt_long_only_r (int argc, char **argv, const char *options, const struct option *long_options, int *opt_index, struct _getopt_data *d) { return _getopt_internal_r (argc, argv, options, long_options, opt_index, 1, 0, d); } #ifdef TEST #include int main (int argc, char **argv) { int c; int digit_optind = 0; while (1) { int this_option_optind = optind ? optind : 1; int option_index = 0; static struct option long_options[] = { {"add", 1, 0, 0}, {"append", 0, 0, 0}, {"delete", 1, 0, 0}, {"verbose", 0, 0, 0}, {"create", 0, 0, 0}, {"file", 1, 0, 0}, {0, 0, 0, 0} }; c = getopt_long (argc, argv, "abc:d:0123456789", long_options, &option_index); if (c == -1) break; switch (c) { case 0: printf ("option %s", long_options[option_index].name); if (optarg) printf (" with arg %s", optarg); printf ("\n"); break; case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': if (digit_optind != 0 && digit_optind != this_option_optind) printf ("digits occur in two different argv-elements.\n"); digit_optind = this_option_optind; printf ("option %c\n", c); break; case 'a': printf ("option a\n"); break; case 'b': printf ("option b\n"); break; case 'c': printf ("option c with value `%s'\n", optarg); break; case 'd': printf ("option d with value `%s'\n", optarg); break; case '?': break; default: printf ("?? getopt returned character code 0%o ??\n", c); } } if (optind < argc) { printf ("non-option ARGV-elements: "); while (optind < argc) printf ("%s ", argv[optind++]); printf ("\n"); } exit (0); } #endif /* TEST */ gnuit-4.9.5/lib/uniwidth.h0000644000175000017500000000361411146671375012371 00000000000000/* Display width functions. Copyright (C) 2001-2002, 2005, 2007 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 3 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 Lesser General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ #ifndef _UNIWIDTH_H #define _UNIWIDTH_H #include "unitypes.h" /* Get size_t. */ #include /* Get locale_charset() declaration. */ #include "localcharset.h" #ifdef __cplusplus extern "C" { #endif /* Display width. */ /* These functions are locale dependent. The encoding argument identifies the encoding (e.g. "ISO-8859-2" for Polish). */ /* Determine number of column positions required for UC. */ extern int uc_width (ucs4_t uc, const char *encoding); /* Determine number of column positions required for first N units (or fewer if S ends before this) in S. */ extern int u8_width (const uint8_t *s, size_t n, const char *encoding); extern int u16_width (const uint16_t *s, size_t n, const char *encoding); extern int u32_width (const uint32_t *s, size_t n, const char *encoding); /* Determine number of column positions required for S. */ extern int u8_strwidth (const uint8_t *s, const char *encoding); extern int u16_strwidth (const uint16_t *s, const char *encoding); extern int u32_strwidth (const uint32_t *s, const char *encoding); #ifdef __cplusplus } #endif #endif /* _UNIWIDTH_H */ gnuit-4.9.5/lib/verify.h0000644000175000017500000001271711146671375012046 00000000000000/* Compile-time assert-like macros. Copyright (C) 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 3 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, see . */ /* Written by Paul Eggert, Bruno Haible, and Jim Meyering. */ #ifndef VERIFY_H # define VERIFY_H 1 /* Each of these macros verifies that its argument R is nonzero. To be portable, R should be an integer constant expression. Unlike assert (R), there is no run-time overhead. There are two macros, since no single macro can be used in all contexts in C. verify_true (R) is for scalar contexts, including integer constant expression contexts. verify (R) is for declaration contexts, e.g., the top level. Symbols ending in "__" are private to this header. The code below uses several ideas. * The first step is ((R) ? 1 : -1). Given an expression R, of integral or boolean or floating-point type, this yields an expression of integral type, whose value is later verified to be constant and nonnegative. * Next this expression W is wrapped in a type struct verify_type__ { unsigned int verify_error_if_negative_size__: W; }. If W is negative, this yields a compile-time error. No compiler can deal with a bit-field of negative size. One might think that an array size check would have the same effect, that is, that the type struct { unsigned int dummy[W]; } would work as well. However, inside a function, some compilers (such as C++ compilers and GNU C) allow local parameters and variables inside array size expressions. With these compilers, an array size check would not properly diagnose this misuse of the verify macro: void function (int n) { verify (n < 0); } * For the verify macro, the struct verify_type__ will need to somehow be embedded into a declaration. To be portable, this declaration must declare an object, a constant, a function, or a typedef name. If the declared entity uses the type directly, such as in struct dummy {...}; typedef struct {...} dummy; extern struct {...} *dummy; extern void dummy (struct {...} *); extern struct {...} *dummy (void); two uses of the verify macro would yield colliding declarations if the entity names are not disambiguated. A workaround is to attach the current line number to the entity name: #define GL_CONCAT0(x, y) x##y #define GL_CONCAT(x, y) GL_CONCAT0 (x, y) extern struct {...} * GL_CONCAT(dummy,__LINE__); But this has the problem that two invocations of verify from within the same macro would collide, since the __LINE__ value would be the same for both invocations. A solution is to use the sizeof operator. It yields a number, getting rid of the identity of the type. Declarations like extern int dummy [sizeof (struct {...})]; extern void dummy (int [sizeof (struct {...})]); extern int (*dummy (void)) [sizeof (struct {...})]; can be repeated. * Should the implementation use a named struct or an unnamed struct? Which of the following alternatives can be used? extern int dummy [sizeof (struct {...})]; extern int dummy [sizeof (struct verify_type__ {...})]; extern void dummy (int [sizeof (struct {...})]); extern void dummy (int [sizeof (struct verify_type__ {...})]); extern int (*dummy (void)) [sizeof (struct {...})]; extern int (*dummy (void)) [sizeof (struct verify_type__ {...})]; In the second and sixth case, the struct type is exported to the outer scope; two such declarations therefore collide. GCC warns about the first, third, and fourth cases. So the only remaining possibility is the fifth case: extern int (*dummy (void)) [sizeof (struct {...})]; * This implementation exploits the fact that GCC does not warn about the last declaration mentioned above. If a future version of GCC introduces a warning for this, the problem could be worked around by using code specialized to GCC, e.g.,: #if 4 <= __GNUC__ # define verify(R) \ extern int (* verify_function__ (void)) \ [__builtin_constant_p (R) && (R) ? 1 : -1] #endif * In C++, any struct definition inside sizeof is invalid. Use a template type to work around the problem. */ /* Verify requirement R at compile-time, as an integer constant expression. Return 1. */ # ifdef __cplusplus template struct verify_type__ { unsigned int verify_error_if_negative_size__: w; }; # define verify_true(R) \ (!!sizeof (verify_type__<(R) ? 1 : -1>)) # else # define verify_true(R) \ (!!sizeof \ (struct { unsigned int verify_error_if_negative_size__: (R) ? 1 : -1; })) # endif /* Verify requirement R at compile-time, as a declaration without a trailing ';'. */ # define verify(R) extern int (* verify_function__ (void)) [verify_true (R)] #endif gnuit-4.9.5/lib/fsusage.h0000644000175000017500000000270411146671375012172 00000000000000/* fsusage.h -- declarations for file system space usage info Copyright (C) 1991, 1992, 1997, 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 3 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, see . */ /* Space usage statistics for a file system. Blocks are 512-byte. */ #if !defined FSUSAGE_H_ # define FSUSAGE_H_ # include # include struct fs_usage { uintmax_t fsu_blocksize; /* Size of a block. */ uintmax_t fsu_blocks; /* Total blocks. */ uintmax_t fsu_bfree; /* Free blocks available to superuser. */ uintmax_t fsu_bavail; /* Free blocks available to non-superuser. */ bool fsu_bavail_top_bit_set; /* 1 if fsu_bavail represents a value < 0. */ uintmax_t fsu_files; /* Total file nodes. */ uintmax_t fsu_ffree; /* Free file nodes. */ }; int get_fs_usage (char const *file, char const *disk, struct fs_usage *fsp); #endif gnuit-4.9.5/lib/sigaction.c0000644000175000017500000001610511146671375012510 00000000000000/* POSIX compatible signal blocking. Copyright (C) 2008 Free Software Foundation, Inc. Written by Eric Blake , 2008. 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 3 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, see . */ #include /* Specification. */ #include #include #include #include /* This implementation of sigaction is tailored to Woe32 behavior: signal() has SysV semantics (ie. the handler is uninstalled before it is invoked). This is an inherent data race if an asynchronous signal is sent twice in a row before we can reinstall our handler, but there's nothing we can do about it. Meanwhile, sigprocmask() is not present, and while we can use the gnulib replacement to provide critical sections, it too suffers from potential data races in the face of an ill-timed asynchronous signal. And we compound the situation by reading static storage in a signal handler, which POSIX warns is not generically async-signal-safe. Oh well. Additionally: - We don't implement SA_NOCLDSTOP or SA_NOCLDWAIT, because SIGCHLD is not defined. - We don't implement SA_ONSTACK, because sigaltstack() is not present. - We ignore SA_RESTART, because blocking Win32 calls are not interrupted anyway when an asynchronous signal occurs, and the MSVCRT runtime never sets errno to EINTR. - We don't implement SA_SIGINFO because it is impossible to do so portably. POSIX states that an application should not mix signal() and sigaction(). We support the use of signal() within the gnulib sigprocmask() substitute, but all other application code linked with this module should stick with only sigaction(). */ /* Check some of our assumptions. */ #if defined SIGCHLD || defined HAVE_SIGALTSTACK || defined HAVE_SIGINTERRUPT # error "Revisit the assumptions made in the sigaction module" #endif /* Out-of-range substitutes make a good fallback for uncatchable signals. */ #ifndef SIGKILL # define SIGKILL (-1) #endif #ifndef SIGSTOP # define SIGSTOP (-1) #endif /* On native Windows, as of 2008, the signal SIGABRT_COMPAT is an alias for the signal SIGABRT. Only one signal handler is stored for both SIGABRT and SIGABRT_COMPAT. SIGABRT_COMPAT is not a signal of its own. */ #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ # undef SIGABRT_COMPAT # define SIGABRT_COMPAT 6 #endif /* A signal handler. */ typedef void (*handler_t) (int signal); /* Set of current actions. If sa_handler for an entry is NULL, then that signal is not currently handled by the sigaction handler. */ static struct sigaction volatile action_array[NSIG] /* = 0 */; /* Signal handler that is installed for signals. */ static void sigaction_handler (int sig) { handler_t handler; sigset_t mask; sigset_t oldmask; int saved_errno = errno; if (sig < 0 || NSIG <= sig || !action_array[sig].sa_handler) { /* Unexpected situation; be careful to avoid recursive abort. */ if (sig == SIGABRT) signal (SIGABRT, SIG_DFL); abort (); } /* Reinstall the signal handler when required; otherwise update the bookkeeping so that the user's handler may call sigaction and get accurate results. We know the signal isn't currently blocked, or we wouldn't be in its handler, therefore we know that we are not interrupting a sigaction() call. There is a race where any asynchronous instance of the same signal occurring before we reinstall the handler will trigger the default handler; oh well. */ handler = action_array[sig].sa_handler; if ((action_array[sig].sa_flags & SA_RESETHAND) == 0) signal (sig, sigaction_handler); else action_array[sig].sa_handler = NULL; /* Block appropriate signals. */ mask = action_array[sig].sa_mask; if ((action_array[sig].sa_flags & SA_NODEFER) == 0) sigaddset (&mask, sig); sigprocmask (SIG_BLOCK, &mask, &oldmask); /* Invoke the user's handler, then restore prior mask. */ errno = saved_errno; handler (sig); saved_errno = errno; sigprocmask (SIG_SETMASK, &oldmask, NULL); errno = saved_errno; } /* Change and/or query the action that will be taken on delivery of signal SIG. If not NULL, ACT describes the new behavior. If not NULL, OACT is set to the prior behavior. Return 0 on success, or set errno and return -1 on failure. */ int sigaction (int sig, const struct sigaction *restrict act, struct sigaction *restrict oact) { sigset_t mask; sigset_t oldmask; int saved_errno; if (sig < 0 || NSIG <= sig || sig == SIGKILL || sig == SIGSTOP || (act && act->sa_handler == SIG_ERR)) { errno = EINVAL; return -1; } #ifdef SIGABRT_COMPAT if (sig == SIGABRT_COMPAT) sig = SIGABRT; #endif /* POSIX requires sigaction() to be async-signal-safe. In other words, if an asynchronous signal can occur while we are anywhere inside this function, the user's handler could then call sigaction() recursively and expect consistent results. We meet this rule by using sigprocmask to block all signals before modifying any data structure that could be read from a signal handler; this works since we know that the gnulib sigprocmask replacement does not try to use sigaction() from its handler. */ if (!act && !oact) return 0; sigfillset (&mask); sigprocmask (SIG_BLOCK, &mask, &oldmask); if (oact) { if (action_array[sig].sa_handler) *oact = action_array[sig]; else { /* Safe to change the handler at will here, since all signals are currently blocked. */ oact->sa_handler = signal (sig, SIG_DFL); if (oact->sa_handler == SIG_ERR) goto failure; signal (sig, oact->sa_handler); oact->sa_flags = SA_RESETHAND | SA_NODEFER; sigemptyset (&oact->sa_mask); } } if (act) { /* Safe to install the handler before updating action_array, since all signals are currently blocked. */ if (act->sa_handler == SIG_DFL || act->sa_handler == SIG_IGN) { if (signal (sig, act->sa_handler) == SIG_ERR) goto failure; action_array[sig].sa_handler = NULL; } else { if (signal (sig, sigaction_handler) == SIG_ERR) goto failure; action_array[sig] = *act; } } sigprocmask (SIG_SETMASK, &oldmask, NULL); return 0; failure: saved_errno = errno; sigprocmask (SIG_SETMASK, &oldmask, NULL); errno = saved_errno; return -1; } gnuit-4.9.5/lib/getopt_int.h0000644000175000017500000001120311146671375012703 00000000000000/* Internal declarations for getopt. Copyright (C) 1989-1994,1996-1999,2001,2003,2004 Free Software Foundation, Inc. This file is part of the GNU C Library. 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 3 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, see . */ #ifndef _GETOPT_INT_H #define _GETOPT_INT_H 1 extern int _getopt_internal (int ___argc, char **___argv, const char *__shortopts, const struct option *__longopts, int *__longind, int __long_only, int __posixly_correct); /* Reentrant versions which can handle parsing multiple argument vectors at the same time. */ /* Data type for reentrant functions. */ struct _getopt_data { /* These have exactly the same meaning as the corresponding global variables, except that they are used for the reentrant versions of getopt. */ int optind; int opterr; int optopt; char *optarg; /* Internal members. */ /* True if the internal members have been initialized. */ int __initialized; /* The next char to be scanned in the option-element in which the last option character we returned was found. This allows us to pick up the scan where we left off. If this is zero, or a null string, it means resume the scan by advancing to the next ARGV-element. */ char *__nextchar; /* Describe how to deal with options that follow non-option ARGV-elements. If the caller did not specify anything, the default is REQUIRE_ORDER if the environment variable POSIXLY_CORRECT is defined, PERMUTE otherwise. REQUIRE_ORDER means don't recognize them as options; stop option processing when the first non-option is seen. This is what Unix does. This mode of operation is selected by either setting the environment variable POSIXLY_CORRECT, or using `+' as the first character of the list of option characters, or by calling getopt. PERMUTE is the default. We permute the contents of ARGV as we scan, so that eventually all the non-options are at the end. This allows options to be given in any order, even with programs that were not written to expect this. RETURN_IN_ORDER is an option available to programs that were written to expect options and other ARGV-elements in any order and that care about the ordering of the two. We describe each non-option ARGV-element as if it were the argument of an option with character code 1. Using `-' as the first character of the list of option characters selects this mode of operation. The special argument `--' forces an end of option-scanning regardless of the value of `ordering'. In the case of RETURN_IN_ORDER, only `--' can cause `getopt' to return -1 with `optind' != ARGC. */ enum { REQUIRE_ORDER, PERMUTE, RETURN_IN_ORDER } __ordering; /* If the POSIXLY_CORRECT environment variable is set or getopt was called. */ int __posixly_correct; /* Handle permutation of arguments. */ /* Describe the part of ARGV that contains non-options that have been skipped. `first_nonopt' is the index in ARGV of the first of them; `last_nonopt' is the index after the last of them. */ int __first_nonopt; int __last_nonopt; #if defined _LIBC && defined USE_NONOPTION_FLAGS int __nonoption_flags_max_len; int __nonoption_flags_len; # endif }; /* The initializer is necessary to set OPTIND and OPTERR to their default values and to clear the initialization flag. */ #define _GETOPT_DATA_INITIALIZER { 1, 1 } extern int _getopt_internal_r (int ___argc, char **___argv, const char *__shortopts, const struct option *__longopts, int *__longind, int __long_only, int __posixly_correct, struct _getopt_data *__data); extern int _getopt_long_r (int ___argc, char **___argv, const char *__shortopts, const struct option *__longopts, int *__longind, struct _getopt_data *__data); extern int _getopt_long_only_r (int ___argc, char **___argv, const char *__shortopts, const struct option *__longopts, int *__longind, struct _getopt_data *__data); #endif /* getopt_int.h */ gnuit-4.9.5/lib/utime.c0000644000175000017500000000515111146671375011652 00000000000000/* Copyright (C) 1998, 2001, 2002, 2003, 2004, 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 3 of the License, or 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, see . */ /* derived from a function in touch.c */ #include #undef utime #include #ifdef HAVE_UTIME_H # include #endif #if !HAVE_UTIMES_NULL # include # include #endif #include #include #include "full-write.h" #include "safe-read.h" /* Some systems (even some that do have ) don't declare this structure anywhere. */ #ifndef HAVE_STRUCT_UTIMBUF struct utimbuf { long actime; long modtime; }; #endif /* The results of open() in this file are not used with fchdir, therefore save some unnecessary work in fchdir.c. */ #undef open #undef close /* Emulate utime (file, NULL) for systems (like 4.3BSD) that do not interpret it to set the access and modification times of FILE to the current time. Return 0 if successful, -1 if not. */ static int utime_null (const char *file) { #if HAVE_UTIMES_NULL return utimes (file, 0); #else int fd; char c; int status = 0; struct stat st; int saved_errno = 0; fd = open (file, O_RDWR); if (fd < 0 || fstat (fd, &st) < 0 || safe_read (fd, &c, sizeof c) == SAFE_READ_ERROR || lseek (fd, (off_t) 0, SEEK_SET) < 0 || full_write (fd, &c, sizeof c) != sizeof c /* Maybe do this -- it's necessary on SunOS 4.1.3 with some combination of patches, but that system doesn't use this code: it has utimes. || fsync (fd) < 0 */ || (st.st_size == 0 && ftruncate (fd, st.st_size) < 0)) { saved_errno = errno; status = -1; } if (0 <= fd) { if (close (fd) < 0) status = -1; /* If there was a prior failure, use the saved errno value. But if the only failure was in the close, don't change errno. */ if (saved_errno) errno = saved_errno; } return status; #endif } int rpl_utime (const char *file, const struct utimbuf *times) { if (times) return utime (file, times); return utime_null (file); } gnuit-4.9.5/lib/dirname.h0000644000175000017500000000427711146671375012163 00000000000000/* Take file names apart into directory and base names. Copyright (C) 1998, 2001, 2003-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 3 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, see . */ #ifndef DIRNAME_H_ # define DIRNAME_H_ 1 # include # include # ifndef DIRECTORY_SEPARATOR # define DIRECTORY_SEPARATOR '/' # endif # ifndef ISSLASH # define ISSLASH(C) ((C) == DIRECTORY_SEPARATOR) # endif # ifndef FILE_SYSTEM_PREFIX_LEN # if FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX /* This internal macro assumes ASCII, but all hosts that support drive letters use ASCII. */ # define _IS_DRIVE_LETTER(c) (((unsigned int) (c) | ('a' - 'A')) - 'a' \ <= 'z' - 'a') # define FILE_SYSTEM_PREFIX_LEN(Filename) \ (_IS_DRIVE_LETTER ((Filename)[0]) && (Filename)[1] == ':' ? 2 : 0) # else # define FILE_SYSTEM_PREFIX_LEN(Filename) 0 # endif # endif # ifndef FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE # define FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE 0 # endif # ifndef DOUBLE_SLASH_IS_DISTINCT_ROOT # define DOUBLE_SLASH_IS_DISTINCT_ROOT 0 # endif # if FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE # define IS_ABSOLUTE_FILE_NAME(F) ISSLASH ((F)[FILE_SYSTEM_PREFIX_LEN (F)]) # else # define IS_ABSOLUTE_FILE_NAME(F) \ (ISSLASH ((F)[0]) || 0 < FILE_SYSTEM_PREFIX_LEN (F)) # endif # define IS_RELATIVE_FILE_NAME(F) (! IS_ABSOLUTE_FILE_NAME (F)) char *base_name (char const *file); char *dir_name (char const *file); size_t base_len (char const *file); size_t dir_len (char const *file); char *last_component (char const *file); bool strip_trailing_slashes (char *file); #endif /* not DIRNAME_H_ */ gnuit-4.9.5/lib/safe-write.h0000644000175000017500000000204611146671375012602 00000000000000/* An interface to write() that retries after interrupts. Copyright (C) 2002 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 3 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, see . */ #include #define SAFE_WRITE_ERROR ((size_t) -1) /* Write up to COUNT bytes at BUF to descriptor FD, retrying if interrupted. Return the actual number of bytes written, zero for EOF, or SAFE_WRITE_ERROR upon error. */ extern size_t safe_write (int fd, const void *buf, size_t count); gnuit-4.9.5/lib/xalloc.h0000644000175000017500000001773011146671375012024 00000000000000/* xalloc.h -- malloc with out-of-memory checking Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2003, 2004, 2006, 2007, 2008 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 3 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, see . */ #ifndef XALLOC_H_ # define XALLOC_H_ # include # ifdef __cplusplus extern "C" { # endif # ifndef __attribute__ # if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 8) # define __attribute__(x) # endif # endif # ifndef ATTRIBUTE_NORETURN # define ATTRIBUTE_NORETURN __attribute__ ((__noreturn__)) # endif # ifndef ATTRIBUTE_MALLOC # if __GNUC__ >= 3 # define ATTRIBUTE_MALLOC __attribute__ ((__malloc__)) # else # define ATTRIBUTE_MALLOC # endif # endif /* This function is always triggered when memory is exhausted. It must be defined by the application, either explicitly or by using gnulib's xalloc-die module. This is the function to call when one wants the program to die because of a memory allocation failure. */ extern void xalloc_die (void) ATTRIBUTE_NORETURN; void *xmalloc (size_t s) ATTRIBUTE_MALLOC; void *xzalloc (size_t s) ATTRIBUTE_MALLOC; void *xcalloc (size_t n, size_t s) ATTRIBUTE_MALLOC; void *xrealloc (void *p, size_t s); void *x2realloc (void *p, size_t *pn); void *xmemdup (void const *p, size_t s) ATTRIBUTE_MALLOC; char *xstrdup (char const *str) ATTRIBUTE_MALLOC; /* Return 1 if an array of N objects, each of size S, cannot exist due to size arithmetic overflow. S must be positive and N must be nonnegative. This is a macro, not an inline function, so that it works correctly even when SIZE_MAX < N. By gnulib convention, SIZE_MAX represents overflow in size calculations, so the conservative dividend to use here is SIZE_MAX - 1, since SIZE_MAX might represent an overflowed value. However, malloc (SIZE_MAX) fails on all known hosts where sizeof (ptrdiff_t) <= sizeof (size_t), so do not bother to test for exactly-SIZE_MAX allocations on such hosts; this avoids a test and branch when S is known to be 1. */ # define xalloc_oversized(n, s) \ ((size_t) (sizeof (ptrdiff_t) <= sizeof (size_t) ? -1 : -2) / (s) < (n)) /* In the following macros, T must be an elementary or structure/union or typedef'ed type, or a pointer to such a type. To apply one of the following macros to a function pointer or array type, you need to typedef it first and use the typedef name. */ /* Allocate an object of type T dynamically, with error checking. */ /* extern t *XMALLOC (typename t); */ # define XMALLOC(t) ((t *) xmalloc (sizeof (t))) /* Allocate memory for N elements of type T, with error checking. */ /* extern t *XNMALLOC (size_t n, typename t); */ # define XNMALLOC(n, t) \ ((t *) (sizeof (t) == 1 ? xmalloc (n) : xnmalloc (n, sizeof (t)))) /* Allocate an object of type T dynamically, with error checking, and zero it. */ /* extern t *XZALLOC (typename t); */ # define XZALLOC(t) ((t *) xzalloc (sizeof (t))) /* Allocate memory for N elements of type T, with error checking, and zero it. */ /* extern t *XCALLOC (size_t n, typename t); */ # define XCALLOC(n, t) \ ((t *) (sizeof (t) == 1 ? xzalloc (n) : xcalloc (n, sizeof (t)))) # if HAVE_INLINE # define static_inline static inline # else void *xnmalloc (size_t n, size_t s) ATTRIBUTE_MALLOC; void *xnrealloc (void *p, size_t n, size_t s); void *x2nrealloc (void *p, size_t *pn, size_t s); char *xcharalloc (size_t n) ATTRIBUTE_MALLOC; # endif # ifdef static_inline /* Allocate an array of N objects, each with S bytes of memory, dynamically, with error checking. S must be nonzero. */ static_inline void *xnmalloc (size_t n, size_t s) ATTRIBUTE_MALLOC; static_inline void * xnmalloc (size_t n, size_t s) { if (xalloc_oversized (n, s)) xalloc_die (); return xmalloc (n * s); } /* Change the size of an allocated block of memory P to an array of N objects each of S bytes, with error checking. S must be nonzero. */ static_inline void * xnrealloc (void *p, size_t n, size_t s) { if (xalloc_oversized (n, s)) xalloc_die (); return xrealloc (p, n * s); } /* If P is null, allocate a block of at least *PN such objects; otherwise, reallocate P so that it contains more than *PN objects each of S bytes. *PN must be nonzero unless P is null, and S must be nonzero. Set *PN to the new number of objects, and return the pointer to the new block. *PN is never set to zero, and the returned pointer is never null. Repeated reallocations are guaranteed to make progress, either by allocating an initial block with a nonzero size, or by allocating a larger block. In the following implementation, nonzero sizes are increased by a factor of approximately 1.5 so that repeated reallocations have O(N) overall cost rather than O(N**2) cost, but the specification for this function does not guarantee that rate. Here is an example of use: int *p = NULL; size_t used = 0; size_t allocated = 0; void append_int (int value) { if (used == allocated) p = x2nrealloc (p, &allocated, sizeof *p); p[used++] = value; } This causes x2nrealloc to allocate a block of some nonzero size the first time it is called. To have finer-grained control over the initial size, set *PN to a nonzero value before calling this function with P == NULL. For example: int *p = NULL; size_t used = 0; size_t allocated = 0; size_t allocated1 = 1000; void append_int (int value) { if (used == allocated) { p = x2nrealloc (p, &allocated1, sizeof *p); allocated = allocated1; } p[used++] = value; } */ static_inline void * x2nrealloc (void *p, size_t *pn, size_t s) { size_t n = *pn; if (! p) { if (! n) { /* The approximate size to use for initial small allocation requests, when the invoking code specifies an old size of zero. 64 bytes is the largest "small" request for the GNU C library malloc. */ enum { DEFAULT_MXFAST = 64 }; n = DEFAULT_MXFAST / s; n += !n; } } else { /* Set N = ceil (1.5 * N) so that progress is made if N == 1. Check for overflow, so that N * S stays in size_t range. The check is slightly conservative, but an exact check isn't worth the trouble. */ if ((size_t) -1 / 3 * 2 / s <= n) xalloc_die (); n += (n + 1) / 2; } *pn = n; return xrealloc (p, n * s); } /* Return a pointer to a new buffer of N bytes. This is like xmalloc, except it returns char *. */ static_inline char *xcharalloc (size_t n) ATTRIBUTE_MALLOC; static_inline char * xcharalloc (size_t n) { return XNMALLOC (n, char); } # endif # ifdef __cplusplus } /* C++ does not allow conversions from void * to other pointer types without a cast. Use templates to work around the problem when possible. */ template inline T * xrealloc (T *p, size_t s) { return (T *) xrealloc ((void *) p, s); } template inline T * xnrealloc (T *p, size_t n, size_t s) { return (T *) xnrealloc ((void *) p, n, s); } template inline T * x2realloc (T *p, size_t *pn) { return (T *) x2realloc ((void *) p, pn); } template inline T * x2nrealloc (T *p, size_t *pn, size_t s) { return (T *) x2nrealloc ((void *) p, pn, s); } template inline T * xmemdup (T const *p, size_t s) { return (T *) xmemdup ((void const *) p, s); } # endif #endif /* !XALLOC_H_ */ gnuit-4.9.5/lib/safe-read.c0000644000175000017500000000412411146671375012355 00000000000000/* An interface to read and write that retries after interrupts. Copyright (C) 1993, 1994, 1998, 2002, 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 3 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, see . */ #include /* Specification. */ #ifdef SAFE_WRITE # include "safe-write.h" #else # include "safe-read.h" #endif /* Get ssize_t. */ #include #include #include #ifdef EINTR # define IS_EINTR(x) ((x) == EINTR) #else # define IS_EINTR(x) 0 #endif #include #ifdef SAFE_WRITE # define safe_rw safe_write # define rw write #else # define safe_rw safe_read # define rw read # undef const # define const /* empty */ #endif /* Read(write) up to COUNT bytes at BUF from(to) descriptor FD, retrying if interrupted. Return the actual number of bytes read(written), zero for EOF, or SAFE_READ_ERROR(SAFE_WRITE_ERROR) upon error. */ size_t safe_rw (int fd, void const *buf, size_t count) { /* Work around a bug in Tru64 5.1. Attempting to read more than INT_MAX bytes fails with errno == EINVAL. See . When decreasing COUNT, keep it block-aligned. */ enum { BUGGY_READ_MAXIMUM = INT_MAX & ~8191 }; for (;;) { ssize_t result = rw (fd, buf, count); if (0 <= result) return result; else if (IS_EINTR (errno)) continue; else if (errno == EINVAL && BUGGY_READ_MAXIMUM < count) count = BUGGY_READ_MAXIMUM; else return result; } } gnuit-4.9.5/lib/strerror.c0000644000175000017500000002112111146671375012404 00000000000000/* strerror.c --- POSIX compatible system error routine Copyright (C) 2007-2009 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 3 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, see . */ #include #include #if REPLACE_STRERROR # include # include # if GNULIB_defined_ESOCK /* native Windows platforms */ # if HAVE_WINSOCK2_H # include # endif # endif # include "intprops.h" # undef strerror # if ! HAVE_DECL_STRERROR # define strerror(n) NULL # endif char * rpl_strerror (int n) { char const *msg = NULL; /* These error messages are taken from glibc/sysdeps/gnu/errlist.c. */ switch (n) { # if GNULIB_defined_ETXTBSY case ETXTBSY: msg = "Text file busy"; break; # endif # if GNULIB_defined_ESOCK /* native Windows platforms */ /* EWOULDBLOCK is the same as EAGAIN. */ case EINPROGRESS: msg = "Operation now in progress"; break; case EALREADY: msg = "Operation already in progress"; break; case ENOTSOCK: msg = "Socket operation on non-socket"; break; case EDESTADDRREQ: msg = "Destination address required"; break; case EMSGSIZE: msg = "Message too long"; break; case EPROTOTYPE: msg = "Protocol wrong type for socket"; break; case ENOPROTOOPT: msg = "Protocol not available"; break; case EPROTONOSUPPORT: msg = "Protocol not supported"; break; case ESOCKTNOSUPPORT: msg = "Socket type not supported"; break; case EOPNOTSUPP: msg = "Operation not supported"; break; case EPFNOSUPPORT: msg = "Protocol family not supported"; break; case EAFNOSUPPORT: msg = "Address family not supported by protocol"; break; case EADDRINUSE: msg = "Address already in use"; break; case EADDRNOTAVAIL: msg = "Cannot assign requested address"; break; case ENETDOWN: msg = "Network is down"; break; case ENETUNREACH: msg = "Network is unreachable"; break; case ENETRESET: msg = "Network dropped connection on reset"; break; case ECONNABORTED: msg = "Software caused connection abort"; break; case ECONNRESET: msg = "Connection reset by peer"; break; case ENOBUFS: msg = "No buffer space available"; break; case EISCONN: msg = "Transport endpoint is already connected"; break; case ENOTCONN: msg = "Transport endpoint is not connected"; break; case ESHUTDOWN: msg = "Cannot send after transport endpoint shutdown"; break; case ETOOMANYREFS: msg = "Too many references: cannot splice"; break; case ETIMEDOUT: msg = "Connection timed out"; break; case ECONNREFUSED: msg = "Connection refused"; break; case ELOOP: msg = "Too many levels of symbolic links"; break; case EHOSTDOWN: msg = "Host is down"; break; case EHOSTUNREACH: msg = "No route to host"; break; case EPROCLIM: msg = "Too many processes"; break; case EUSERS: msg = "Too many users"; break; case EDQUOT: msg = "Disk quota exceeded"; break; case ESTALE: msg = "Stale NFS file handle"; break; case EREMOTE: msg = "Object is remote"; break; # if HAVE_WINSOCK2_H /* WSA_INVALID_HANDLE maps to EBADF */ /* WSA_NOT_ENOUGH_MEMORY maps to ENOMEM */ /* WSA_INVALID_PARAMETER maps to EINVAL */ case WSA_OPERATION_ABORTED: msg = "Overlapped operation aborted"; break; case WSA_IO_INCOMPLETE: msg = "Overlapped I/O event object not in signaled state"; break; case WSA_IO_PENDING: msg = "Overlapped operations will complete later"; break; /* WSAEINTR maps to EINTR */ /* WSAEBADF maps to EBADF */ /* WSAEACCES maps to EACCES */ /* WSAEFAULT maps to EFAULT */ /* WSAEINVAL maps to EINVAL */ /* WSAEMFILE maps to EMFILE */ /* WSAEWOULDBLOCK maps to EWOULDBLOCK */ /* WSAEINPROGRESS is EINPROGRESS */ /* WSAEALREADY is EALREADY */ /* WSAENOTSOCK is ENOTSOCK */ /* WSAEDESTADDRREQ is EDESTADDRREQ */ /* WSAEMSGSIZE is EMSGSIZE */ /* WSAEPROTOTYPE is EPROTOTYPE */ /* WSAENOPROTOOPT is ENOPROTOOPT */ /* WSAEPROTONOSUPPORT is EPROTONOSUPPORT */ /* WSAESOCKTNOSUPPORT is ESOCKTNOSUPPORT */ /* WSAEOPNOTSUPP is EOPNOTSUPP */ /* WSAEPFNOSUPPORT is EPFNOSUPPORT */ /* WSAEAFNOSUPPORT is EAFNOSUPPORT */ /* WSAEADDRINUSE is EADDRINUSE */ /* WSAEADDRNOTAVAIL is EADDRNOTAVAIL */ /* WSAENETDOWN is ENETDOWN */ /* WSAENETUNREACH is ENETUNREACH */ /* WSAENETRESET is ENETRESET */ /* WSAECONNABORTED is ECONNABORTED */ /* WSAECONNRESET is ECONNRESET */ /* WSAENOBUFS is ENOBUFS */ /* WSAEISCONN is EISCONN */ /* WSAENOTCONN is ENOTCONN */ /* WSAESHUTDOWN is ESHUTDOWN */ /* WSAETOOMANYREFS is ETOOMANYREFS */ /* WSAETIMEDOUT is ETIMEDOUT */ /* WSAECONNREFUSED is ECONNREFUSED */ /* WSAELOOP is ELOOP */ /* WSAENAMETOOLONG maps to ENAMETOOLONG */ /* WSAEHOSTDOWN is EHOSTDOWN */ /* WSAEHOSTUNREACH is EHOSTUNREACH */ /* WSAENOTEMPTY maps to ENOTEMPTY */ /* WSAEPROCLIM is EPROCLIM */ /* WSAEUSERS is EUSERS */ /* WSAEDQUOT is EDQUOT */ /* WSAESTALE is ESTALE */ /* WSAEREMOTE is EREMOTE */ case WSASYSNOTREADY: msg = "Network subsystem is unavailable"; break; case WSAVERNOTSUPPORTED: msg = "Winsock.dll version out of range"; break; case WSANOTINITIALISED: msg = "Successful WSAStartup not yet performed"; break; case WSAEDISCON: msg = "Graceful shutdown in progress"; break; case WSAENOMORE: case WSA_E_NO_MORE: msg = "No more results"; break; case WSAECANCELLED: case WSA_E_CANCELLED: msg = "Call was canceled"; break; case WSAEINVALIDPROCTABLE: msg = "Procedure call table is invalid"; break; case WSAEINVALIDPROVIDER: msg = "Service provider is invalid"; break; case WSAEPROVIDERFAILEDINIT: msg = "Service provider failed to initialize"; break; case WSASYSCALLFAILURE: msg = "System call failure"; break; case WSASERVICE_NOT_FOUND: msg = "Service not found"; break; case WSATYPE_NOT_FOUND: msg = "Class type not found"; break; case WSAEREFUSED: msg = "Database query was refused"; break; case WSAHOST_NOT_FOUND: msg = "Host not found"; break; case WSATRY_AGAIN: msg = "Nonauthoritative host not found"; break; case WSANO_RECOVERY: msg = "Nonrecoverable error"; break; case WSANO_DATA: msg = "Valid name, no data record of requested type"; break; /* WSA_QOS_* omitted */ # endif # endif # if GNULIB_defined_ENOMSG case ENOMSG: msg = "No message of desired type"; break; # endif # if GNULIB_defined_EIDRM case EIDRM: msg = "Identifier removed"; break; # endif # if GNULIB_defined_ENOLINK case ENOLINK: msg = "Link has been severed"; break; # endif # if GNULIB_defined_EPROTO case EPROTO: msg = "Protocol error"; break; # endif # if GNULIB_defined_EMULTIHOP case EMULTIHOP: msg = "Multihop attempted"; break; # endif # if GNULIB_defined_EBADMSG case EBADMSG: msg = "Bad message"; break; # endif # if GNULIB_defined_EOVERFLOW case EOVERFLOW: msg = "Value too large for defined data type"; break; # endif # if GNULIB_defined_ENOTSUP case ENOTSUP: msg = "Not supported"; break; # endif # if GNULIB_defined_ case ECANCELED: msg = "Operation canceled"; break; # endif } if (msg) return (char *) msg; { char *result = strerror (n); if (result == NULL || result[0] == '\0') { static char const fmt[] = "Unknown error (%d)"; static char msg_buf[sizeof fmt + INT_STRLEN_BOUND (n)]; sprintf (msg_buf, fmt, n); return msg_buf; } return result; } } #endif gnuit-4.9.5/lib/malloca.c0000644000175000017500000001135311146671375012140 00000000000000/* Safe automatic memory allocation. Copyright (C) 2003, 2006-2007 Free Software Foundation, Inc. Written by Bruno Haible , 2003. 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 3, 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. */ #include /* Specification. */ #include "malloca.h" /* The speed critical point in this file is freea() applied to an alloca() result: it must be fast, to match the speed of alloca(). The speed of mmalloca() and freea() in the other case are not critical, because they are only invoked for big memory sizes. */ #if HAVE_ALLOCA /* Store the mmalloca() results in a hash table. This is needed to reliably distinguish a mmalloca() result and an alloca() result. Although it is possible that the same pointer is returned by alloca() and by mmalloca() at different times in the same application, it does not lead to a bug in freea(), because: - Before a pointer returned by alloca() can point into malloc()ed memory, the function must return, and once this has happened the programmer must not call freea() on it anyway. - Before a pointer returned by mmalloca() can point into the stack, it must be freed. The only function that can free it is freea(), and when freea() frees it, it also removes it from the hash table. */ #define MAGIC_NUMBER 0x1415fb4a #define MAGIC_SIZE sizeof (int) /* This is how the header info would look like without any alignment considerations. */ struct preliminary_header { void *next; char room[MAGIC_SIZE]; }; /* But the header's size must be a multiple of sa_alignment_max. */ #define HEADER_SIZE \ (((sizeof (struct preliminary_header) + sa_alignment_max - 1) / sa_alignment_max) * sa_alignment_max) struct header { void *next; char room[HEADER_SIZE - sizeof (struct preliminary_header) + MAGIC_SIZE]; }; /* Verify that HEADER_SIZE == sizeof (struct header). */ typedef int verify1[2 * (HEADER_SIZE == sizeof (struct header)) - 1]; /* We make the hash table quite big, so that during lookups the probability of empty hash buckets is quite high. There is no need to make the hash table resizable, because when the hash table gets filled so much that the lookup becomes slow, it means that the application has memory leaks. */ #define HASH_TABLE_SIZE 257 static void * mmalloca_results[HASH_TABLE_SIZE]; #endif void * mmalloca (size_t n) { #if HAVE_ALLOCA /* Allocate one more word, that serves as an indicator for malloc()ed memory, so that freea() of an alloca() result is fast. */ size_t nplus = n + HEADER_SIZE; if (nplus >= n) { char *p = (char *) malloc (nplus); if (p != NULL) { size_t slot; p += HEADER_SIZE; /* Put a magic number into the indicator word. */ ((int *) p)[-1] = MAGIC_NUMBER; /* Enter p into the hash table. */ slot = (unsigned long) p % HASH_TABLE_SIZE; ((struct header *) (p - HEADER_SIZE))->next = mmalloca_results[slot]; mmalloca_results[slot] = p; return p; } } /* Out of memory. */ return NULL; #else # if !MALLOC_0_IS_NONNULL if (n == 0) n = 1; # endif return malloc (n); #endif } #if HAVE_ALLOCA void freea (void *p) { /* mmalloca() may have returned NULL. */ if (p != NULL) { /* Attempt to quickly distinguish the mmalloca() result - which has a magic indicator word - and the alloca() result - which has an uninitialized indicator word. It is for this test that sa_increment additional bytes are allocated in the alloca() case. */ if (((int *) p)[-1] == MAGIC_NUMBER) { /* Looks like a mmalloca() result. To see whether it really is one, perform a lookup in the hash table. */ size_t slot = (unsigned long) p % HASH_TABLE_SIZE; void **chain = &mmalloca_results[slot]; for (; *chain != NULL;) { if (*chain == p) { /* Found it. Remove it from the hash table and free it. */ char *p_begin = (char *) p - HEADER_SIZE; *chain = ((struct header *) p_begin)->next; free (p_begin); return; } chain = &((struct header *) ((char *) *chain - HEADER_SIZE))->next; } } /* At this point, we know it was not a mmalloca() result. */ } } #endif gnuit-4.9.5/lib/full-read.h0000644000175000017500000000215711146671375012412 00000000000000/* An interface to read() that reads all it is asked to read. Copyright (C) 2002 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 3 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, read to the Free Software Foundation, along with this program. If not, see . */ #include /* Read COUNT bytes at BUF to descriptor FD, retrying if interrupted or if partial reads occur. Return the number of bytes successfully read, setting errno if that is less than COUNT. errno = 0 means EOF. */ extern size_t full_read (int fd, void *buf, size_t count); gnuit-4.9.5/lib/human.c0000644000175000017500000002773411146671375011652 00000000000000/* human.c -- print human readable file size Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 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 3 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, see . */ /* Written by Paul Eggert and Larry McVoy. */ #include #include "human.h" #include #include #include #include #include #include #include /* The maximum length of a suffix like "KiB". */ #define HUMAN_READABLE_SUFFIX_LENGTH_MAX 3 static const char power_letter[] = { 0, /* not used */ 'K', /* kibi ('k' for kilo is a special case) */ 'M', /* mega or mebi */ 'G', /* giga or gibi */ 'T', /* tera or tebi */ 'P', /* peta or pebi */ 'E', /* exa or exbi */ 'Z', /* zetta or 2**70 */ 'Y' /* yotta or 2**80 */ }; /* If INEXACT_STYLE is not human_round_to_nearest, and if easily possible, adjust VALUE according to the style. */ static long double adjust_value (int inexact_style, long double value) { /* Do not use the floorl or ceill functions, as that would mean checking for their presence and possibly linking with the standard math library, which is a porting pain. So leave the value alone if it is too large to easily round. */ if (inexact_style != human_round_to_nearest && value < UINTMAX_MAX) { uintmax_t u = value; value = u + (inexact_style == human_ceiling && u != value); } return value; } /* Group the digits of NUMBER according to the grouping rules of the current locale. NUMBER contains NUMBERLEN digits. Modify the bytes pointed to by NUMBER in place, subtracting 1 from NUMBER for each byte inserted. Return the starting address of the modified number. To group the digits, use GROUPING and THOUSANDS_SEP as in `struct lconv' from . */ static char * group_number (char *number, size_t numberlen, char const *grouping, char const *thousands_sep) { register char *d; size_t grouplen = SIZE_MAX; size_t thousands_seplen = strlen (thousands_sep); size_t i = numberlen; /* The maximum possible value for NUMBERLEN is the number of digits in the square of the largest uintmax_t, so double the size needed. */ char buf[2 * INT_STRLEN_BOUND (uintmax_t) + 1]; memcpy (buf, number, numberlen); d = number + numberlen; for (;;) { unsigned char g = *grouping; if (g) { grouplen = g < CHAR_MAX ? g : i; grouping++; } if (i < grouplen) grouplen = i; d -= grouplen; i -= grouplen; memcpy (d, buf + i, grouplen); if (i == 0) return d; d -= thousands_seplen; memcpy (d, thousands_sep, thousands_seplen); } } /* Convert N to a human readable format in BUF, using the options OPTS. N is expressed in units of FROM_BLOCK_SIZE. FROM_BLOCK_SIZE must be nonnegative. Use units of TO_BLOCK_SIZE in the output number. TO_BLOCK_SIZE must be positive. Use (OPTS & (human_round_to_nearest | human_floor | human_ceiling)) to determine whether to take the ceiling or floor of any result that cannot be expressed exactly. If (OPTS & human_group_digits), group the thousands digits according to the locale, e.g., `1,000,000' in an American English locale. If (OPTS & human_autoscale), deduce the output block size automatically; TO_BLOCK_SIZE must be 1 but it has no effect on the output. Use powers of 1024 if (OPTS & human_base_1024), and powers of 1000 otherwise. For example, assuming powers of 1024, 8500 would be converted to 8.3, 133456345 to 127, 56990456345 to 53, and so on. Numbers smaller than the power aren't modified. human_autoscale is normally used together with human_SI. If (OPTS & human_space_before_unit), use a space to separate the number from any suffix that is appended as described below. If (OPTS & human_SI), append an SI prefix indicating which power is being used. If in addition (OPTS & human_B), append "B" (if base 1000) or "iB" (if base 1024) to the SI prefix. When ((OPTS & human_SI) && ! (OPTS & human_autoscale)), TO_BLOCK_SIZE must be a power of 1024 or of 1000, depending on (OPTS & human_base_1024). */ char * human_readable (uintmax_t n, char *buf, int opts, uintmax_t from_block_size, uintmax_t to_block_size) { int inexact_style = opts & (human_round_to_nearest | human_floor | human_ceiling); unsigned int base = opts & human_base_1024 ? 1024 : 1000; uintmax_t amt; int tenths; int exponent = -1; int exponent_max = sizeof power_letter - 1; char *p; char *psuffix; char const *integerlim; /* 0 means adjusted N == AMT.TENTHS; 1 means AMT.TENTHS < adjusted N < AMT.TENTHS + 0.05; 2 means adjusted N == AMT.TENTHS + 0.05; 3 means AMT.TENTHS + 0.05 < adjusted N < AMT.TENTHS + 0.1. */ int rounding; char const *decimal_point = "."; size_t decimal_pointlen = 1; char const *grouping = ""; char const *thousands_sep = ""; struct lconv const *l = localeconv (); size_t pointlen = strlen (l->decimal_point); if (0 < pointlen && pointlen <= MB_LEN_MAX) { decimal_point = l->decimal_point; decimal_pointlen = pointlen; } grouping = l->grouping; if (strlen (l->thousands_sep) <= MB_LEN_MAX) thousands_sep = l->thousands_sep; psuffix = buf + LONGEST_HUMAN_READABLE - HUMAN_READABLE_SUFFIX_LENGTH_MAX; p = psuffix; /* Adjust AMT out of FROM_BLOCK_SIZE units and into TO_BLOCK_SIZE units. If this can be done exactly with integer arithmetic, do not use floating point operations. */ if (to_block_size <= from_block_size) { if (from_block_size % to_block_size == 0) { uintmax_t multiplier = from_block_size / to_block_size; amt = n * multiplier; if (amt / multiplier == n) { tenths = 0; rounding = 0; goto use_integer_arithmetic; } } } else if (from_block_size != 0 && to_block_size % from_block_size == 0) { uintmax_t divisor = to_block_size / from_block_size; uintmax_t r10 = (n % divisor) * 10; uintmax_t r2 = (r10 % divisor) * 2; amt = n / divisor; tenths = r10 / divisor; rounding = r2 < divisor ? 0 < r2 : 2 + (divisor < r2); goto use_integer_arithmetic; } { /* Either the result cannot be computed easily using uintmax_t, or from_block_size is zero. Fall back on floating point. FIXME: This can yield answers that are slightly off. */ long double dto_block_size = to_block_size; long double damt = n * (from_block_size / dto_block_size); size_t buflen; size_t nonintegerlen; if (! (opts & human_autoscale)) { sprintf (buf, "%.0Lf", adjust_value (inexact_style, damt)); buflen = strlen (buf); nonintegerlen = 0; } else { long double e = 1; exponent = 0; do { e *= base; exponent++; } while (e * base <= damt && exponent < exponent_max); damt /= e; sprintf (buf, "%.1Lf", adjust_value (inexact_style, damt)); buflen = strlen (buf); nonintegerlen = decimal_pointlen + 1; if (1 + nonintegerlen + ! (opts & human_base_1024) < buflen || ((opts & human_suppress_point_zero) && buf[buflen - 1] == '0')) { sprintf (buf, "%.0Lf", adjust_value (inexact_style, damt * 10) / 10); buflen = strlen (buf); nonintegerlen = 0; } } p = psuffix - buflen; memmove (p, buf, buflen); integerlim = p + buflen - nonintegerlen; } goto do_grouping; use_integer_arithmetic: { /* The computation can be done exactly, with integer arithmetic. Use power of BASE notation if requested and if adjusted AMT is large enough. */ if (opts & human_autoscale) { exponent = 0; if (base <= amt) { do { unsigned int r10 = (amt % base) * 10 + tenths; unsigned int r2 = (r10 % base) * 2 + (rounding >> 1); amt /= base; tenths = r10 / base; rounding = (r2 < base ? (r2 + rounding) != 0 : 2 + (base < r2 + rounding)); exponent++; } while (base <= amt && exponent < exponent_max); if (amt < 10) { if (inexact_style == human_round_to_nearest ? 2 < rounding + (tenths & 1) : inexact_style == human_ceiling && 0 < rounding) { tenths++; rounding = 0; if (tenths == 10) { amt++; tenths = 0; } } if (amt < 10 && (tenths || ! (opts & human_suppress_point_zero))) { *--p = '0' + tenths; p -= decimal_pointlen; memcpy (p, decimal_point, decimal_pointlen); tenths = rounding = 0; } } } } if (inexact_style == human_round_to_nearest ? 5 < tenths + (0 < rounding + (amt & 1)) : inexact_style == human_ceiling && 0 < tenths + rounding) { amt++; if ((opts & human_autoscale) && amt == base && exponent < exponent_max) { exponent++; if (! (opts & human_suppress_point_zero)) { *--p = '0'; p -= decimal_pointlen; memcpy (p, decimal_point, decimal_pointlen); } amt = 1; } } integerlim = p; do { int digit = amt % 10; *--p = digit + '0'; } while ((amt /= 10) != 0); } do_grouping: if (opts & human_group_digits) p = group_number (p, integerlim - p, grouping, thousands_sep); if (opts & human_SI) { if (exponent < 0) { uintmax_t power; exponent = 0; for (power = 1; power < to_block_size; power *= base) if (++exponent == exponent_max) break; } if ((exponent | (opts & human_B)) && (opts & human_space_before_unit)) *psuffix++ = ' '; if (exponent) *psuffix++ = (! (opts & human_base_1024) && exponent == 1 ? 'k' : power_letter[exponent]); if (opts & human_B) { if ((opts & human_base_1024) && exponent) *psuffix++ = 'i'; *psuffix++ = 'B'; } } *psuffix = '\0'; return p; } /* The default block size used for output. This number may change in the future as disks get larger. */ #ifndef DEFAULT_BLOCK_SIZE # define DEFAULT_BLOCK_SIZE 1024 #endif static char const *const block_size_args[] = { "human-readable", "si", 0 }; static int const block_size_opts[] = { human_autoscale + human_SI + human_base_1024, human_autoscale + human_SI }; static uintmax_t default_block_size (void) { return getenv ("POSIXLY_CORRECT") ? 512 : DEFAULT_BLOCK_SIZE; } static strtol_error humblock (char const *spec, uintmax_t *block_size, int *options) { int i; int opts = 0; if (! spec && ! (spec = getenv ("BLOCK_SIZE")) && ! (spec = getenv ("BLOCKSIZE"))) *block_size = default_block_size (); else { if (*spec == '\'') { opts |= human_group_digits; spec++; } if (0 <= (i = ARGMATCH (spec, block_size_args, block_size_opts))) { opts |= block_size_opts[i]; *block_size = 1; } else { char *ptr; strtol_error e = xstrtoumax (spec, &ptr, 0, block_size, "eEgGkKmMpPtTyYzZ0"); if (e != LONGINT_OK) { *options = 0; return e; } for (; ! ('0' <= *spec && *spec <= '9'); spec++) if (spec == ptr) { opts |= human_SI; if (ptr[-1] == 'B') opts |= human_B; if (ptr[-1] != 'B' || ptr[-2] == 'i') opts |= human_base_1024; break; } } } *options = opts; return LONGINT_OK; } enum strtol_error human_options (char const *spec, int *opts, uintmax_t *block_size) { strtol_error e = humblock (spec, block_size, opts); if (*block_size == 0) { *block_size = default_block_size (); e = LONGINT_INVALID; } return e; } gnuit-4.9.5/lib/stdlib.in.h0000644000175000017500000002701011146671375012420 00000000000000/* A GNU-like . Copyright (C) 1995, 2001-2004, 2006-2009 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 3 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, see . */ #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif #if defined __need_malloc_and_calloc /* Special invocation convention inside glibc header files. */ #@INCLUDE_NEXT@ @NEXT_STDLIB_H@ #else /* Normal invocation convention. */ #ifndef _GL_STDLIB_H /* The include_next requires a split double-inclusion guard. */ #@INCLUDE_NEXT@ @NEXT_STDLIB_H@ #ifndef _GL_STDLIB_H #define _GL_STDLIB_H /* Solaris declares getloadavg() in . */ #if @GNULIB_GETLOADAVG@ && @HAVE_SYS_LOADAVG_H@ # include #endif /* OSF/1 5.1 declares 'struct random_data' in , which is included from if _REENTRANT is defined. Include it always. */ #if @HAVE_RANDOM_H@ # include #endif #if @GNULIB_RANDOM_R@ || !@HAVE_STRUCT_RANDOM_DATA@ # include #endif #if !@HAVE_STRUCT_RANDOM_DATA@ struct random_data { int32_t *fptr; /* Front pointer. */ int32_t *rptr; /* Rear pointer. */ int32_t *state; /* Array of state values. */ int rand_type; /* Type of random number generator. */ int rand_deg; /* Degree of random number generator. */ int rand_sep; /* Distance between front and rear. */ int32_t *end_ptr; /* Pointer behind state table. */ }; #endif /* The definition of GL_LINK_WARNING is copied here. */ /* Some systems do not define EXIT_*, despite otherwise supporting C89. */ #ifndef EXIT_SUCCESS # define EXIT_SUCCESS 0 #endif /* Tandem/NSK and other platforms that define EXIT_FAILURE as -1 interfere with proper operation of xargs. */ #ifndef EXIT_FAILURE # define EXIT_FAILURE 1 #elif EXIT_FAILURE != 1 # undef EXIT_FAILURE # define EXIT_FAILURE 1 #endif #ifdef __cplusplus extern "C" { #endif #if @GNULIB_MALLOC_POSIX@ # if !@HAVE_MALLOC_POSIX@ # undef malloc # define malloc rpl_malloc extern void * malloc (size_t size); # endif #elif defined GNULIB_POSIXCHECK # undef malloc # define malloc(s) \ (GL_LINK_WARNING ("malloc is not POSIX compliant everywhere - " \ "use gnulib module malloc-posix for portability"), \ malloc (s)) #endif #if @GNULIB_REALLOC_POSIX@ # if !@HAVE_REALLOC_POSIX@ # undef realloc # define realloc rpl_realloc extern void * realloc (void *ptr, size_t size); # endif #elif defined GNULIB_POSIXCHECK # undef realloc # define realloc(p,s) \ (GL_LINK_WARNING ("realloc is not POSIX compliant everywhere - " \ "use gnulib module realloc-posix for portability"), \ realloc (p, s)) #endif #if @GNULIB_CALLOC_POSIX@ # if !@HAVE_CALLOC_POSIX@ # undef calloc # define calloc rpl_calloc extern void * calloc (size_t nmemb, size_t size); # endif #elif defined GNULIB_POSIXCHECK # undef calloc # define calloc(n,s) \ (GL_LINK_WARNING ("calloc is not POSIX compliant everywhere - " \ "use gnulib module calloc-posix for portability"), \ calloc (n, s)) #endif #if @GNULIB_ATOLL@ # if !@HAVE_ATOLL@ /* Parse a signed decimal integer. Returns the value of the integer. Errors are not detected. */ extern long long atoll (const char *string); # endif #elif defined GNULIB_POSIXCHECK # undef atoll # define atoll(s) \ (GL_LINK_WARNING ("atoll is unportable - " \ "use gnulib module atoll for portability"), \ atoll (s)) #endif #if @GNULIB_GETLOADAVG@ # if !@HAVE_DECL_GETLOADAVG@ /* Store max(NELEM,3) load average numbers in LOADAVG[]. The three numbers are the load average of the last 1 minute, the last 5 minutes, and the last 15 minutes, respectively. LOADAVG is an array of NELEM numbers. */ extern int getloadavg (double loadavg[], int nelem); # endif #elif defined GNULIB_POSIXCHECK # undef getloadavg # define getloadavg(l,n) \ (GL_LINK_WARNING ("getloadavg is not portable - " \ "use gnulib module getloadavg for portability"), \ getloadavg (l, n)) #endif #if @GNULIB_GETSUBOPT@ /* Assuming *OPTIONP is a comma separated list of elements of the form "token" or "token=value", getsubopt parses the first of these elements. If the first element refers to a "token" that is member of the given NULL-terminated array of tokens: - It replaces the comma with a NUL byte, updates *OPTIONP to point past the first option and the comma, sets *VALUEP to the value of the element (or NULL if it doesn't contain an "=" sign), - It returns the index of the "token" in the given array of tokens. Otherwise it returns -1, and *OPTIONP and *VALUEP are undefined. For more details see the POSIX:2001 specification. http://www.opengroup.org/susv3xsh/getsubopt.html */ # if !@HAVE_GETSUBOPT@ extern int getsubopt (char **optionp, char *const *tokens, char **valuep); # endif #elif defined GNULIB_POSIXCHECK # undef getsubopt # define getsubopt(o,t,v) \ (GL_LINK_WARNING ("getsubopt is unportable - " \ "use gnulib module getsubopt for portability"), \ getsubopt (o, t, v)) #endif #if @GNULIB_MKDTEMP@ # if !@HAVE_MKDTEMP@ /* Create a unique temporary directory from TEMPLATE. The last six characters of TEMPLATE must be "XXXXXX"; they are replaced with a string that makes the directory name unique. Returns TEMPLATE, or a null pointer if it cannot get a unique name. The directory is created mode 700. */ extern char * mkdtemp (char * /*template*/); # endif #elif defined GNULIB_POSIXCHECK # undef mkdtemp # define mkdtemp(t) \ (GL_LINK_WARNING ("mkdtemp is unportable - " \ "use gnulib module mkdtemp for portability"), \ mkdtemp (t)) #endif #if @GNULIB_MKSTEMP@ # if @REPLACE_MKSTEMP@ /* Create a unique temporary file from TEMPLATE. The last six characters of TEMPLATE must be "XXXXXX"; they are replaced with a string that makes the file name unique. The file is then created, ensuring it didn't exist before. The file is created read-write (mask at least 0600 & ~umask), but it may be world-readable and world-writable (mask 0666 & ~umask), depending on the implementation. Returns the open file descriptor if successful, otherwise -1 and errno set. */ # define mkstemp rpl_mkstemp extern int mkstemp (char * /*template*/); # else /* On MacOS X 10.3, only declares mkstemp. */ # include # endif #elif defined GNULIB_POSIXCHECK # undef mkstemp # define mkstemp(t) \ (GL_LINK_WARNING ("mkstemp is unportable - " \ "use gnulib module mkstemp for portability"), \ mkstemp (t)) #endif #if @GNULIB_PUTENV@ # if @REPLACE_PUTENV@ # undef putenv # define putenv rpl_putenv extern int putenv (char *string); # endif #endif #if @GNULIB_RANDOM_R@ # if !@HAVE_RANDOM_R@ # ifndef RAND_MAX # define RAND_MAX 2147483647 # endif int srandom_r (unsigned int seed, struct random_data *rand_state); int initstate_r (unsigned int seed, char *buf, size_t buf_size, struct random_data *rand_state); int setstate_r (char *arg_state, struct random_data *rand_state); int random_r (struct random_data *buf, int32_t *result); # endif #elif defined GNULIB_POSIXCHECK # undef random_r # define random_r(b,r) \ (GL_LINK_WARNING ("random_r is unportable - " \ "use gnulib module random_r for portability"), \ random_r (b,r)) # undef initstate_r # define initstate_r(s,b,sz,r) \ (GL_LINK_WARNING ("initstate_r is unportable - " \ "use gnulib module random_r for portability"), \ initstate_r (s,b,sz,r)) # undef srandom_r # define srandom_r(s,r) \ (GL_LINK_WARNING ("srandom_r is unportable - " \ "use gnulib module random_r for portability"), \ srandom_r (s,r)) # undef setstate_r # define setstate_r(a,r) \ (GL_LINK_WARNING ("setstate_r is unportable - " \ "use gnulib module random_r for portability"), \ setstate_r (a,r)) #endif #if @GNULIB_RPMATCH@ # if !@HAVE_RPMATCH@ /* Test a user response to a question. Return 1 if it is affirmative, 0 if it is negative, or -1 if not clear. */ extern int rpmatch (const char *response); # endif #elif defined GNULIB_POSIXCHECK # undef rpmatch # define rpmatch(r) \ (GL_LINK_WARNING ("rpmatch is unportable - " \ "use gnulib module rpmatch for portability"), \ rpmatch (r)) #endif #if @GNULIB_SETENV@ # if !@HAVE_SETENV@ /* Set NAME to VALUE in the environment. If REPLACE is nonzero, overwrite an existing value. */ extern int setenv (const char *name, const char *value, int replace); # endif #endif #if @GNULIB_UNSETENV@ # if @HAVE_UNSETENV@ # if @VOID_UNSETENV@ /* On some systems, unsetenv() returns void. This is the case for MacOS X 10.3, FreeBSD 4.8, NetBSD 1.6, OpenBSD 3.4. */ # define unsetenv(name) ((unsetenv)(name), 0) # endif # else /* Remove the variable NAME from the environment. */ extern int unsetenv (const char *name); # endif #endif #if @GNULIB_STRTOD@ # if @REPLACE_STRTOD@ # define strtod rpl_strtod # endif # if !@HAVE_STRTOD@ || @REPLACE_STRTOD@ /* Parse a double from STRING, updating ENDP if appropriate. */ extern double strtod (const char *str, char **endp); # endif #elif defined GNULIB_POSIXCHECK # undef strtod # define strtod(s, e) \ (GL_LINK_WARNING ("strtod is unportable - " \ "use gnulib module strtod for portability"), \ strtod (s, e)) #endif #if @GNULIB_STRTOLL@ # if !@HAVE_STRTOLL@ /* Parse a signed integer whose textual representation starts at STRING. The integer is expected to be in base BASE (2 <= BASE <= 36); if BASE == 0, it may be decimal or octal (with prefix "0") or hexadecimal (with prefix "0x"). If ENDPTR is not NULL, the address of the first byte after the integer is stored in *ENDPTR. Upon overflow, the return value is LLONG_MAX or LLONG_MIN, and errno is set to ERANGE. */ extern long long strtoll (const char *string, char **endptr, int base); # endif #elif defined GNULIB_POSIXCHECK # undef strtoll # define strtoll(s,e,b) \ (GL_LINK_WARNING ("strtoll is unportable - " \ "use gnulib module strtoll for portability"), \ strtoll (s, e, b)) #endif #if @GNULIB_STRTOULL@ # if !@HAVE_STRTOULL@ /* Parse an unsigned integer whose textual representation starts at STRING. The integer is expected to be in base BASE (2 <= BASE <= 36); if BASE == 0, it may be decimal or octal (with prefix "0") or hexadecimal (with prefix "0x"). If ENDPTR is not NULL, the address of the first byte after the integer is stored in *ENDPTR. Upon overflow, the return value is ULLONG_MAX, and errno is set to ERANGE. */ extern unsigned long long strtoull (const char *string, char **endptr, int base); # endif #elif defined GNULIB_POSIXCHECK # undef strtoull # define strtoull(s,e,b) \ (GL_LINK_WARNING ("strtoull is unportable - " \ "use gnulib module strtoull for portability"), \ strtoull (s, e, b)) #endif #ifdef __cplusplus } #endif #endif /* _GL_STDLIB_H */ #endif /* _GL_STDLIB_H */ #endif gnuit-4.9.5/lib/localcharset.c0000644000175000017500000003274311146671375013202 00000000000000/* Determine a canonical name for the current locale's character encoding. Copyright (C) 2000-2006, 2008-2009 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 3, 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. */ /* Written by Bruno Haible . */ #include /* Specification. */ #include "localcharset.h" #include #include #include #include #if defined __APPLE__ && defined __MACH__ && HAVE_LANGINFO_CODESET # define DARWIN7 /* Darwin 7 or newer, i.e. MacOS X 10.3 or newer */ #endif #if defined _WIN32 || defined __WIN32__ # define WIN32_NATIVE #endif #if defined __EMX__ /* Assume EMX program runs on OS/2, even if compiled under DOS. */ # ifndef OS2 # define OS2 # endif #endif #if !defined WIN32_NATIVE # if HAVE_LANGINFO_CODESET # include # else # if 0 /* see comment below */ # include # endif # endif # ifdef __CYGWIN__ # define WIN32_LEAN_AND_MEAN # include # endif #elif defined WIN32_NATIVE # define WIN32_LEAN_AND_MEAN # include #endif #if defined OS2 # define INCL_DOS # include #endif #if ENABLE_RELOCATABLE # include "relocatable.h" #else # define relocate(pathname) (pathname) #endif /* Get LIBDIR. */ #ifndef LIBDIR # include "configmake.h" #endif #if defined _WIN32 || defined __WIN32__ || defined __CYGWIN__ || defined __EMX__ || defined __DJGPP__ /* Win32, Cygwin, OS/2, DOS */ # define ISSLASH(C) ((C) == '/' || (C) == '\\') #endif #ifndef DIRECTORY_SEPARATOR # define DIRECTORY_SEPARATOR '/' #endif #ifndef ISSLASH # define ISSLASH(C) ((C) == DIRECTORY_SEPARATOR) #endif #if HAVE_DECL_GETC_UNLOCKED # undef getc # define getc getc_unlocked #endif /* The following static variable is declared 'volatile' to avoid a possible multithread problem in the function get_charset_aliases. If we are running in a threaded environment, and if two threads initialize 'charset_aliases' simultaneously, both will produce the same value, and everything will be ok if the two assignments to 'charset_aliases' are atomic. But I don't know what will happen if the two assignments mix. */ #if __STDC__ != 1 # define volatile /* empty */ #endif /* Pointer to the contents of the charset.alias file, if it has already been read, else NULL. Its format is: ALIAS_1 '\0' CANONICAL_1 '\0' ... ALIAS_n '\0' CANONICAL_n '\0' '\0' */ static const char * volatile charset_aliases; /* Return a pointer to the contents of the charset.alias file. */ static const char * get_charset_aliases (void) { const char *cp; cp = charset_aliases; if (cp == NULL) { #if !(defined DARWIN7 || defined VMS || defined WIN32_NATIVE || defined __CYGWIN__) FILE *fp; const char *dir; const char *base = "charset.alias"; char *file_name; /* Make it possible to override the charset.alias location. This is necessary for running the testsuite before "make install". */ dir = getenv ("CHARSETALIASDIR"); if (dir == NULL || dir[0] == '\0') dir = relocate (LIBDIR); /* Concatenate dir and base into freshly allocated file_name. */ { size_t dir_len = strlen (dir); size_t base_len = strlen (base); int add_slash = (dir_len > 0 && !ISSLASH (dir[dir_len - 1])); file_name = (char *) malloc (dir_len + add_slash + base_len + 1); if (file_name != NULL) { memcpy (file_name, dir, dir_len); if (add_slash) file_name[dir_len] = DIRECTORY_SEPARATOR; memcpy (file_name + dir_len + add_slash, base, base_len + 1); } } if (file_name == NULL || (fp = fopen (file_name, "r")) == NULL) /* Out of memory or file not found, treat it as empty. */ cp = ""; else { /* Parse the file's contents. */ char *res_ptr = NULL; size_t res_size = 0; for (;;) { int c; char buf1[50+1]; char buf2[50+1]; size_t l1, l2; char *old_res_ptr; c = getc (fp); if (c == EOF) break; if (c == '\n' || c == ' ' || c == '\t') continue; if (c == '#') { /* Skip comment, to end of line. */ do c = getc (fp); while (!(c == EOF || c == '\n')); if (c == EOF) break; continue; } ungetc (c, fp); if (fscanf (fp, "%50s %50s", buf1, buf2) < 2) break; l1 = strlen (buf1); l2 = strlen (buf2); old_res_ptr = res_ptr; if (res_size == 0) { res_size = l1 + 1 + l2 + 1; res_ptr = (char *) malloc (res_size + 1); } else { res_size += l1 + 1 + l2 + 1; res_ptr = (char *) realloc (res_ptr, res_size + 1); } if (res_ptr == NULL) { /* Out of memory. */ res_size = 0; if (old_res_ptr != NULL) free (old_res_ptr); break; } strcpy (res_ptr + res_size - (l2 + 1) - (l1 + 1), buf1); strcpy (res_ptr + res_size - (l2 + 1), buf2); } fclose (fp); if (res_size == 0) cp = ""; else { *(res_ptr + res_size) = '\0'; cp = res_ptr; } } if (file_name != NULL) free (file_name); #else # if defined DARWIN7 /* To avoid the trouble of installing a file that is shared by many GNU packages -- many packaging systems have problems with this --, simply inline the aliases here. */ cp = "ISO8859-1" "\0" "ISO-8859-1" "\0" "ISO8859-2" "\0" "ISO-8859-2" "\0" "ISO8859-4" "\0" "ISO-8859-4" "\0" "ISO8859-5" "\0" "ISO-8859-5" "\0" "ISO8859-7" "\0" "ISO-8859-7" "\0" "ISO8859-9" "\0" "ISO-8859-9" "\0" "ISO8859-13" "\0" "ISO-8859-13" "\0" "ISO8859-15" "\0" "ISO-8859-15" "\0" "KOI8-R" "\0" "KOI8-R" "\0" "KOI8-U" "\0" "KOI8-U" "\0" "CP866" "\0" "CP866" "\0" "CP949" "\0" "CP949" "\0" "CP1131" "\0" "CP1131" "\0" "CP1251" "\0" "CP1251" "\0" "eucCN" "\0" "GB2312" "\0" "GB2312" "\0" "GB2312" "\0" "eucJP" "\0" "EUC-JP" "\0" "eucKR" "\0" "EUC-KR" "\0" "Big5" "\0" "BIG5" "\0" "Big5HKSCS" "\0" "BIG5-HKSCS" "\0" "GBK" "\0" "GBK" "\0" "GB18030" "\0" "GB18030" "\0" "SJIS" "\0" "SHIFT_JIS" "\0" "ARMSCII-8" "\0" "ARMSCII-8" "\0" "PT154" "\0" "PT154" "\0" /*"ISCII-DEV" "\0" "?" "\0"*/ "*" "\0" "UTF-8" "\0"; # endif # if defined VMS /* To avoid the troubles of an extra file charset.alias_vms in the sources of many GNU packages, simply inline the aliases here. */ /* The list of encodings is taken from the OpenVMS 7.3-1 documentation "Compaq C Run-Time Library Reference Manual for OpenVMS systems" section 10.7 "Handling Different Character Sets". */ cp = "ISO8859-1" "\0" "ISO-8859-1" "\0" "ISO8859-2" "\0" "ISO-8859-2" "\0" "ISO8859-5" "\0" "ISO-8859-5" "\0" "ISO8859-7" "\0" "ISO-8859-7" "\0" "ISO8859-8" "\0" "ISO-8859-8" "\0" "ISO8859-9" "\0" "ISO-8859-9" "\0" /* Japanese */ "eucJP" "\0" "EUC-JP" "\0" "SJIS" "\0" "SHIFT_JIS" "\0" "DECKANJI" "\0" "DEC-KANJI" "\0" "SDECKANJI" "\0" "EUC-JP" "\0" /* Chinese */ "eucTW" "\0" "EUC-TW" "\0" "DECHANYU" "\0" "DEC-HANYU" "\0" "DECHANZI" "\0" "GB2312" "\0" /* Korean */ "DECKOREAN" "\0" "EUC-KR" "\0"; # endif # if defined WIN32_NATIVE || defined __CYGWIN__ /* To avoid the troubles of installing a separate file in the same directory as the DLL and of retrieving the DLL's directory at runtime, simply inline the aliases here. */ cp = "CP936" "\0" "GBK" "\0" "CP1361" "\0" "JOHAB" "\0" "CP20127" "\0" "ASCII" "\0" "CP20866" "\0" "KOI8-R" "\0" "CP20936" "\0" "GB2312" "\0" "CP21866" "\0" "KOI8-RU" "\0" "CP28591" "\0" "ISO-8859-1" "\0" "CP28592" "\0" "ISO-8859-2" "\0" "CP28593" "\0" "ISO-8859-3" "\0" "CP28594" "\0" "ISO-8859-4" "\0" "CP28595" "\0" "ISO-8859-5" "\0" "CP28596" "\0" "ISO-8859-6" "\0" "CP28597" "\0" "ISO-8859-7" "\0" "CP28598" "\0" "ISO-8859-8" "\0" "CP28599" "\0" "ISO-8859-9" "\0" "CP28605" "\0" "ISO-8859-15" "\0" "CP38598" "\0" "ISO-8859-8" "\0" "CP51932" "\0" "EUC-JP" "\0" "CP51936" "\0" "GB2312" "\0" "CP51949" "\0" "EUC-KR" "\0" "CP51950" "\0" "EUC-TW" "\0" "CP54936" "\0" "GB18030" "\0" "CP65001" "\0" "UTF-8" "\0"; # endif #endif charset_aliases = cp; } return cp; } /* Determine the current locale's character encoding, and canonicalize it into one of the canonical names listed in config.charset. The result must not be freed; it is statically allocated. If the canonical name cannot be determined, the result is a non-canonical name. */ #ifdef STATIC STATIC #endif const char * locale_charset (void) { const char *codeset; const char *aliases; #if !(defined WIN32_NATIVE || defined OS2) # if HAVE_LANGINFO_CODESET /* Most systems support nl_langinfo (CODESET) nowadays. */ codeset = nl_langinfo (CODESET); # ifdef __CYGWIN__ /* Cygwin 2006 does not have locales. nl_langinfo (CODESET) always returns "US-ASCII". As long as this is not fixed, return the suffix of the locale name from the environment variables (if present) or the codepage as a number. */ if (codeset != NULL && strcmp (codeset, "US-ASCII") == 0) { const char *locale; static char buf[2 + 10 + 1]; locale = getenv ("LC_ALL"); if (locale == NULL || locale[0] == '\0') { locale = getenv ("LC_CTYPE"); if (locale == NULL || locale[0] == '\0') locale = getenv ("LANG"); } if (locale != NULL && locale[0] != '\0') { /* If the locale name contains an encoding after the dot, return it. */ const char *dot = strchr (locale, '.'); if (dot != NULL) { const char *modifier; dot++; /* Look for the possible @... trailer and remove it, if any. */ modifier = strchr (dot, '@'); if (modifier == NULL) return dot; if (modifier - dot < sizeof (buf)) { memcpy (buf, dot, modifier - dot); buf [modifier - dot] = '\0'; return buf; } } } /* Woe32 has a function returning the locale's codepage as a number. */ sprintf (buf, "CP%u", GetACP ()); codeset = buf; } # endif # else /* On old systems which lack it, use setlocale or getenv. */ const char *locale = NULL; /* But most old systems don't have a complete set of locales. Some (like SunOS 4 or DJGPP) have only the C locale. Therefore we don't use setlocale here; it would return "C" when it doesn't support the locale name the user has set. */ # if 0 locale = setlocale (LC_CTYPE, NULL); # endif if (locale == NULL || locale[0] == '\0') { locale = getenv ("LC_ALL"); if (locale == NULL || locale[0] == '\0') { locale = getenv ("LC_CTYPE"); if (locale == NULL || locale[0] == '\0') locale = getenv ("LANG"); } } /* On some old systems, one used to set locale = "iso8859_1". On others, you set it to "language_COUNTRY.charset". In any case, we resolve it through the charset.alias file. */ codeset = locale; # endif #elif defined WIN32_NATIVE static char buf[2 + 10 + 1]; /* Woe32 has a function returning the locale's codepage as a number. */ sprintf (buf, "CP%u", GetACP ()); codeset = buf; #elif defined OS2 const char *locale; static char buf[2 + 10 + 1]; ULONG cp[3]; ULONG cplen; /* Allow user to override the codeset, as set in the operating system, with standard language environment variables. */ locale = getenv ("LC_ALL"); if (locale == NULL || locale[0] == '\0') { locale = getenv ("LC_CTYPE"); if (locale == NULL || locale[0] == '\0') locale = getenv ("LANG"); } if (locale != NULL && locale[0] != '\0') { /* If the locale name contains an encoding after the dot, return it. */ const char *dot = strchr (locale, '.'); if (dot != NULL) { const char *modifier; dot++; /* Look for the possible @... trailer and remove it, if any. */ modifier = strchr (dot, '@'); if (modifier == NULL) return dot; if (modifier - dot < sizeof (buf)) { memcpy (buf, dot, modifier - dot); buf [modifier - dot] = '\0'; return buf; } } /* Resolve through the charset.alias file. */ codeset = locale; } else { /* OS/2 has a function returning the locale's codepage as a number. */ if (DosQueryCp (sizeof (cp), cp, &cplen)) codeset = ""; else { sprintf (buf, "CP%u", cp[0]); codeset = buf; } } #endif if (codeset == NULL) /* The canonical name cannot be determined. */ codeset = ""; /* Resolve alias. */ for (aliases = get_charset_aliases (); *aliases != '\0'; aliases += strlen (aliases) + 1, aliases += strlen (aliases) + 1) if (strcmp (codeset, aliases) == 0 || (aliases[0] == '*' && aliases[1] == '\0')) { codeset = aliases + strlen (aliases) + 1; break; } /* Don't return an empty string. GNU libc and GNU libiconv interpret the empty string as denoting "the locale's character encoding", thus GNU libiconv would call this function a second time. */ if (codeset[0] == '\0') codeset = "ASCII"; return codeset; } gnuit-4.9.5/lib/full-read.c0000644000175000017500000000146611146671375012407 00000000000000/* An interface to read that retries after partial reads and interrupts. Copyright (C) 2002, 2003 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 3 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, see . */ #define FULL_READ #include "full-write.c" gnuit-4.9.5/lib/errno.in.h0000644000175000017500000001066511146671375012274 00000000000000/* A POSIX-like . Copyright (C) 2008 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 3, 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. */ #ifndef _GL_ERRNO_H #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif /* The include_next requires a split double-inclusion guard. */ #@INCLUDE_NEXT@ @NEXT_ERRNO_H@ #ifndef _GL_ERRNO_H #define _GL_ERRNO_H /* On native Windows platforms, many macros are not defined. */ # if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ /* POSIX says that EAGAIN and EWOULDBLOCK may have the same value. */ # define EWOULDBLOCK EAGAIN /* Values >= 100 seem safe to use. */ # define ETXTBSY 100 # define GNULIB_defined_ETXTBSY 1 /* These are intentionally the same values as the WSA* error numbers, defined in . */ # define EINPROGRESS 10036 # define EALREADY 10037 # define ENOTSOCK 10038 # define EDESTADDRREQ 10039 # define EMSGSIZE 10040 # define EPROTOTYPE 10041 # define ENOPROTOOPT 10042 # define EPROTONOSUPPORT 10043 # define ESOCKTNOSUPPORT 10044 /* not required by POSIX */ # define EOPNOTSUPP 10045 # define EPFNOSUPPORT 10046 /* not required by POSIX */ # define EAFNOSUPPORT 10047 # define EADDRINUSE 10048 # define EADDRNOTAVAIL 10049 # define ENETDOWN 10050 # define ENETUNREACH 10051 # define ENETRESET 10052 # define ECONNABORTED 10053 # define ECONNRESET 10054 # define ENOBUFS 10055 # define EISCONN 10056 # define ENOTCONN 10057 # define ESHUTDOWN 10058 /* not required by POSIX */ # define ETOOMANYREFS 10059 /* not required by POSIX */ # define ETIMEDOUT 10060 # define ECONNREFUSED 10061 # define ELOOP 10062 # define EHOSTDOWN 10064 /* not required by POSIX */ # define EHOSTUNREACH 10065 # define EPROCLIM 10067 /* not required by POSIX */ # define EUSERS 10068 /* not required by POSIX */ # define EDQUOT 10069 # define ESTALE 10070 # define EREMOTE 10071 /* not required by POSIX */ # define GNULIB_defined_ESOCK 1 # endif /* On OSF/1 5.1, when _XOPEN_SOURCE_EXTENDED is not defined, the macros EMULTIHOP, ENOLINK, EOVERFLOW are not defined. */ # if @EMULTIHOP_HIDDEN@ # define EMULTIHOP @EMULTIHOP_VALUE@ # define GNULIB_defined_EMULTIHOP 1 # endif # if @ENOLINK_HIDDEN@ # define ENOLINK @ENOLINK_VALUE@ # define GNULIB_defined_ENOLINK 1 # endif # if @EOVERFLOW_HIDDEN@ # define EOVERFLOW @EOVERFLOW_VALUE@ # define GNULIB_defined_EOVERFLOW 1 # endif /* On OpenBSD 4.0 and on native Windows, the macros ENOMSG, EIDRM, ENOLINK, EPROTO, EMULTIHOP, EBADMSG, EOVERFLOW, ENOTSUP, ECANCELED are not defined. Define them here. Values >= 2000 seem safe to use: Solaris ESTALE = 151, HP-UX EWOULDBLOCK = 246, IRIX EDQUOT = 1133. Note: When one of these systems defines some of these macros some day, binaries will have to be recompiled so that they recognizes the new errno values from the system. */ # ifndef ENOMSG # define ENOMSG 2000 # define GNULIB_defined_ENOMSG 1 # endif # ifndef EIDRM # define EIDRM 2001 # define GNULIB_defined_EIDRM 1 # endif # ifndef ENOLINK # define ENOLINK 2002 # define GNULIB_defined_ENOLINK 1 # endif # ifndef EPROTO # define EPROTO 2003 # define GNULIB_defined_EPROTO 1 # endif # ifndef EMULTIHOP # define EMULTIHOP 2004 # define GNULIB_defined_EMULTIHOP 1 # endif # ifndef EBADMSG # define EBADMSG 2005 # define GNULIB_defined_EBADMSG 1 # endif # ifndef EOVERFLOW # define EOVERFLOW 2006 # define GNULIB_defined_EOVERFLOW 1 # endif # ifndef ENOTSUP # define ENOTSUP 2007 # define GNULIB_defined_ENOTSUP 1 # endif # ifndef ECANCELED # define ECANCELED 2008 # define GNULIB_defined_ECANCELED 1 # endif #endif /* _GL_ERRNO_H */ #endif /* _GL_ERRNO_H */ gnuit-4.9.5/lib/safe-write.c0000644000175000017500000000143711146671375012600 00000000000000/* An interface to write that retries after interrupts. Copyright (C) 2002 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 3 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, see . */ #define SAFE_WRITE #include "safe-read.c" gnuit-4.9.5/lib/wctype.in.h0000644000175000017500000001074711146671375012463 00000000000000/* A substitute for ISO C99 , for platforms that lack it. Copyright (C) 2006-2008 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 3, 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. */ /* Written by Bruno Haible and Paul Eggert. */ /* * ISO C 99 for platforms that lack it. * * * iswctype, towctrans, towlower, towupper, wctrans, wctype, * wctrans_t, and wctype_t are not yet implemented. */ #ifndef _GL_WCTYPE_H #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif #if @HAVE_WINT_T@ /* Solaris 2.5 has a bug: must be included before . Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . */ # include # include # include # include #endif /* Include the original if it exists. BeOS 5 has the functions but no . */ /* The include_next requires a split double-inclusion guard. */ #if @HAVE_WCTYPE_H@ # @INCLUDE_NEXT@ @NEXT_WCTYPE_H@ #endif #ifndef _GL_WCTYPE_H #define _GL_WCTYPE_H /* Define wint_t. (Also done in wchar.in.h.) */ #if !@HAVE_WINT_T@ && !defined wint_t # define wint_t int # ifndef WEOF # define WEOF -1 # endif #endif /* FreeBSD 4.4 to 4.11 has but lacks the functions. Linux libc5 has and the functions but they are broken. Assume all 12 functions are implemented the same way, or not at all. */ #if ! @HAVE_ISWCNTRL@ || @REPLACE_ISWCNTRL@ /* IRIX 5.3 has macros but no functions, its isw* macros refer to an undefined variable _ctmp_ and to macros like _P, and they refer to system functions like _iswctype that are not in the standard C library. Rather than try to get ancient buggy implementations like this to work, just disable them. */ # undef iswalnum # undef iswalpha # undef iswblank # undef iswcntrl # undef iswdigit # undef iswgraph # undef iswlower # undef iswprint # undef iswpunct # undef iswspace # undef iswupper # undef iswxdigit /* Linux libc5 has and the functions but they are broken. */ # if @REPLACE_ISWCNTRL@ # define iswalnum rpl_iswalnum # define iswalpha rpl_iswalpha # define iswblank rpl_iswblank # define iswcntrl rpl_iswcntrl # define iswdigit rpl_iswdigit # define iswgraph rpl_iswgraph # define iswlower rpl_iswlower # define iswprint rpl_iswprint # define iswpunct rpl_iswpunct # define iswspace rpl_iswspace # define iswupper rpl_iswupper # define iswxdigit rpl_iswxdigit # endif static inline int iswalnum (wint_t wc) { return ((wc >= '0' && wc <= '9') || ((wc & ~0x20) >= 'A' && (wc & ~0x20) <= 'Z')); } static inline int iswalpha (wint_t wc) { return (wc & ~0x20) >= 'A' && (wc & ~0x20) <= 'Z'; } static inline int iswblank (wint_t wc) { return wc == ' ' || wc == '\t'; } static inline int iswcntrl (wint_t wc) { return (wc & ~0x1f) == 0 || wc == 0x7f; } static inline int iswdigit (wint_t wc) { return wc >= '0' && wc <= '9'; } static inline int iswgraph (wint_t wc) { return wc >= '!' && wc <= '~'; } static inline int iswlower (wint_t wc) { return wc >= 'a' && wc <= 'z'; } static inline int iswprint (wint_t wc) { return wc >= ' ' && wc <= '~'; } static inline int iswpunct (wint_t wc) { return (wc >= '!' && wc <= '~' && !((wc >= '0' && wc <= '9') || ((wc & ~0x20) >= 'A' && (wc & ~0x20) <= 'Z'))); } static inline int iswspace (wint_t wc) { return (wc == ' ' || wc == '\t' || wc == '\n' || wc == '\v' || wc == '\f' || wc == '\r'); } static inline int iswupper (wint_t wc) { return wc >= 'A' && wc <= 'Z'; } static inline int iswxdigit (wint_t wc) { return ((wc >= '0' && wc <= '9') || ((wc & ~0x20) >= 'A' && (wc & ~0x20) <= 'F')); } # endif /* ! HAVE_ISWCNTRL */ #endif /* _GL_WCTYPE_H */ #endif /* _GL_WCTYPE_H */ gnuit-4.9.5/lib/safe-read.h0000644000175000017500000000214711146671375012365 00000000000000/* An interface to read() that retries after interrupts. Copyright (C) 2002, 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 3 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, see . */ #include #ifdef __cplusplus extern "C" { #endif #define SAFE_READ_ERROR ((size_t) -1) /* Read up to COUNT bytes at BUF from descriptor FD, retrying if interrupted. Return the actual number of bytes read, zero for EOF, or SAFE_READ_ERROR upon error. */ extern size_t safe_read (int fd, void *buf, size_t count); #ifdef __cplusplus } #endif gnuit-4.9.5/lib/getopt.c0000644000175000017500000007642611146671375012046 00000000000000/* Getopt for GNU. NOTE: getopt is now part of the C library, so if you don't know what "Keep this file name-space clean" means, talk to drepper@gnu.org before changing it! Copyright (C) 1987,88,89,90,91,92,93,94,95,96,98,99,2000,2001,2002,2003,2004,2006,2008 Free Software Foundation, Inc. This file is part of the GNU C Library. 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 3 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, see . */ #ifndef _LIBC # include #endif #include "getopt.h" #include #include #include #include #ifdef _LIBC # include #else # include "gettext.h" # define _(msgid) gettext (msgid) #endif #if defined _LIBC && defined USE_IN_LIBIO # include #endif #ifndef attribute_hidden # define attribute_hidden #endif /* Unlike standard Unix `getopt', functions like `getopt_long' let the user intersperse the options with the other arguments. As `getopt_long' works, it permutes the elements of ARGV so that, when it is done, all the options precede everything else. Thus all application programs are extended to handle flexible argument order. Using `getopt' or setting the environment variable POSIXLY_CORRECT disables permutation. Then the application's behavior is completely standard. GNU application programs can use a third alternative mode in which they can distinguish the relative order of options and other arguments. */ #include "getopt_int.h" /* For communication from `getopt' to the caller. When `getopt' finds an option that takes an argument, the argument value is returned here. Also, when `ordering' is RETURN_IN_ORDER, each non-option ARGV-element is returned here. */ char *optarg; /* Index in ARGV of the next element to be scanned. This is used for communication to and from the caller and for communication between successive calls to `getopt'. On entry to `getopt', zero means this is the first call; initialize. When `getopt' returns -1, this is the index of the first of the non-option elements that the caller should itself scan. Otherwise, `optind' communicates from one call to the next how much of ARGV has been scanned so far. */ /* 1003.2 says this must be 1 before any call. */ int optind = 1; /* Callers store zero here to inhibit the error message for unrecognized options. */ int opterr = 1; /* Set to an option character which was unrecognized. This must be initialized on some systems to avoid linking in the system's own getopt implementation. */ int optopt = '?'; /* Keep a global copy of all internal members of getopt_data. */ static struct _getopt_data getopt_data; #if defined HAVE_DECL_GETENV && !HAVE_DECL_GETENV extern char *getenv (); #endif #ifdef _LIBC /* Stored original parameters. XXX This is no good solution. We should rather copy the args so that we can compare them later. But we must not use malloc(3). */ extern int __libc_argc; extern char **__libc_argv; /* Bash 2.0 gives us an environment variable containing flags indicating ARGV elements that should not be considered arguments. */ # ifdef USE_NONOPTION_FLAGS /* Defined in getopt_init.c */ extern char *__getopt_nonoption_flags; # endif # ifdef USE_NONOPTION_FLAGS # define SWAP_FLAGS(ch1, ch2) \ if (d->__nonoption_flags_len > 0) \ { \ char __tmp = __getopt_nonoption_flags[ch1]; \ __getopt_nonoption_flags[ch1] = __getopt_nonoption_flags[ch2]; \ __getopt_nonoption_flags[ch2] = __tmp; \ } # else # define SWAP_FLAGS(ch1, ch2) # endif #else /* !_LIBC */ # define SWAP_FLAGS(ch1, ch2) #endif /* _LIBC */ /* Exchange two adjacent subsequences of ARGV. One subsequence is elements [first_nonopt,last_nonopt) which contains all the non-options that have been skipped so far. The other is elements [last_nonopt,optind), which contains all the options processed since those non-options were skipped. `first_nonopt' and `last_nonopt' are relocated so that they describe the new indices of the non-options in ARGV after they are moved. */ static void exchange (char **argv, struct _getopt_data *d) { int bottom = d->__first_nonopt; int middle = d->__last_nonopt; int top = d->optind; char *tem; /* Exchange the shorter segment with the far end of the longer segment. That puts the shorter segment into the right place. It leaves the longer segment in the right place overall, but it consists of two parts that need to be swapped next. */ #if defined _LIBC && defined USE_NONOPTION_FLAGS /* First make sure the handling of the `__getopt_nonoption_flags' string can work normally. Our top argument must be in the range of the string. */ if (d->__nonoption_flags_len > 0 && top >= d->__nonoption_flags_max_len) { /* We must extend the array. The user plays games with us and presents new arguments. */ char *new_str = malloc (top + 1); if (new_str == NULL) d->__nonoption_flags_len = d->__nonoption_flags_max_len = 0; else { memset (__mempcpy (new_str, __getopt_nonoption_flags, d->__nonoption_flags_max_len), '\0', top + 1 - d->__nonoption_flags_max_len); d->__nonoption_flags_max_len = top + 1; __getopt_nonoption_flags = new_str; } } #endif while (top > middle && middle > bottom) { if (top - middle > middle - bottom) { /* Bottom segment is the short one. */ int len = middle - bottom; register int i; /* Swap it with the top part of the top segment. */ for (i = 0; i < len; i++) { tem = argv[bottom + i]; argv[bottom + i] = argv[top - (middle - bottom) + i]; argv[top - (middle - bottom) + i] = tem; SWAP_FLAGS (bottom + i, top - (middle - bottom) + i); } /* Exclude the moved bottom segment from further swapping. */ top -= len; } else { /* Top segment is the short one. */ int len = top - middle; register int i; /* Swap it with the bottom part of the bottom segment. */ for (i = 0; i < len; i++) { tem = argv[bottom + i]; argv[bottom + i] = argv[middle + i]; argv[middle + i] = tem; SWAP_FLAGS (bottom + i, middle + i); } /* Exclude the moved top segment from further swapping. */ bottom += len; } } /* Update records for the slots the non-options now occupy. */ d->__first_nonopt += (d->optind - d->__last_nonopt); d->__last_nonopt = d->optind; } /* Initialize the internal data when the first call is made. */ static const char * _getopt_initialize (int argc, char **argv, const char *optstring, int posixly_correct, struct _getopt_data *d) { /* Start processing options with ARGV-element 1 (since ARGV-element 0 is the program name); the sequence of previously skipped non-option ARGV-elements is empty. */ d->__first_nonopt = d->__last_nonopt = d->optind; d->__nextchar = NULL; d->__posixly_correct = posixly_correct || !!getenv ("POSIXLY_CORRECT"); /* Determine how to handle the ordering of options and nonoptions. */ if (optstring[0] == '-') { d->__ordering = RETURN_IN_ORDER; ++optstring; } else if (optstring[0] == '+') { d->__ordering = REQUIRE_ORDER; ++optstring; } else if (d->__posixly_correct) d->__ordering = REQUIRE_ORDER; else d->__ordering = PERMUTE; #if defined _LIBC && defined USE_NONOPTION_FLAGS if (!d->__posixly_correct && argc == __libc_argc && argv == __libc_argv) { if (d->__nonoption_flags_max_len == 0) { if (__getopt_nonoption_flags == NULL || __getopt_nonoption_flags[0] == '\0') d->__nonoption_flags_max_len = -1; else { const char *orig_str = __getopt_nonoption_flags; int len = d->__nonoption_flags_max_len = strlen (orig_str); if (d->__nonoption_flags_max_len < argc) d->__nonoption_flags_max_len = argc; __getopt_nonoption_flags = (char *) malloc (d->__nonoption_flags_max_len); if (__getopt_nonoption_flags == NULL) d->__nonoption_flags_max_len = -1; else memset (__mempcpy (__getopt_nonoption_flags, orig_str, len), '\0', d->__nonoption_flags_max_len - len); } } d->__nonoption_flags_len = d->__nonoption_flags_max_len; } else d->__nonoption_flags_len = 0; #endif return optstring; } /* Scan elements of ARGV (whose length is ARGC) for option characters given in OPTSTRING. If an element of ARGV starts with '-', and is not exactly "-" or "--", then it is an option element. The characters of this element (aside from the initial '-') are option characters. If `getopt' is called repeatedly, it returns successively each of the option characters from each of the option elements. If `getopt' finds another option character, it returns that character, updating `optind' and `nextchar' so that the next call to `getopt' can resume the scan with the following option character or ARGV-element. If there are no more option characters, `getopt' returns -1. Then `optind' is the index in ARGV of the first ARGV-element that is not an option. (The ARGV-elements have been permuted so that those that are not options now come last.) OPTSTRING is a string containing the legitimate option characters. If an option character is seen that is not listed in OPTSTRING, return '?' after printing an error message. If you set `opterr' to zero, the error message is suppressed but we still return '?'. If a char in OPTSTRING is followed by a colon, that means it wants an arg, so the following text in the same ARGV-element, or the text of the following ARGV-element, is returned in `optarg'. Two colons mean an option that wants an optional arg; if there is text in the current ARGV-element, it is returned in `optarg', otherwise `optarg' is set to zero. If OPTSTRING starts with `-' or `+', it requests different methods of handling the non-option ARGV-elements. See the comments about RETURN_IN_ORDER and REQUIRE_ORDER, above. Long-named options begin with `--' instead of `-'. Their names may be abbreviated as long as the abbreviation is unique or is an exact match for some defined option. If they have an argument, it follows the option name in the same ARGV-element, separated from the option name by a `=', or else the in next ARGV-element. When `getopt' finds a long-named option, it returns 0 if that option's `flag' field is nonzero, the value of the option's `val' field if the `flag' field is zero. LONGOPTS is a vector of `struct option' terminated by an element containing a name which is zero. LONGIND returns the index in LONGOPT of the long-named option found. It is only valid when a long-named option has been found by the most recent call. If LONG_ONLY is nonzero, '-' as well as '--' can introduce long-named options. If POSIXLY_CORRECT is nonzero, behave as if the POSIXLY_CORRECT environment variable were set. */ int _getopt_internal_r (int argc, char **argv, const char *optstring, const struct option *longopts, int *longind, int long_only, int posixly_correct, struct _getopt_data *d) { int print_errors = d->opterr; if (optstring[0] == ':') print_errors = 0; if (argc < 1) return -1; d->optarg = NULL; if (d->optind == 0 || !d->__initialized) { if (d->optind == 0) d->optind = 1; /* Don't scan ARGV[0], the program name. */ optstring = _getopt_initialize (argc, argv, optstring, posixly_correct, d); d->__initialized = 1; } /* Test whether ARGV[optind] points to a non-option argument. Either it does not have option syntax, or there is an environment flag from the shell indicating it is not an option. The later information is only used when the used in the GNU libc. */ #if defined _LIBC && defined USE_NONOPTION_FLAGS # define NONOPTION_P (argv[d->optind][0] != '-' || argv[d->optind][1] == '\0' \ || (d->optind < d->__nonoption_flags_len \ && __getopt_nonoption_flags[d->optind] == '1')) #else # define NONOPTION_P (argv[d->optind][0] != '-' || argv[d->optind][1] == '\0') #endif if (d->__nextchar == NULL || *d->__nextchar == '\0') { /* Advance to the next ARGV-element. */ /* Give FIRST_NONOPT & LAST_NONOPT rational values if OPTIND has been moved back by the user (who may also have changed the arguments). */ if (d->__last_nonopt > d->optind) d->__last_nonopt = d->optind; if (d->__first_nonopt > d->optind) d->__first_nonopt = d->optind; if (d->__ordering == PERMUTE) { /* If we have just processed some options following some non-options, exchange them so that the options come first. */ if (d->__first_nonopt != d->__last_nonopt && d->__last_nonopt != d->optind) exchange ((char **) argv, d); else if (d->__last_nonopt != d->optind) d->__first_nonopt = d->optind; /* Skip any additional non-options and extend the range of non-options previously skipped. */ while (d->optind < argc && NONOPTION_P) d->optind++; d->__last_nonopt = d->optind; } /* The special ARGV-element `--' means premature end of options. Skip it like a null option, then exchange with previous non-options as if it were an option, then skip everything else like a non-option. */ if (d->optind != argc && !strcmp (argv[d->optind], "--")) { d->optind++; if (d->__first_nonopt != d->__last_nonopt && d->__last_nonopt != d->optind) exchange ((char **) argv, d); else if (d->__first_nonopt == d->__last_nonopt) d->__first_nonopt = d->optind; d->__last_nonopt = argc; d->optind = argc; } /* If we have done all the ARGV-elements, stop the scan and back over any non-options that we skipped and permuted. */ if (d->optind == argc) { /* Set the next-arg-index to point at the non-options that we previously skipped, so the caller will digest them. */ if (d->__first_nonopt != d->__last_nonopt) d->optind = d->__first_nonopt; return -1; } /* If we have come to a non-option and did not permute it, either stop the scan or describe it to the caller and pass it by. */ if (NONOPTION_P) { if (d->__ordering == REQUIRE_ORDER) return -1; d->optarg = argv[d->optind++]; return 1; } /* We have found another option-ARGV-element. Skip the initial punctuation. */ d->__nextchar = (argv[d->optind] + 1 + (longopts != NULL && argv[d->optind][1] == '-')); } /* Decode the current option-ARGV-element. */ /* Check whether the ARGV-element is a long option. If long_only and the ARGV-element has the form "-f", where f is a valid short option, don't consider it an abbreviated form of a long option that starts with f. Otherwise there would be no way to give the -f short option. On the other hand, if there's a long option "fubar" and the ARGV-element is "-fu", do consider that an abbreviation of the long option, just like "--fu", and not "-f" with arg "u". This distinction seems to be the most useful approach. */ if (longopts != NULL && (argv[d->optind][1] == '-' || (long_only && (argv[d->optind][2] || !strchr (optstring, argv[d->optind][1]))))) { char *nameend; const struct option *p; const struct option *pfound = NULL; int exact = 0; int ambig = 0; int indfound = -1; int option_index; for (nameend = d->__nextchar; *nameend && *nameend != '='; nameend++) /* Do nothing. */ ; /* Test all long options for either exact match or abbreviated matches. */ for (p = longopts, option_index = 0; p->name; p++, option_index++) if (!strncmp (p->name, d->__nextchar, nameend - d->__nextchar)) { if ((unsigned int) (nameend - d->__nextchar) == (unsigned int) strlen (p->name)) { /* Exact match found. */ pfound = p; indfound = option_index; exact = 1; break; } else if (pfound == NULL) { /* First nonexact match found. */ pfound = p; indfound = option_index; } else if (long_only || pfound->has_arg != p->has_arg || pfound->flag != p->flag || pfound->val != p->val) /* Second or later nonexact match found. */ ambig = 1; } if (ambig && !exact) { if (print_errors) { #if defined _LIBC && defined USE_IN_LIBIO char *buf; if (__asprintf (&buf, _("%s: option `%s' is ambiguous\n"), argv[0], argv[d->optind]) >= 0) { _IO_flockfile (stderr); int old_flags2 = ((_IO_FILE *) stderr)->_flags2; ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; __fxprintf (NULL, "%s", buf); ((_IO_FILE *) stderr)->_flags2 = old_flags2; _IO_funlockfile (stderr); free (buf); } #else fprintf (stderr, _("%s: option `%s' is ambiguous\n"), argv[0], argv[d->optind]); #endif } d->__nextchar += strlen (d->__nextchar); d->optind++; d->optopt = 0; return '?'; } if (pfound != NULL) { option_index = indfound; d->optind++; if (*nameend) { /* Don't test has_arg with >, because some C compilers don't allow it to be used on enums. */ if (pfound->has_arg) d->optarg = nameend + 1; else { if (print_errors) { #if defined _LIBC && defined USE_IN_LIBIO char *buf; int n; #endif if (argv[d->optind - 1][1] == '-') { /* --option */ #if defined _LIBC && defined USE_IN_LIBIO n = __asprintf (&buf, _("\ %s: option `--%s' doesn't allow an argument\n"), argv[0], pfound->name); #else fprintf (stderr, _("\ %s: option `--%s' doesn't allow an argument\n"), argv[0], pfound->name); #endif } else { /* +option or -option */ #if defined _LIBC && defined USE_IN_LIBIO n = __asprintf (&buf, _("\ %s: option `%c%s' doesn't allow an argument\n"), argv[0], argv[d->optind - 1][0], pfound->name); #else fprintf (stderr, _("\ %s: option `%c%s' doesn't allow an argument\n"), argv[0], argv[d->optind - 1][0], pfound->name); #endif } #if defined _LIBC && defined USE_IN_LIBIO if (n >= 0) { _IO_flockfile (stderr); int old_flags2 = ((_IO_FILE *) stderr)->_flags2; ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; __fxprintf (NULL, "%s", buf); ((_IO_FILE *) stderr)->_flags2 = old_flags2; _IO_funlockfile (stderr); free (buf); } #endif } d->__nextchar += strlen (d->__nextchar); d->optopt = pfound->val; return '?'; } } else if (pfound->has_arg == 1) { if (d->optind < argc) d->optarg = argv[d->optind++]; else { if (print_errors) { #if defined _LIBC && defined USE_IN_LIBIO char *buf; if (__asprintf (&buf, _("\ %s: option `%s' requires an argument\n"), argv[0], argv[d->optind - 1]) >= 0) { _IO_flockfile (stderr); int old_flags2 = ((_IO_FILE *) stderr)->_flags2; ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; __fxprintf (NULL, "%s", buf); ((_IO_FILE *) stderr)->_flags2 = old_flags2; _IO_funlockfile (stderr); free (buf); } #else fprintf (stderr, _("%s: option `%s' requires an argument\n"), argv[0], argv[d->optind - 1]); #endif } d->__nextchar += strlen (d->__nextchar); d->optopt = pfound->val; return optstring[0] == ':' ? ':' : '?'; } } d->__nextchar += strlen (d->__nextchar); if (longind != NULL) *longind = option_index; if (pfound->flag) { *(pfound->flag) = pfound->val; return 0; } return pfound->val; } /* Can't find it as a long option. If this is not getopt_long_only, or the option starts with '--' or is not a valid short option, then it's an error. Otherwise interpret it as a short option. */ if (!long_only || argv[d->optind][1] == '-' || strchr (optstring, *d->__nextchar) == NULL) { if (print_errors) { #if defined _LIBC && defined USE_IN_LIBIO char *buf; int n; #endif if (argv[d->optind][1] == '-') { /* --option */ #if defined _LIBC && defined USE_IN_LIBIO n = __asprintf (&buf, _("%s: unrecognized option `--%s'\n"), argv[0], d->__nextchar); #else fprintf (stderr, _("%s: unrecognized option `--%s'\n"), argv[0], d->__nextchar); #endif } else { /* +option or -option */ #if defined _LIBC && defined USE_IN_LIBIO n = __asprintf (&buf, _("%s: unrecognized option `%c%s'\n"), argv[0], argv[d->optind][0], d->__nextchar); #else fprintf (stderr, _("%s: unrecognized option `%c%s'\n"), argv[0], argv[d->optind][0], d->__nextchar); #endif } #if defined _LIBC && defined USE_IN_LIBIO if (n >= 0) { _IO_flockfile (stderr); int old_flags2 = ((_IO_FILE *) stderr)->_flags2; ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; __fxprintf (NULL, "%s", buf); ((_IO_FILE *) stderr)->_flags2 = old_flags2; _IO_funlockfile (stderr); free (buf); } #endif } d->__nextchar = (char *) ""; d->optind++; d->optopt = 0; return '?'; } } /* Look at and handle the next short option-character. */ { char c = *d->__nextchar++; char *temp = strchr (optstring, c); /* Increment `optind' when we start to process its last character. */ if (*d->__nextchar == '\0') ++d->optind; if (temp == NULL || c == ':') { if (print_errors) { #if defined _LIBC && defined USE_IN_LIBIO char *buf; int n; #endif if (d->__posixly_correct) { /* 1003.2 specifies the format of this message. */ #if defined _LIBC && defined USE_IN_LIBIO n = __asprintf (&buf, _("%s: illegal option -- %c\n"), argv[0], c); #else fprintf (stderr, _("%s: illegal option -- %c\n"), argv[0], c); #endif } else { #if defined _LIBC && defined USE_IN_LIBIO n = __asprintf (&buf, _("%s: invalid option -- %c\n"), argv[0], c); #else fprintf (stderr, _("%s: invalid option -- %c\n"), argv[0], c); #endif } #if defined _LIBC && defined USE_IN_LIBIO if (n >= 0) { _IO_flockfile (stderr); int old_flags2 = ((_IO_FILE *) stderr)->_flags2; ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; __fxprintf (NULL, "%s", buf); ((_IO_FILE *) stderr)->_flags2 = old_flags2; _IO_funlockfile (stderr); free (buf); } #endif } d->optopt = c; return '?'; } /* Convenience. Treat POSIX -W foo same as long option --foo */ if (temp[0] == 'W' && temp[1] == ';') { char *nameend; const struct option *p; const struct option *pfound = NULL; int exact = 0; int ambig = 0; int indfound = 0; int option_index; /* This is an option that requires an argument. */ if (*d->__nextchar != '\0') { d->optarg = d->__nextchar; /* If we end this ARGV-element by taking the rest as an arg, we must advance to the next element now. */ d->optind++; } else if (d->optind == argc) { if (print_errors) { /* 1003.2 specifies the format of this message. */ #if defined _LIBC && defined USE_IN_LIBIO char *buf; if (__asprintf (&buf, _("%s: option requires an argument -- %c\n"), argv[0], c) >= 0) { _IO_flockfile (stderr); int old_flags2 = ((_IO_FILE *) stderr)->_flags2; ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; __fxprintf (NULL, "%s", buf); ((_IO_FILE *) stderr)->_flags2 = old_flags2; _IO_funlockfile (stderr); free (buf); } #else fprintf (stderr, _("%s: option requires an argument -- %c\n"), argv[0], c); #endif } d->optopt = c; if (optstring[0] == ':') c = ':'; else c = '?'; return c; } else /* We already incremented `d->optind' once; increment it again when taking next ARGV-elt as argument. */ d->optarg = argv[d->optind++]; /* optarg is now the argument, see if it's in the table of longopts. */ for (d->__nextchar = nameend = d->optarg; *nameend && *nameend != '='; nameend++) /* Do nothing. */ ; /* Test all long options for either exact match or abbreviated matches. */ for (p = longopts, option_index = 0; p->name; p++, option_index++) if (!strncmp (p->name, d->__nextchar, nameend - d->__nextchar)) { if ((unsigned int) (nameend - d->__nextchar) == strlen (p->name)) { /* Exact match found. */ pfound = p; indfound = option_index; exact = 1; break; } else if (pfound == NULL) { /* First nonexact match found. */ pfound = p; indfound = option_index; } else /* Second or later nonexact match found. */ ambig = 1; } if (ambig && !exact) { if (print_errors) { #if defined _LIBC && defined USE_IN_LIBIO char *buf; if (__asprintf (&buf, _("%s: option `-W %s' is ambiguous\n"), argv[0], argv[d->optind]) >= 0) { _IO_flockfile (stderr); int old_flags2 = ((_IO_FILE *) stderr)->_flags2; ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; __fxprintf (NULL, "%s", buf); ((_IO_FILE *) stderr)->_flags2 = old_flags2; _IO_funlockfile (stderr); free (buf); } #else fprintf (stderr, _("%s: option `-W %s' is ambiguous\n"), argv[0], argv[d->optind]); #endif } d->__nextchar += strlen (d->__nextchar); d->optind++; return '?'; } if (pfound != NULL) { option_index = indfound; if (*nameend) { /* Don't test has_arg with >, because some C compilers don't allow it to be used on enums. */ if (pfound->has_arg) d->optarg = nameend + 1; else { if (print_errors) { #if defined _LIBC && defined USE_IN_LIBIO char *buf; if (__asprintf (&buf, _("\ %s: option `-W %s' doesn't allow an argument\n"), argv[0], pfound->name) >= 0) { _IO_flockfile (stderr); int old_flags2 = ((_IO_FILE *) stderr)->_flags2; ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; __fxprintf (NULL, "%s", buf); ((_IO_FILE *) stderr)->_flags2 = old_flags2; _IO_funlockfile (stderr); free (buf); } #else fprintf (stderr, _("\ %s: option `-W %s' doesn't allow an argument\n"), argv[0], pfound->name); #endif } d->__nextchar += strlen (d->__nextchar); return '?'; } } else if (pfound->has_arg == 1) { if (d->optind < argc) d->optarg = argv[d->optind++]; else { if (print_errors) { #if defined _LIBC && defined USE_IN_LIBIO char *buf; if (__asprintf (&buf, _("\ %s: option `%s' requires an argument\n"), argv[0], argv[d->optind - 1]) >= 0) { _IO_flockfile (stderr); int old_flags2 = ((_IO_FILE *) stderr)->_flags2; ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; __fxprintf (NULL, "%s", buf); ((_IO_FILE *) stderr)->_flags2 = old_flags2; _IO_funlockfile (stderr); free (buf); } #else fprintf (stderr, _("%s: option `%s' requires an argument\n"), argv[0], argv[d->optind - 1]); #endif } d->__nextchar += strlen (d->__nextchar); return optstring[0] == ':' ? ':' : '?'; } } d->__nextchar += strlen (d->__nextchar); if (longind != NULL) *longind = option_index; if (pfound->flag) { *(pfound->flag) = pfound->val; return 0; } return pfound->val; } d->__nextchar = NULL; return 'W'; /* Let the application handle it. */ } if (temp[1] == ':') { if (temp[2] == ':') { /* This is an option that accepts an argument optionally. */ if (*d->__nextchar != '\0') { d->optarg = d->__nextchar; d->optind++; } else d->optarg = NULL; d->__nextchar = NULL; } else { /* This is an option that requires an argument. */ if (*d->__nextchar != '\0') { d->optarg = d->__nextchar; /* If we end this ARGV-element by taking the rest as an arg, we must advance to the next element now. */ d->optind++; } else if (d->optind == argc) { if (print_errors) { /* 1003.2 specifies the format of this message. */ #if defined _LIBC && defined USE_IN_LIBIO char *buf; if (__asprintf (&buf, _("\ %s: option requires an argument -- %c\n"), argv[0], c) >= 0) { _IO_flockfile (stderr); int old_flags2 = ((_IO_FILE *) stderr)->_flags2; ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; __fxprintf (NULL, "%s", buf); ((_IO_FILE *) stderr)->_flags2 = old_flags2; _IO_funlockfile (stderr); free (buf); } #else fprintf (stderr, _("%s: option requires an argument -- %c\n"), argv[0], c); #endif } d->optopt = c; if (optstring[0] == ':') c = ':'; else c = '?'; } else /* We already incremented `optind' once; increment it again when taking next ARGV-elt as argument. */ d->optarg = argv[d->optind++]; d->__nextchar = NULL; } } return c; } } int _getopt_internal (int argc, char **argv, const char *optstring, const struct option *longopts, int *longind, int long_only, int posixly_correct) { int result; getopt_data.optind = optind; getopt_data.opterr = opterr; result = _getopt_internal_r (argc, argv, optstring, longopts, longind, long_only, posixly_correct, &getopt_data); optind = getopt_data.optind; optarg = getopt_data.optarg; optopt = getopt_data.optopt; return result; } /* glibc gets a LSB-compliant getopt. Standalone applications get a POSIX-compliant getopt. */ #if _LIBC enum { POSIXLY_CORRECT = 0 }; #else enum { POSIXLY_CORRECT = 1 }; #endif int getopt (int argc, char *const *argv, const char *optstring) { return _getopt_internal (argc, (char **) argv, optstring, NULL, NULL, 0, POSIXLY_CORRECT); } #ifdef TEST /* Compile with -DTEST to make an executable for use in testing the above definition of `getopt'. */ int main (int argc, char **argv) { int c; int digit_optind = 0; while (1) { int this_option_optind = optind ? optind : 1; c = getopt (argc, argv, "abc:d:0123456789"); if (c == -1) break; switch (c) { case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': if (digit_optind != 0 && digit_optind != this_option_optind) printf ("digits occur in two different argv-elements.\n"); digit_optind = this_option_optind; printf ("option %c\n", c); break; case 'a': printf ("option a\n"); break; case 'b': printf ("option b\n"); break; case 'c': printf ("option c with value `%s'\n", optarg); break; case '?': break; default: printf ("?? getopt returned character code 0%o ??\n", c); } } if (optind < argc) { printf ("non-option ARGV-elements: "); while (optind < argc) printf ("%s ", argv[optind++]); printf ("\n"); } exit (0); } #endif /* TEST */ gnuit-4.9.5/lib/full-write.h0000644000175000017500000000215311146671375012625 00000000000000/* An interface to write() that writes all it is asked to write. Copyright (C) 2002-2003 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 3 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, see . */ #include #ifdef __cplusplus extern "C" { #endif /* Write COUNT bytes at BUF to descriptor FD, retrying if interrupted or if partial writes occur. Return the number of bytes successfully written, setting errno if that is less than COUNT. */ extern size_t full_write (int fd, const void *buf, size_t count); #ifdef __cplusplus } #endif gnuit-4.9.5/lib/malloca.h0000644000175000017500000001103411146671375012141 00000000000000/* Safe automatic memory allocation. Copyright (C) 2003-2007 Free Software Foundation, Inc. Written by Bruno Haible , 2003. 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 3, 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. */ #ifndef _MALLOCA_H #define _MALLOCA_H #include #include #include #ifdef __cplusplus extern "C" { #endif /* safe_alloca(N) is equivalent to alloca(N) when it is safe to call alloca(N); otherwise it returns NULL. It either returns N bytes of memory allocated on the stack, that lasts until the function returns, or NULL. Use of safe_alloca should be avoided: - inside arguments of function calls - undefined behaviour, - in inline functions - the allocation may actually last until the calling function returns. */ #if HAVE_ALLOCA /* The OS usually guarantees only one guard page at the bottom of the stack, and a page size can be as small as 4096 bytes. So we cannot safely allocate anything larger than 4096 bytes. Also care for the possibility of a few compiler-allocated temporary stack slots. This must be a macro, not an inline function. */ # define safe_alloca(N) ((N) < 4032 ? alloca (N) : NULL) #else # define safe_alloca(N) ((void) (N), NULL) #endif /* malloca(N) is a safe variant of alloca(N). It allocates N bytes of memory allocated on the stack, that must be freed using freea() before the function returns. Upon failure, it returns NULL. */ #if HAVE_ALLOCA # define malloca(N) \ ((N) < 4032 - sa_increment \ ? (void *) ((char *) alloca ((N) + sa_increment) + sa_increment) \ : mmalloca (N)) #else # define malloca(N) \ mmalloca (N) #endif extern void * mmalloca (size_t n); /* Free a block of memory allocated through malloca(). */ #if HAVE_ALLOCA extern void freea (void *p); #else # define freea free #endif /* nmalloca(N,S) is an overflow-safe variant of malloca (N * S). It allocates an array of N objects, each with S bytes of memory, on the stack. S must be positive and N must be nonnegative. The array must be freed using freea() before the function returns. */ #if 1 /* Cf. the definition of xalloc_oversized. */ # define nmalloca(n, s) \ ((n) > (size_t) (sizeof (ptrdiff_t) <= sizeof (size_t) ? -1 : -2) / (s) \ ? NULL \ : malloca ((n) * (s))) #else extern void * nmalloca (size_t n, size_t s); #endif #ifdef __cplusplus } #endif /* ------------------- Auxiliary, non-public definitions ------------------- */ /* Determine the alignment of a type at compile time. */ #if defined __GNUC__ # define sa_alignof __alignof__ #elif defined __cplusplus template struct sa_alignof_helper { char __slot1; type __slot2; }; # define sa_alignof(type) offsetof (sa_alignof_helper, __slot2) #elif defined __hpux /* Work around a HP-UX 10.20 cc bug with enums constants defined as offsetof values. */ # define sa_alignof(type) (sizeof (type) <= 4 ? 4 : 8) #elif defined _AIX /* Work around an AIX 3.2.5 xlc bug with enums constants defined as offsetof values. */ # define sa_alignof(type) (sizeof (type) <= 4 ? 4 : 8) #else # define sa_alignof(type) offsetof (struct { char __slot1; type __slot2; }, __slot2) #endif enum { /* The desired alignment of memory allocations is the maximum alignment among all elementary types. */ sa_alignment_long = sa_alignof (long), sa_alignment_double = sa_alignof (double), #if HAVE_LONG_LONG_INT sa_alignment_longlong = sa_alignof (long long), #endif sa_alignment_longdouble = sa_alignof (long double), sa_alignment_max = ((sa_alignment_long - 1) | (sa_alignment_double - 1) #if HAVE_LONG_LONG_INT | (sa_alignment_longlong - 1) #endif | (sa_alignment_longdouble - 1) ) + 1, /* The increment that guarantees room for a magic word must be >= sizeof (int) and a multiple of sa_alignment_max. */ sa_increment = ((sizeof (int) + sa_alignment_max - 1) / sa_alignment_max) * sa_alignment_max }; #endif /* _MALLOCA_H */ gnuit-4.9.5/lib/argmatch.c0000644000175000017500000001635511146671375012325 00000000000000/* argmatch.c -- find a match for a string in an array Copyright (C) 1990, 1998, 1999, 2001, 2002, 2003, 2004, 2005, 2006, 2007 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 3 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, see . */ /* Written by David MacKenzie Modified by Akim Demaille */ #include /* Specification. */ #include "argmatch.h" #include #include #include #include #include "gettext.h" #define _(msgid) gettext (msgid) #include "error.h" #include "quotearg.h" #include "quote.h" #if USE_UNLOCKED_IO # include "unlocked-io.h" #endif /* When reporting an invalid argument, show nonprinting characters by using the quoting style ARGMATCH_QUOTING_STYLE. Do not use literal_quoting_style. */ #ifndef ARGMATCH_QUOTING_STYLE # define ARGMATCH_QUOTING_STYLE locale_quoting_style #endif /* Non failing version of argmatch call this function after failing. */ #ifndef ARGMATCH_DIE # include "exitfail.h" # define ARGMATCH_DIE exit (exit_failure) #endif #ifdef ARGMATCH_DIE_DECL ARGMATCH_DIE_DECL; #endif static void __argmatch_die (void) { ARGMATCH_DIE; } /* Used by XARGMATCH and XARGCASEMATCH. See description in argmatch.h. Default to __argmatch_die, but allow caller to change this at run-time. */ argmatch_exit_fn argmatch_die = __argmatch_die; /* If ARG is an unambiguous match for an element of the NULL-terminated array ARGLIST, return the index in ARGLIST of the matched element, else -1 if it does not match any element or -2 if it is ambiguous (is a prefix of more than one element). If VALLIST is none null, use it to resolve ambiguities limited to synonyms, i.e., for "yes", "yop" -> 0 "no", "nope" -> 1 "y" is a valid argument, for `0', and "n" for `1'. */ ptrdiff_t argmatch (const char *arg, const char *const *arglist, const char *vallist, size_t valsize) { size_t i; /* Temporary index in ARGLIST. */ size_t arglen; /* Length of ARG. */ ptrdiff_t matchind = -1; /* Index of first nonexact match. */ bool ambiguous = false; /* If true, multiple nonexact match(es). */ arglen = strlen (arg); /* Test all elements for either exact match or abbreviated matches. */ for (i = 0; arglist[i]; i++) { if (!strncmp (arglist[i], arg, arglen)) { if (strlen (arglist[i]) == arglen) /* Exact match found. */ return i; else if (matchind == -1) /* First nonexact match found. */ matchind = i; else { /* Second nonexact match found. */ if (vallist == NULL || memcmp (vallist + valsize * matchind, vallist + valsize * i, valsize)) { /* There is a real ambiguity, or we could not disambiguate. */ ambiguous = true; } } } } if (ambiguous) return -2; else return matchind; } /* Error reporting for argmatch. CONTEXT is a description of the type of entity that was being matched. VALUE is the invalid value that was given. PROBLEM is the return value from argmatch. */ void argmatch_invalid (const char *context, const char *value, ptrdiff_t problem) { char const *format = (problem == -1 ? _("invalid argument %s for %s") : _("ambiguous argument %s for %s")); error (0, 0, format, quotearg_n_style (0, ARGMATCH_QUOTING_STYLE, value), quote_n (1, context)); } /* List the valid arguments for argmatch. ARGLIST is the same as in argmatch. VALLIST is a pointer to an array of values. VALSIZE is the size of the elements of VALLIST */ void argmatch_valid (const char *const *arglist, const char *vallist, size_t valsize) { size_t i; const char *last_val = NULL; /* We try to put synonyms on the same line. The assumption is that synonyms follow each other */ fprintf (stderr, _("Valid arguments are:")); for (i = 0; arglist[i]; i++) if ((i == 0) || memcmp (last_val, vallist + valsize * i, valsize)) { fprintf (stderr, "\n - `%s'", arglist[i]); last_val = vallist + valsize * i; } else { fprintf (stderr, ", `%s'", arglist[i]); } putc ('\n', stderr); } /* Never failing versions of the previous functions. CONTEXT is the context for which argmatch is called (e.g., "--version-control", or "$VERSION_CONTROL" etc.). Upon failure, calls the (supposed never to return) function EXIT_FN. */ ptrdiff_t __xargmatch_internal (const char *context, const char *arg, const char *const *arglist, const char *vallist, size_t valsize, argmatch_exit_fn exit_fn) { ptrdiff_t res = argmatch (arg, arglist, vallist, valsize); if (res >= 0) /* Success. */ return res; /* We failed. Explain why. */ argmatch_invalid (context, arg, res); argmatch_valid (arglist, vallist, valsize); (*exit_fn) (); return -1; /* To please the compilers. */ } /* Look for VALUE in VALLIST, an array of objects of size VALSIZE and return the first corresponding argument in ARGLIST */ const char * argmatch_to_argument (const char *value, const char *const *arglist, const char *vallist, size_t valsize) { size_t i; for (i = 0; arglist[i]; i++) if (!memcmp (value, vallist + valsize * i, valsize)) return arglist[i]; return NULL; } #ifdef TEST /* * Based on "getversion.c" by David MacKenzie */ char *program_name; /* When to make backup files. */ enum backup_type { /* Never make backups. */ no_backups, /* Make simple backups of every file. */ simple_backups, /* Make numbered backups of files that already have numbered backups, and simple backups of the others. */ numbered_existing_backups, /* Make numbered backups of every file. */ numbered_backups }; /* Two tables describing arguments (keys) and their corresponding values */ static const char *const backup_args[] = { "no", "none", "off", "simple", "never", "existing", "nil", "numbered", "t", 0 }; static const enum backup_type backup_vals[] = { no_backups, no_backups, no_backups, simple_backups, simple_backups, numbered_existing_backups, numbered_existing_backups, numbered_backups, numbered_backups }; int main (int argc, const char *const *argv) { const char *cp; enum backup_type backup_type = no_backups; program_name = (char *) argv[0]; if (argc > 2) { fprintf (stderr, "Usage: %s [VERSION_CONTROL]\n", program_name); exit (1); } if ((cp = getenv ("VERSION_CONTROL"))) backup_type = XARGMATCH ("$VERSION_CONTROL", cp, backup_args, backup_vals); if (argc == 2) backup_type = XARGMATCH (program_name, argv[1], backup_args, backup_vals); printf ("The version control is `%s'\n", ARGMATCH_TO_ARGUMENT (backup_type, backup_args, backup_vals)); return 0; } #endif gnuit-4.9.5/lib/exitfail.c0000644000175000017500000000153011146671375012331 00000000000000/* Failure exit status Copyright (C) 2002, 2003, 2005, 2006, 2007 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 3 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, see . */ #include #include "exitfail.h" #include int volatile exit_failure = EXIT_FAILURE; gnuit-4.9.5/lib/unistd.in.h0000644000175000017500000004331211146671375012450 00000000000000/* Substitute for and wrapper around . Copyright (C) 2003-2009 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 3, 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. */ #ifndef _GL_UNISTD_H #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif /* The include_next requires a split double-inclusion guard. */ #if @HAVE_UNISTD_H@ # @INCLUDE_NEXT@ @NEXT_UNISTD_H@ #endif #ifndef _GL_UNISTD_H #define _GL_UNISTD_H /* mingw doesn't define the SEEK_* or *_FILENO macros in . */ #if !(defined SEEK_CUR && defined SEEK_END && defined SEEK_SET) # include #endif /* mingw fails to declare _exit in . */ /* mingw, BeOS, Haiku declare environ in , not in . */ #include #if @GNULIB_WRITE@ && @REPLACE_WRITE@ && @GNULIB_UNISTD_H_SIGPIPE@ /* Get ssize_t. */ # include #endif #if @GNULIB_GETHOSTNAME@ /* Get all possible declarations of gethostname(). */ # if @UNISTD_H_HAVE_WINSOCK2_H@ # include # if !defined _GL_SYS_SOCKET_H # undef socket # define socket socket_used_without_including_sys_socket_h # undef connect # define connect connect_used_without_including_sys_socket_h # undef accept # define accept accept_used_without_including_sys_socket_h # undef bind # define bind bind_used_without_including_sys_socket_h # undef getpeername # define getpeername getpeername_used_without_including_sys_socket_h # undef getsockname # define getsockname getsockname_used_without_including_sys_socket_h # undef getsockopt # define getsockopt getsockopt_used_without_including_sys_socket_h # undef listen # define listen listen_used_without_including_sys_socket_h # undef recv # define recv recv_used_without_including_sys_socket_h # undef send # define send send_used_without_including_sys_socket_h # undef recvfrom # define recvfrom recvfrom_used_without_including_sys_socket_h # undef sendto # define sendto sendto_used_without_including_sys_socket_h # undef setsockopt # define setsockopt setsockopt_used_without_including_sys_socket_h # undef shutdown # define shutdown shutdown_used_without_including_sys_socket_h # endif # if !defined _GL_SYS_SELECT_H # undef select # define select select_used_without_including_sys_select_h # endif # endif #endif /* The definition of GL_LINK_WARNING is copied here. */ /* OS/2 EMX lacks these macros. */ #ifndef STDIN_FILENO # define STDIN_FILENO 0 #endif #ifndef STDOUT_FILENO # define STDOUT_FILENO 1 #endif #ifndef STDERR_FILENO # define STDERR_FILENO 2 #endif /* Declare overridden functions. */ #ifdef __cplusplus extern "C" { #endif #if @GNULIB_CHOWN@ # if @REPLACE_CHOWN@ # ifndef REPLACE_CHOWN # define REPLACE_CHOWN 1 # endif # if REPLACE_CHOWN /* Change the owner of FILE to UID (if UID is not -1) and the group of FILE to GID (if GID is not -1). Follow symbolic links. Return 0 if successful, otherwise -1 and errno set. See the POSIX:2001 specification . */ # define chown rpl_chown extern int chown (const char *file, uid_t uid, gid_t gid); # endif # endif #elif defined GNULIB_POSIXCHECK # undef chown # define chown(f,u,g) \ (GL_LINK_WARNING ("chown fails to follow symlinks on some systems and " \ "doesn't treat a uid or gid of -1 on some systems - " \ "use gnulib module chown for portability"), \ chown (f, u, g)) #endif #if @GNULIB_CLOSE@ # if @UNISTD_H_HAVE_WINSOCK2_H@ /* Need a gnulib internal function. */ # define HAVE__GL_CLOSE_FD_MAYBE_SOCKET 1 # endif # if @REPLACE_CLOSE@ /* Automatically included by modules that need a replacement for close. */ # undef close # define close rpl_close extern int close (int); # endif #elif @UNISTD_H_HAVE_WINSOCK2_H@ # undef close # define close close_used_without_requesting_gnulib_module_close #elif defined GNULIB_POSIXCHECK # undef close # define close(f) \ (GL_LINK_WARNING ("close does not portably work on sockets - " \ "use gnulib module close for portability"), \ close (f)) #endif #if @GNULIB_DUP2@ # if !@HAVE_DUP2@ /* Copy the file descriptor OLDFD into file descriptor NEWFD. Do nothing if NEWFD = OLDFD, otherwise close NEWFD first if it is open. Return 0 if successful, otherwise -1 and errno set. See the POSIX:2001 specification . */ extern int dup2 (int oldfd, int newfd); # endif #elif defined GNULIB_POSIXCHECK # undef dup2 # define dup2(o,n) \ (GL_LINK_WARNING ("dup2 is unportable - " \ "use gnulib module dup2 for portability"), \ dup2 (o, n)) #endif #if @GNULIB_ENVIRON@ # if !@HAVE_DECL_ENVIRON@ /* Set of environment variables and values. An array of strings of the form "VARIABLE=VALUE", terminated with a NULL. */ # if defined __APPLE__ && defined __MACH__ # include # define environ (*_NSGetEnviron ()) # else extern char **environ; # endif # endif #elif defined GNULIB_POSIXCHECK # undef environ # define environ \ (GL_LINK_WARNING ("environ is unportable - " \ "use gnulib module environ for portability"), \ environ) #endif #if @GNULIB_EUIDACCESS@ # if !@HAVE_EUIDACCESS@ /* Like access(), except that is uses the effective user id and group id of the current process. */ extern int euidaccess (const char *filename, int mode); # endif #elif defined GNULIB_POSIXCHECK # undef euidaccess # define euidaccess(f,m) \ (GL_LINK_WARNING ("euidaccess is unportable - " \ "use gnulib module euidaccess for portability"), \ euidaccess (f, m)) #endif #if @GNULIB_FCHDIR@ # if @REPLACE_FCHDIR@ /* Change the process' current working directory to the directory on which the given file descriptor is open. Return 0 if successful, otherwise -1 and errno set. See the POSIX:2001 specification . */ extern int fchdir (int /*fd*/); # define dup rpl_dup extern int dup (int); # define dup2 rpl_dup2 extern int dup2 (int, int); # endif #elif defined GNULIB_POSIXCHECK # undef fchdir # define fchdir(f) \ (GL_LINK_WARNING ("fchdir is unportable - " \ "use gnulib module fchdir for portability"), \ fchdir (f)) #endif #if @GNULIB_FSYNC@ /* Synchronize changes to a file. Return 0 if successful, otherwise -1 and errno set. See POSIX:2001 specification . */ # if !@HAVE_FSYNC@ extern int fsync (int fd); # endif #elif defined GNULIB_POSIXCHECK # undef fsync # define fsync(fd) \ (GL_LINK_WARNING ("fsync is unportable - " \ "use gnulib module fsync for portability"), \ fsync (fd)) #endif #if @GNULIB_FTRUNCATE@ # if !@HAVE_FTRUNCATE@ /* Change the size of the file to which FD is opened to become equal to LENGTH. Return 0 if successful, otherwise -1 and errno set. See the POSIX:2001 specification . */ extern int ftruncate (int fd, off_t length); # endif #elif defined GNULIB_POSIXCHECK # undef ftruncate # define ftruncate(f,l) \ (GL_LINK_WARNING ("ftruncate is unportable - " \ "use gnulib module ftruncate for portability"), \ ftruncate (f, l)) #endif #if @GNULIB_GETCWD@ /* Include the headers that might declare getcwd so that they will not cause confusion if included after this file. */ # include # if @REPLACE_GETCWD@ /* Get the name of the current working directory, and put it in SIZE bytes of BUF. Return BUF if successful, or NULL if the directory couldn't be determined or SIZE was too small. See the POSIX:2001 specification . Additionally, the gnulib module 'getcwd' guarantees the following GNU extension: If BUF is NULL, an array is allocated with 'malloc'; the array is SIZE bytes long, unless SIZE == 0, in which case it is as big as necessary. */ # define getcwd rpl_getcwd extern char * getcwd (char *buf, size_t size); # endif #elif defined GNULIB_POSIXCHECK # undef getcwd # define getcwd(b,s) \ (GL_LINK_WARNING ("getcwd is unportable - " \ "use gnulib module getcwd for portability"), \ getcwd (b, s)) #endif #if @GNULIB_GETDOMAINNAME@ /* Return the NIS domain name of the machine. WARNING! The NIS domain name is unrelated to the fully qualified host name of the machine. It is also unrelated to email addresses. WARNING! The NIS domain name is usually the empty string or "(none)" when not using NIS. Put up to LEN bytes of the NIS domain name into NAME. Null terminate it if the name is shorter than LEN. If the NIS domain name is longer than LEN, set errno = EINVAL and return -1. Return 0 if successful, otherwise set errno and return -1. */ # if !@HAVE_GETDOMAINNAME@ extern int getdomainname(char *name, size_t len); # endif #elif defined GNULIB_POSIXCHECK # undef getdomainname # define getdomainname(n,l) \ (GL_LINK_WARNING ("getdomainname is unportable - " \ "use gnulib module getdomainname for portability"), \ getdomainname (n, l)) #endif #if @GNULIB_GETDTABLESIZE@ # if !@HAVE_GETDTABLESIZE@ /* Return the maximum number of file descriptors in the current process. */ extern int getdtablesize (void); # endif #elif defined GNULIB_POSIXCHECK # undef getdtablesize # define getdtablesize() \ (GL_LINK_WARNING ("getdtablesize is unportable - " \ "use gnulib module getdtablesize for portability"), \ getdtablesize ()) #endif #if @GNULIB_GETHOSTNAME@ /* Return the standard host name of the machine. WARNING! The host name may or may not be fully qualified. Put up to LEN bytes of the host name into NAME. Null terminate it if the name is shorter than LEN. If the host name is longer than LEN, set errno = EINVAL and return -1. Return 0 if successful, otherwise set errno and return -1. */ # if @UNISTD_H_HAVE_WINSOCK2_H@ # undef gethostname # define gethostname rpl_gethostname # endif # if @UNISTD_H_HAVE_WINSOCK2_H@ || !@HAVE_GETHOSTNAME@ extern int gethostname(char *name, size_t len); # endif #elif @UNISTD_H_HAVE_WINSOCK2_H@ # undef gethostname # define gethostname gethostname_used_without_requesting_gnulib_module_gethostname #elif defined GNULIB_POSIXCHECK # undef gethostname # define gethostname(n,l) \ (GL_LINK_WARNING ("gethostname is unportable - " \ "use gnulib module gethostname for portability"), \ gethostname (n, l)) #endif #if @GNULIB_GETLOGIN_R@ /* Copies the user's login name to NAME. The array pointed to by NAME has room for SIZE bytes. Returns 0 if successful. Upon error, an error number is returned, or -1 in the case that the login name cannot be found but no specific error is provided (this case is hopefully rare but is left open by the POSIX spec). See . */ # if !@HAVE_DECL_GETLOGIN_R@ # include extern int getlogin_r (char *name, size_t size); # endif #elif defined GNULIB_POSIXCHECK # undef getlogin_r # define getlogin_r(n,s) \ (GL_LINK_WARNING ("getlogin_r is unportable - " \ "use gnulib module getlogin_r for portability"), \ getlogin_r (n, s)) #endif #if @GNULIB_GETPAGESIZE@ # if @REPLACE_GETPAGESIZE@ # define getpagesize rpl_getpagesize extern int getpagesize (void); # elif !@HAVE_GETPAGESIZE@ /* This is for POSIX systems. */ # if !defined getpagesize && defined _SC_PAGESIZE # if ! (defined __VMS && __VMS_VER < 70000000) # define getpagesize() sysconf (_SC_PAGESIZE) # endif # endif /* This is for older VMS. */ # if !defined getpagesize && defined __VMS # ifdef __ALPHA # define getpagesize() 8192 # else # define getpagesize() 512 # endif # endif /* This is for BeOS. */ # if !defined getpagesize && @HAVE_OS_H@ # include # if defined B_PAGE_SIZE # define getpagesize() B_PAGE_SIZE # endif # endif /* This is for AmigaOS4.0. */ # if !defined getpagesize && defined __amigaos4__ # define getpagesize() 2048 # endif /* This is for older Unix systems. */ # if !defined getpagesize && @HAVE_SYS_PARAM_H@ # include # ifdef EXEC_PAGESIZE # define getpagesize() EXEC_PAGESIZE # else # ifdef NBPG # ifndef CLSIZE # define CLSIZE 1 # endif # define getpagesize() (NBPG * CLSIZE) # else # ifdef NBPC # define getpagesize() NBPC # endif # endif # endif # endif # endif #elif defined GNULIB_POSIXCHECK # undef getpagesize # define getpagesize() \ (GL_LINK_WARNING ("getpagesize is unportable - " \ "use gnulib module getpagesize for portability"), \ getpagesize ()) #endif #if @GNULIB_GETUSERSHELL@ # if !@HAVE_GETUSERSHELL@ /* Return the next valid login shell on the system, or NULL when the end of the list has been reached. */ extern char *getusershell (void); /* Rewind to pointer that is advanced at each getusershell() call. */ extern void setusershell (void); /* Free the pointer that is advanced at each getusershell() call and associated resources. */ extern void endusershell (void); # endif #elif defined GNULIB_POSIXCHECK # undef getusershell # define getusershell() \ (GL_LINK_WARNING ("getusershell is unportable - " \ "use gnulib module getusershell for portability"), \ getusershell ()) # undef setusershell # define setusershell() \ (GL_LINK_WARNING ("setusershell is unportable - " \ "use gnulib module getusershell for portability"), \ setusershell ()) # undef endusershell # define endusershell() \ (GL_LINK_WARNING ("endusershell is unportable - " \ "use gnulib module getusershell for portability"), \ endusershell ()) #endif #if @GNULIB_LCHOWN@ # if @REPLACE_LCHOWN@ /* Change the owner of FILE to UID (if UID is not -1) and the group of FILE to GID (if GID is not -1). Do not follow symbolic links. Return 0 if successful, otherwise -1 and errno set. See the POSIX:2001 specification . */ # define lchown rpl_lchown extern int lchown (char const *file, uid_t owner, gid_t group); # endif #elif defined GNULIB_POSIXCHECK # undef lchown # define lchown(f,u,g) \ (GL_LINK_WARNING ("lchown is unportable to pre-POSIX.1-2001 " \ "systems - use gnulib module lchown for portability"), \ lchown (f, u, g)) #endif #if @GNULIB_LINK@ /* Create a new hard link for an existing file. Return 0 if successful, otherwise -1 and errno set. See POSIX:2001 specification . */ # if !@HAVE_LINK@ extern int link (const char *path1, const char *path2); # endif #elif defined GNULIB_POSIXCHECK # undef link # define link(path1,path2) \ (GL_LINK_WARNING ("link is unportable - " \ "use gnulib module link for portability"), \ link (path1, path2)) #endif #if @GNULIB_LSEEK@ # if @REPLACE_LSEEK@ /* Set the offset of FD relative to SEEK_SET, SEEK_CUR, or SEEK_END. Return the new offset if successful, otherwise -1 and errno set. See the POSIX:2001 specification . */ # define lseek rpl_lseek extern off_t lseek (int fd, off_t offset, int whence); # endif #elif defined GNULIB_POSIXCHECK # undef lseek # define lseek(f,o,w) \ (GL_LINK_WARNING ("lseek does not fail with ESPIPE on pipes on some " \ "systems - use gnulib module lseek for portability"), \ lseek (f, o, w)) #endif #if @GNULIB_READLINK@ /* Read the contents of the symbolic link FILE and place the first BUFSIZE bytes of it into BUF. Return the number of bytes placed into BUF if successful, otherwise -1 and errno set. See the POSIX:2001 specification . */ # if !@HAVE_READLINK@ # include extern int readlink (const char *file, char *buf, size_t bufsize); # endif #elif defined GNULIB_POSIXCHECK # undef readlink # define readlink(f,b,s) \ (GL_LINK_WARNING ("readlink is unportable - " \ "use gnulib module readlink for portability"), \ readlink (f, b, s)) #endif #if @GNULIB_SLEEP@ /* Pause the execution of the current thread for N seconds. Returns the number of seconds left to sleep. See the POSIX:2001 specification . */ # if !@HAVE_SLEEP@ extern unsigned int sleep (unsigned int n); # endif #elif defined GNULIB_POSIXCHECK # undef sleep # define sleep(n) \ (GL_LINK_WARNING ("sleep is unportable - " \ "use gnulib module sleep for portability"), \ sleep (n)) #endif #if @GNULIB_WRITE@ && @REPLACE_WRITE@ && @GNULIB_UNISTD_H_SIGPIPE@ /* Write up to COUNT bytes starting at BUF to file descriptor FD. See the POSIX:2001 specification . */ # undef write # define write rpl_write extern ssize_t write (int fd, const void *buf, size_t count); #endif #ifdef FCHDIR_REPLACEMENT /* gnulib internal function. */ extern void _gl_unregister_fd (int fd); #endif #ifdef __cplusplus } #endif #endif /* _GL_UNISTD_H */ #endif /* _GL_UNISTD_H */ gnuit-4.9.5/INSTALL0000644000175000017500000002243211146671375010647 00000000000000Installation Instructions ************************* Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005 Free Software Foundation, Inc. This file is free documentation; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. Basic Installation ================== These are generic installation instructions. The `configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses those values to create a `Makefile' in each directory of the package. It may also create one or more `.h' files containing system-dependent definitions. Finally, it creates a shell script `config.status' that you can run in the future to recreate the current configuration, and a file `config.log' containing compiler output (useful mainly for debugging `configure'). It can also use an optional file (typically called `config.cache' and enabled with `--cache-file=config.cache' or simply `-C') that saves the results of its tests to speed up reconfiguring. (Caching is disabled by default to prevent problems with accidental use of stale cache files.) If you need to do unusual things to compile the package, please try to figure out how `configure' could check whether to do them, and mail diffs or instructions to the address given in the `README' so they can be considered for the next release. If you are using the cache, and at some point `config.cache' contains results you don't want to keep, you may remove or edit it. The file `configure.ac' (or `configure.in') is used to create `configure' by a program called `autoconf'. You only need `configure.ac' if you want to change it or regenerate `configure' using a newer version of `autoconf'. The simplest way to compile this package is: 1. `cd' to the directory containing the package's source code and type `./configure' to configure the package for your system. If you're using `csh' on an old version of System V, you might need to type `sh ./configure' instead to prevent `csh' from trying to execute `configure' itself. Running `configure' takes awhile. While running, it prints some messages telling which features it is checking for. 2. Type `make' to compile the package. 3. Optionally, type `make check' to run any self-tests that come with the package. 4. Type `make install' to install the programs and any data files and documentation. 5. You can remove the program binaries and object files from the source code directory by typing `make clean'. To also remove the files that `configure' created (so you can compile the package for a different kind of computer), type `make distclean'. There is also a `make maintainer-clean' target, but that is intended mainly for the package's developers. If you use it, you may have to get all sorts of other programs in order to regenerate files that came with the distribution. Compilers and Options ===================== Some systems require unusual options for compilation or linking that the `configure' script does not know about. Run `./configure --help' for details on some of the pertinent environment variables. You can give `configure' initial values for configuration parameters by setting variables in the command line or in the environment. Here is an example: ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix *Note Defining Variables::, for more details. Compiling For Multiple Architectures ==================================== You can compile the package for more than one kind of computer at the same time, by placing the object files for each architecture in their own directory. To do this, you must use a version of `make' that supports the `VPATH' variable, such as GNU `make'. `cd' to the directory where you want the object files and executables to go and run the `configure' script. `configure' automatically checks for the source code in the directory that `configure' is in and in `..'. If you have to use a `make' that does not support the `VPATH' variable, you have to compile the package for one architecture at a time in the source code directory. After you have installed the package for one architecture, use `make distclean' before reconfiguring for another architecture. Installation Names ================== By default, `make install' installs the package's commands under `/usr/local/bin', include files under `/usr/local/include', etc. You can specify an installation prefix other than `/usr/local' by giving `configure' the option `--prefix=PREFIX'. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you pass the option `--exec-prefix=PREFIX' to `configure', the package uses PREFIX as the prefix for installing programs and libraries. Documentation and other data files still use the regular prefix. In addition, if you use an unusual directory layout you can give options like `--bindir=DIR' to specify different values for particular kinds of files. Run `configure --help' for a list of the directories you can set and what kinds of files go in them. If the package supports it, you can cause programs to be installed with an extra prefix or suffix on their names by giving `configure' the option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. Optional Features ================= Some packages pay attention to `--enable-FEATURE' options to `configure', where FEATURE indicates an optional part of the package. They may also pay attention to `--with-PACKAGE' options, where PACKAGE is something like `gnu-as' or `x' (for the X Window System). The `README' should mention any `--enable-' and `--with-' options that the package recognizes. For packages that use the X Window System, `configure' can usually find the X include and library files automatically, but if it doesn't, you can use the `configure' options `--x-includes=DIR' and `--x-libraries=DIR' to specify their locations. Specifying the System Type ========================== There may be some features `configure' cannot figure out automatically, but needs to determine by the type of machine the package will run on. Usually, assuming the package is built to be run on the _same_ architectures, `configure' can figure that out, but if it prints a message saying it cannot guess the machine type, give it the `--build=TYPE' option. TYPE can either be a short name for the system type, such as `sun4', or a canonical name which has the form: CPU-COMPANY-SYSTEM where SYSTEM can have one of these forms: OS KERNEL-OS See the file `config.sub' for the possible values of each field. If `config.sub' isn't included in this package, then this package doesn't need to know the machine type. If you are _building_ compiler tools for cross-compiling, you should use the option `--target=TYPE' to select the type of system they will produce code for. If you want to _use_ a cross compiler, that generates code for a platform different from the build platform, you should specify the "host" platform (i.e., that on which the generated programs will eventually be run) with `--host=TYPE'. Sharing Defaults ================ If you want to set default values for `configure' scripts to share, you can create a site shell script called `config.site' that gives default values for variables like `CC', `cache_file', and `prefix'. `configure' looks for `PREFIX/share/config.site' if it exists, then `PREFIX/etc/config.site' if it exists. Or, you can set the `CONFIG_SITE' environment variable to the location of the site script. A warning: not all `configure' scripts look for a site script. Defining Variables ================== Variables not defined in a site shell script can be set in the environment passed to `configure'. However, some packages may run configure again during the build, and the customized values of these variables may be lost. In order to avoid this problem, you should set them in the `configure' command line, using `VAR=value'. For example: ./configure CC=/usr/local2/bin/gcc causes the specified `gcc' to be used as the C compiler (unless it is overridden in the site shell script). Here is a another example: /bin/bash ./configure CONFIG_SHELL=/bin/bash Here the `CONFIG_SHELL=/bin/bash' operand causes subsequent configuration-related scripts to be executed by `/bin/bash'. `configure' Invocation ====================== `configure' recognizes the following options to control how it operates. `--help' `-h' Print a summary of the options to `configure', and exit. `--version' `-V' Print the version of Autoconf used to generate the `configure' script, and exit. `--cache-file=FILE' Enable the cache: use and save the results of the tests in FILE, traditionally `config.cache'. FILE defaults to `/dev/null' to disable caching. `--config-cache' `-C' Alias for `--cache-file=config.cache'. `--quiet' `--silent' `-q' Do not print messages saying which checks are being made. To suppress all normal output, redirect it to `/dev/null' (any error messages will still be shown). `--srcdir=DIR' Look for the package's source code in directory DIR. Usually `configure' can determine that directory automatically. `configure' also accepts some other, not widely useful, options. Run `configure --help' for more details. gnuit-4.9.5/LSM.in0000644000175000017500000000204311146671375010575 00000000000000Begin4 Title: GNU Interactive Tools (gnuit) Version: @VERSION@ Entered-date: 2008-04-13 Description: GNUIT (GNU Interactive Tools) provides an extensible file system browser, an ASCII/hexadecimal file viewer, a process viewer/killer and other related utilities and shell scripts. GNUIT can be used to increase the speed and efficiency of copying and moving files and directories, invoking editors, compressing and uncompressing files, creating and expanding archives, compiling programs, sending mail and more. GNUIT uses standard ANSI color sequences, if they are available. GNUIT was formerly called GIT, but the name has been changed to avoid confusion with the VCS. Keywords: File browser, Process viewer, Hex viewer, Interactive Tools, git Author: tudor@cs.unh.edu (Tudor Hulubei) pink@roedu.net (Andrei Pitis) ianb@erislabs.net (Ian Beckwith) Maintained-by: gnuit-dev@gnu.org Primary-site: ftp.gnu.org /gnu/gnuit 768k gnuit-@VERSION@.tar.gz Original-site: Platforms: Copying-policy: GPL End gnuit-4.9.5/PLATFORMS0000644000175000017500000000571111146671375011111 00000000000000--*-text-*-- Supported Platforms ^^^^^^^^^^^^^^^^^^^ GNU Interactive Tools has been successfully compiled at some point on the following systems. Even if I can't test the current version on all these platforms (either because I don't have the time or simply because I no longer have access to them), it shouldn't be too hard to make it work. No. Architecture Operating System GNU canonical name ============================================================================== 1. i386/i486/i586 GNU Hurd 0.1 i386-unknown-gnu0.1 2. i386/i486/i586 Linux i486-unknown-linux 3. i386/i486/i586 Thix 0.3.2 i386-unknown-thix 4. DECstation 5000 ULTRIX 4.2A mips-dec-ultrix4.2 5. DECstation 5000 ULTRIX 4.3 mips-dec-ultrix4.3 6. DECstation 5000 ULTRIX 4.4 mips-dec-ultrix4.4 7. HP9000/715 HP-UX A.09.03 hppa1.1-hp-hpux9.03 8. HP9000/735 HP-UX B.10.01 hppa1.1-hp-hpux10.01 9. HP9000/817 HP-UX B.10.01 hppa1.1-hp-hpux10.01 10. HP9000/817 HP-UX A.08.03 hppa1.1-hp-hpux8.02 11. HP9000/834 HP-UX A.B7.00 hppa1.0-hp-hpux7.00 12. PowerPC AIX 3.2.5 powerpc-ibm-aix3.2.5 13. IBM RS/6000 AIX 3.2.5 rs6000-ibm-aix3.2.5 14. IBM RS/6000 AIX 4.1.1 rs6000-ibm-aix4.1.1 15. Sparc SunOS 4.0.3 sparc-sun-sunos4.0 16. sun3x SunOS 4.1.1 m68k-sun-sunos4.1.1 17. sun4 SunOS 4.1.3 sparc-sun-sunos4.1.3 18. Sparc SunOS 5.3 sparc-sun-solaris2.3 19. Sparc SunOS 5.4 sparc-sun-solaris2.4 20. sun4m SunOS 5.5 sparc-sun-solaris2.5 21. sun4u SunOS 5.5.1 sparc-sun-solaris2.5.1 22. sun4u SunOS 5.6 sparc-sun-solaris2.6 23. SGI IRIX 4.0.5F mips-sgi-irix4.0.5F 24. SGI IRIX 5.2 mips-sgi-irix5.2 25. SGI Indigo/2 IRIX 5.3 mips-sgi-irix5.3 26. SGI PowerChallenge IRIX64 6.1 mips-sgi-irix6.1 27. SGI IP32 IRIX 6.3 mips-sgi-irix6.3 28. ROMP AOS romp-ibm-aos 29. m68k NEWS-OS m68k-sony-newsos 30. alpha OSF1 V1.2 alpha-dec-axposf1.2 31. alpha OSF1 V3.2 alpha-dec-osf3.2 32. alpha OSF1 V4.0 alpha-dec-osf4.0 33. hp300 NetBSD 1.0A m68k-hp-netbsd1.0A 34. mk68k NetBSD 1.2 m68k-cbm-netbsd1.2 35. alpha NetBSD 1.2E alpha-unknown-netbsd1.2E 36. m68k BSD 4.3 m68k-hp-bsd 37. i386 Minix 1.16.25.1 i386-vu-minix 38. m68k sysV68 R3V7.1 m68k-motorola-sysv 39. NeXT Next Step 3.2 m68k-next-nextstep3 40. m68k B.O.S. 02.01 m68k-bull-sysv3 41. ??? qnx 4.22 ???-???-??? 42. we32k AT&T 3B2 we32k-att-sysv3 43. i486 SCO 3.2 V 4.2 i486-unknown-sco3.2 44. i486 Unix System V 4.0 i486-pc-sysv4.0 45. mc88100 DG-UX 5.4R3.10 AViiON m88k-dg-dgux5.4R3.10 46. mc88110 DG-UX 5.4R3.10 AViiON m88k-dg-dgux5.4R3.10 47. i586 DG-UX R4.20MU01 AViiON i586-dg-dguxR4.20MU04 48. i586 DG-UX R4.11MU04 AViiON i586-dg-dguxR4.11MU04 49. PowerPC Apple Powerbook G3 ???-???-??? gnuit-4.9.5/link-warning.h0000644000175000017500000000241411146671375012365 00000000000000/* GL_LINK_WARNING("literal string") arranges to emit the literal string as a linker warning on most glibc systems. We use a linker warning rather than a preprocessor warning, because #warning cannot be used inside macros. */ #ifndef GL_LINK_WARNING /* This works on platforms with GNU ld and ELF object format. Testing __GLIBC__ is sufficient for asserting that GNU ld is in use. Testing __ELF__ guarantees the ELF object format. Testing __GNUC__ is necessary for the compound expression syntax. */ # if defined __GLIBC__ && defined __ELF__ && defined __GNUC__ # define GL_LINK_WARNING(message) \ GL_LINK_WARNING1 (__FILE__, __LINE__, message) # define GL_LINK_WARNING1(file, line, message) \ GL_LINK_WARNING2 (file, line, message) /* macroexpand file and line */ # define GL_LINK_WARNING2(file, line, message) \ GL_LINK_WARNING3 (file ":" #line ": warning: " message) # define GL_LINK_WARNING3(message) \ ({ static const char warning[sizeof (message)] \ __attribute__ ((__unused__, \ __section__ (".gnu.warning"), \ __aligned__ (1))) \ = message "\n"; \ (void)0; \ }) # else # define GL_LINK_WARNING(message) ((void) 0) # endif #endif gnuit-4.9.5/term/0000777000175000017500000000000011146672041010635 500000000000000gnuit-4.9.5/term/gnuitrc.vt102.in0000644000175000017500000002546711146671376013457 00000000000000############################################################################### ### ### ### GNU Interactive Tools @VERSION@ configuration file ### ### Copyright (c) 1993-2000, 2006-2007 Free Software Foundation, Inc. ### ### ### ### This file is part of gnuit. ### ### ### ### gnuit 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 3 of the ### ### License, or (at your option) any later version. ### ### ### ### gnuit 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, see ### ### http://www.gnu.org/licenses/. ### ### ### ############################################################################### ### ### vt102 configuration file. ### ### ### If your terminal supports the standard ANSI color sequences, set ### AnsiColors to ON ([GITxxx-Color] descriptions will be used). If it ### doesn't, AnsiColors should be OFF ([GITxxx-Monochrome] descriptions ### will be used instead). ### [Setup] AnsiColors = OFF # empty means OFF UseLastScreenChar = ON # use the last character on the screen StartupScrollStep = # empty means half the number of lines ### ### WARNING: empty lines are considered to be end of sections! ### [GITFM-Setup] StartupFileDisplayMode = Size # OwnerGroup, DateTime, Size, AbbrevSize, Mode or FullName StartupFileSortMethod = Name # Name, Extension, Size, Date, Mode, OwnerId, GroupId, OwnerName or GroupName MaxUnscaledDigits = 9 GroupDigits = ON ConfirmOnExit = # empty means OFF HistoryFile = ~/.githistory InfoDisplay = ON LeadingDotMatch = ON # OFF means that leading '.' is matched only explicitly TypeSensitivity = ON # Automatically set to OFF when AnsiColors is OFF NormalModeHelp = F3 View F4 Edit F5 Copy F6 Move F7 MkDir F8 Del F10 Exit ^CH Ln ^CS SymLn CommandLineModeHelp = ^G-STOP ^B/^F-MOVE ^P/^N-HISTORY ^A-BOL ^E-EOL ^O-RESTORE ^X^C-EXIT ^Z-SUSPEND #NormalModeHelp = System: \s Host: \h Machine: \m Date: \d #CommandLineModeHelp = System: \s Host: \h Machine: \m Date: \d [GITPS-Setup] Help = Arrows-MOVE Enter-SIGNALS ^L-REFRESH ^X^C/F10-QUIT ^Xk-KILL RefreshAfterKill = ON # Refresh process list after killing processes [GITVIEW-Setup] Help = Arrows/PgUp/PgDown/Home/End-MOVE ^L-REFRESH ^X^C/F10-QUIT 0-9/a-f/A-F-OFFSET ### ### To ignore a section just comment its name ### [GITFM-FTI] ############################### ### vt102 with ANSI colors. ### ############################### [GITFM-Color] TitleForeground = CYAN TitleBackground = BLUE TitleBrightness = ON UserName = YELLOW TtyName = YELLOW ClockForeground = BLACK ClockBackground = CYAN ClockBrightness = OFF PanelFrame = WHITE PanelBackground = BLUE PanelThumbForeground = BLACK PanelThumbBackground = WHITE PanelThumbBrightness = OFF PanelSelectedFile = YELLOW PanelSelectedFileBrightness = ON PanelNotSelectedFile = WHITE PanelNotSelectedFileBrightness = ON PanelCurrentSelectedFile = YELLOW PanelCurrentNotSelectedFile = WHITE PanelCurrentFile = CYAN PanelPath = RED PanelPathBrightness = OFF PanelDeviceFreeSpace = RED PanelDeviceFreeSpaceBrightness = OFF PanelFileInfo = RED PanelFileInfoBrightness = OFF PanelFilesInfo = BLACK PanelFilesInfoBrightness = OFF InputLineForeground = WHITE InputLineBackground = BLACK InputLineBrightness = ON InputLineErrorForeground = WHITE InputLineErrorBackground = RED InputLineErrorBrightness = ON StatusBarForeground = BLACK StatusBarBackground = CYAN StatusBarBrightness = OFF StatusBarWarningForeground = BLACK StatusBarWarningBackground = WHITE StatusBarWarningBrightness = OFF StatusBarErrorForeground = WHITE StatusBarErrorBackground = RED StatusBarErrorBrightness = ON [GITPS-Color] TitleForeground = CYAN TitleBackground = BLUE TitleBrightness = ON HeaderForeground = CYAN HeaderBackground = RED HeaderBrightness = ON ScreenForeground = BLACK ScreenBackground = CYAN ScreenBrightness = OFF StatusForeground = CYAN StatusBackground = BLUE StatusBrightness = ON [GITVIEW-Color] TitleForeground = CYAN TitleBackground = BLUE TitleBrightness = ON HeaderForeground = CYAN HeaderBackground = RED HeaderBrightness = ON ScreenForeground = BLACK ScreenBackground = CYAN ScreenBrightness = OFF StatusForeground = CYAN StatusBackground = BLUE StatusBrightness = ON ################################### ### vt102 monochrome settings. ### ################################### [GITFM-Monochrome] TitleForeground = WHITE TitleBackground = BLACK TitleBrightness = ON UserName = WHITE TtyName = WHITE ClockForeground = BLACK ClockBackground = WHITE ClockBrightness = OFF PanelFrame = WHITE PanelBackground = BLACK PanelThumbForeground = BLACK PanelThumbBackground = WHITE PanelThumbBrightness = OFF PanelSelectedFile = WHITE PanelSelectedFileBrightness = ON PanelNotSelectedFile = WHITE PanelNotSelectedFileBrightness = OFF PanelCurrentSelectedFile = WHITE PanelCurrentNotSelectedFile = BLACK PanelCurrentFile = WHITE PanelPath = BLACK PanelPathBrightness = OFF PanelDeviceFreeSpace = BLACK PanelDeviceFreeSpaceBrightness = OFF PanelFileInfo = BLACK PanelFileInfoBrightness = OFF PanelFilesInfo = BLACK PanelFilesInfoBrightness = OFF InputLineForeground = WHITE InputLineBackground = BLACK InputLineBrightness = ON InputLineErrorForeground = WHITE InputLineErrorBackground = BLACK InputLineErrorBrightness = ON StatusBarForeground = BLACK StatusBarBackground = WHITE StatusBarBrightness = OFF StatusBarWarningForeground = BLACK StatusBarWarningBackground = WHITE StatusBarWarningBrightness = OFF StatusBarErrorForeground = BLACK StatusBarErrorBackground = WHITE StatusBarErrorBrightness = OFF [GITPS-Monochrome] TitleForeground = BLACK TitleBackground = WHITE TitleBrightness = OFF HeaderForeground = WHITE HeaderBackground = BLACK HeaderBrightness = ON ScreenForeground = WHITE ScreenBackground = BLACK ScreenBrightness = OFF StatusForeground = BLACK StatusBackground = WHITE StatusBrightness = OFF [GITVIEW-Monochrome] TitleForeground = BLACK TitleBackground = WHITE TitleBrightness = OFF HeaderForeground = WHITE HeaderBackground = BLACK HeaderBrightness = ON ScreenForeground = WHITE ScreenBackground = BLACK ScreenBrightness = OFF StatusForeground = BLACK StatusBackground = WHITE StatusBrightness = OFF ### ### COMMAND FORMAT: ### key = command name; formatted command; new dir; save screen; pause; hide ### ### DEFAULTS: ### save screen = y ### pause = n ### hide = n ### ### PLEASE READ THE INFO DOCUMENTATION FOR DETAILS ### BRIEF: ### ### FORMAT SPECIFIERS: ### - %s{question,default_answer} ### - %?{confirmation} ### ### - %f file (not directory) ### - %d directory (not file) ### - %l symbolic link ### - %t fifo ### - %z socket ### - %a any type of directory entry (file, directory, link, fifo, socket) ### - %m current entry mode ### - %g current entry group ### - %o current entry owner ### - %p current panel path ### - %b current panel directory name ### - %i current panel selected or current entry ### ### **** For the other panel: ***** ### ### - %F file (not directory) ### - %D directory (not file) ### - %L symbolic link ### - %T fifo ### - %Z socket ### - %A any type of directory entry (file, directory, link, fifo, socket) ### - %M current entry mode ### - %G current entry group ### - %O current entry owner ### - %P the other panel path ### - %B the other panel directory name ### - %I the other panel selected or current entry ### ### For faster startup, try to keep this entries sorted alphabetically, ### at least locally. The order is given by the key sequence. ### ### ### Key sequences starting with characters between ' ' and '~' are IGNORED! ### [GITFM-Keys] ^[[A = previous-line ^[[B = next-line ^[[C = forward-char ^[[D = backward-char ^[OA = previous-line ^[OB = next-line ^[OC = forward-char ^[OD = backward-char ^[[1~ = beginning-of-panel # HOME ^[[4~ = end-of-panel # END ^[[2~ = select-entry # INS ^[[3~ = delete-char # DEL ^[[5~ = scroll-down # PGUP ^[[6~ = scroll-up # PGDOWN ^[[[A = INFO; info %s{Info documentation: ,} # F1 (telnet from a Linux console) ^[[[B = FILE-ACTION; gitaction %p %f # F2 (telnet from a Linux console) ^[[[C = VIEW; gitview %f;;n # F3 (telnet from a Linux console) ^[[[D = EDIT; $GNUIT_EDITOR %f;;n # F4 (telnet from a Linux console) ^[[[E = copy # F5 (telnet from a Linux console) ^[OP = INFO; info %s{Info documentation: ,} # F1 ^[OQ = FILE-ACTION; gitaction %p %f # F2 ^[OR = VIEW; gitview %f;;n # F3 ^[OS = EDIT; $GNUIT_EDITOR %f;;n # F4 ^[[16~ = copy # F5 ^[[17~ = move # F6 ^[[18~ = make-directory # F7 ^[[19~ = delete # F8 ^[[20~ = MAKE; make %s{Options: ,-k };;;y # F9 ^[[21~ = exit # F10 ^[[23~ = GITPS; gitps;;n # F11 ^[[24~ = READ-MAIL; $GNUIT_RMAIL;;n # F12 ### ### Only key sequences starting with characters between ' ' and '~' are ### ALLOWED. ### [GITPS-Keys] ^[[A = previous-line ^[[B = next-line ^[[5~ = scroll-down # PGUP ^[[D = scroll-down # PGUP ^[[6~ = scroll-up # PGDOWN ^[[C = scroll-up # PGDOWN ^[[1~ = beginning-of-list ^[[4~ = end-of-list ^[OA = previous-line ^[OB = next-line ^[OC = scroll-up ^[OD = scroll-down ^[[21~ = exit # F10 ### ### Key sequences starting with characters between ' ' and '~' are IGNORED! ### [GITVIEW-Keys] ^[[A = previous-line ^[[B = next-line ^[[5~ = scroll-down # PGUP ^[[D = scroll-down # PGUP ^[[6~ = scroll-up # PGDOWN ^[[C = scroll-up # PGDOWN ^[OA = previous-line ^[OB = next-line ^[OC = scroll-up ^[OD = scroll-down ^[[1~ = beginning-of-file # HOME ^[[4~ = end-of-file # END ^[[21~ = exit # F10 gnuit-4.9.5/term/gnuitrc.generic.in0000644000175000017500000002152011146671376014201 00000000000000############################################################################### ### ### ### GNU Interactive Tools @VERSION@ configuration file ### ### Copyright (c) 1993-2000, 2006-2007 Free Software Foundation, Inc. ### ### ### ### This file is part of gnuit. ### ### ### ### gnuit 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 3 of the ### ### License, or (at your option) any later version. ### ### ### ### gnuit 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, see ### ### http://www.gnu.org/licenses/. ### ### ### ############################################################################### ### ### Generic configuration file. ### ### ### If your terminal supports the standard ANSI color sequences, set ### AnsiColors to ON ([GITxxx-Color] descriptions will be used). If ### it doesn't, AnsiColors should be OFF ([GITxxx-Monochrome] ### descriptions will be used instead). ### [Setup] AnsiColors = OFF # empty means OFF UseLastScreenChar = OFF # use the last character on the screen StartupScrollStep = # empty means half the number of lines ### ### WARNING: empty lines are considered to be end of sections! ### [GITFM-Setup] StartupFileDisplayMode = Size # OwnerGroup, DateTime, Size, AbbrevSize, Mode or FullName StartupFileSortMethod = Name # Name, Extension, Size, Date, Mode, OwnerId, GroupId, OwnerName or GroupName MaxUnscaledDigits = 9 GroupDigits = ON ConfirmOnExit = # empty means OFF HistoryFile = ~/.githistory InfoDisplay = ON LeadingDotMatch = ON # OFF means that leading '.' is matched only explicitly TypeSensitivity = ON # Automatically set to OFF when AnsiColors is OFF NormalModeHelp = F3 View F4 Edit F5 Copy F6 Move F7 MkDir F8 Del F10 Exit ^CH Ln ^CS SymLn CommandLineModeHelp = ^G-STOP ^B/^F-MOVE ^P/^N-HISTORY ^A-BOL ^E-EOL ^O-RESTORE ^X^C-EXIT ^Z-SUSPEND #NormalModeHelp = System: \s Host: \h Machine: \m Date: \d #CommandLineModeHelp = System: \s Host: \h Machine: \m Date: \d [GITPS-Setup] Help = Arrows-MOVE Enter-SIGNALS ^L-REFRESH ^X^C/F10-QUIT ^Xk-KILL RefreshAfterKill = ON # Refresh process list after killing processes [GITVIEW-Setup] Help = Arrows/PgUp/PgDown/Home/End-MOVE ^L-REFRESH ^X^C/F10-QUIT 0-9/a-f/A-F-OFFSET ### ### To ignore a section just comment its name ### [GITFM-FTI] ###################################### ### Generic tty with color monitor ### ###################################### [GITFM-Color] TitleForeground = CYAN TitleBackground = BLUE TitleBrightness = ON UserName = YELLOW TtyName = YELLOW ClockForeground = BLACK ClockBackground = CYAN ClockBrightness = OFF PanelFrame = WHITE PanelBackground = BLUE PanelThumbForeground = BLACK PanelThumbBackground = WHITE PanelThumbBrightness = OFF PanelSelectedFile = YELLOW PanelSelectedFileBrightness = ON PanelNotSelectedFile = WHITE PanelNotSelectedFileBrightness = ON PanelCurrentSelectedFile = YELLOW PanelCurrentNotSelectedFile = WHITE PanelCurrentFile = CYAN PanelPath = RED PanelPathBrightness = OFF PanelDeviceFreeSpace = RED PanelDeviceFreeSpaceBrightness = OFF PanelFileInfo = RED PanelFileInfoBrightness = OFF PanelFilesInfo = BLACK PanelFilesInfoBrightness = OFF InputLineForeground = WHITE InputLineBackground = BLACK InputLineBrightness = ON InputLineErrorForeground = WHITE InputLineErrorBackground = RED InputLineErrorBrightness = ON StatusBarForeground = BLACK StatusBarBackground = CYAN StatusBarBrightness = OFF StatusBarWarningForeground = BLACK StatusBarWarningBackground = WHITE StatusBarWarningBrightness = OFF StatusBarErrorForeground = WHITE StatusBarErrorBackground = RED StatusBarErrorBrightness = ON [GITPS-Color] TitleForeground = CYAN TitleBackground = BLUE TitleBrightness = ON HeaderForeground = CYAN HeaderBackground = RED HeaderBrightness = ON ScreenForeground = BLACK ScreenBackground = CYAN ScreenBrightness = OFF StatusForeground = CYAN StatusBackground = BLUE StatusBrightness = ON [GITVIEW-Color] TitleForeground = CYAN TitleBackground = BLUE TitleBrightness = ON HeaderForeground = CYAN HeaderBackground = RED HeaderBrightness = ON ScreenForeground = BLACK ScreenBackground = CYAN ScreenBrightness = OFF StatusForeground = CYAN StatusBackground = BLUE StatusBrightness = ON ###################################################### ### Generic tty with monochrome monitor or b/w tty ### ###################################################### [GITFM-Monochrome] TitleForeground = WHITE TitleBackground = BLACK TitleBrightness = ON UserName = WHITE TtyName = WHITE ClockForeground = BLACK ClockBackground = WHITE ClockBrightness = OFF PanelFrame = WHITE PanelBackground = BLACK PanelThumbForeground = BLACK PanelThumbBackground = WHITE PanelThumbBrightness = OFF PanelSelectedFile = WHITE PanelSelectedFileBrightness = ON PanelNotSelectedFile = WHITE PanelNotSelectedFileBrightness = OFF PanelCurrentSelectedFile = WHITE PanelCurrentNotSelectedFile = BLACK PanelCurrentFile = WHITE PanelPath = BLACK PanelPathBrightness = OFF PanelDeviceFreeSpace = BLACK PanelDeviceFreeSpaceBrightness = OFF PanelFileInfo = BLACK PanelFileInfoBrightness = OFF PanelFilesInfo = BLACK PanelFilesInfoBrightness = OFF InputLineForeground = WHITE InputLineBackground = BLACK InputLineBrightness = ON InputLineErrorForeground = WHITE InputLineErrorBackground = BLACK InputLineErrorBrightness = ON StatusBarForeground = BLACK StatusBarBackground = WHITE StatusBarBrightness = OFF StatusBarWarningForeground = BLACK StatusBarWarningBackground = WHITE StatusBarWarningBrightness = OFF StatusBarErrorForeground = BLACK StatusBarErrorBackground = WHITE StatusBarErrorBrightness = OFF [GITPS-Monochrome] TitleForeground = BLACK TitleBackground = WHITE TitleBrightness = OFF HeaderForeground = WHITE HeaderBackground = BLACK HeaderBrightness = ON ScreenForeground = WHITE ScreenBackground = BLACK ScreenBrightness = OFF StatusForeground = BLACK StatusBackground = WHITE StatusBrightness = OFF [GITVIEW-Monochrome] TitleForeground = BLACK TitleBackground = WHITE TitleBrightness = OFF HeaderForeground = WHITE HeaderBackground = BLACK HeaderBrightness = ON ScreenForeground = WHITE ScreenBackground = BLACK ScreenBrightness = OFF StatusForeground = BLACK StatusBackground = WHITE StatusBrightness = OFF ### ### COMMAND FORMAT: ### key = command name; formatted command; new dir; save screen; pause; hide ### ### DEFAULTS: ### save screen = y ### pause = n ### hide = n ### ### PLEASE READ THE INFO DOCUMENTATION FOR DETAILS ### BRIEF: ### ### FORMAT SPECIFIERS: ### - %s{question,default_answer} ### - %?{confirmation} ### ### - %f file (not directory) ### - %d directory (not file) ### - %l symbolic link ### - %t fifo ### - %z socket ### - %a any type of directory entry (file, directory, link, fifo, socket) ### - %m current entry mode ### - %g current entry group ### - %o current entry owner ### - %p current panel path ### - %b current panel directory name ### - %i current panel selected or current entry ### ### **** For the other panel: ***** ### ### - %F file (not directory) ### - %D directory (not file) ### - %L symbolic link ### - %T fifo ### - %Z socket ### - %A any type of directory entry (file, directory, link, fifo, socket) ### - %M current entry mode ### - %G current entry group ### - %O current entry owner ### - %P the other panel path ### - %B the other panel directory name ### - %I the other panel selected or current entry ### ### For faster startup, try to keep this entries sorted alphabetically, ### at least locally. The order is given by the key sequence. ### ### ### Key sequences starting with characters between ' ' and '~' are IGNORED! ### [GITFM-Keys] ### ### Only key sequences starting with characters between ' ' and '~' are ### ALLOWED. ### [GITPS-Keys] ### ### Key sequences starting with characters between ' ' and '~' are IGNORED! ### [GITVIEW-Keys] gnuit-4.9.5/term/ChangeLog0000644000175000017500000000724011146671376012340 000000000000002007-10-20 Ian Beckwith * Discontinued this ChangeLog, see ../ChangeLog for changes from now on. 2000-03-09 Tudor Hulubei * .gitrc.common.in (COPYING): Duplicate *.pm* removed, the Perl module definition is more common. 1999-12-18 Tudor Hulubei * .gitrc.common.in: Added support for *.mips.rpm and *.mipsel.rpm. 1999-10-16 Tudor Hulubei * .gitrc.common.in: Added ".pnm". 1999-06-28 Tudor Hulubei * .gitrc.common.in: Added .i[4-6]86.rpm as options to RPM-UNINSTALL. 1999-05-31 Tudor Hulubei * Fixed the pattern for libX.so.n.n.n. 1998-12-27 Tudor Hulubei * *.h colored with the same color as the other source files. 1998-09-16 Tudor Hulubei * Added *.fit. 1998-09-14 Tudor Hulubei * .gitrc.xterm-color: F1-F4 are working again. * .gitrc.xterm: F1-F4 are working again. 1998-09-05 Tudor Hulubei * .gitrc.xterm-color: Added *.png. 1998-09-04 Tudor Hulubei * .gitrc.common.in: Added *.djv, *.pvf, *.aiff, *.aifc. 1998-03-11 Tudor Hulubei * Makefile.in (GIT_VT100S): .gitrc.screen linked to .gitrc.vt100. 1998-03-05 Tudor Hulubei * INBOX* and OUTBOX* added. 1998-01-23 Tudor Hulubei * .gitrc.common.in: Improved to handle multiple files and various architecture specific formats (rpms). 1997-09-14 Tudor Hulubei * .gitrc.*: ^G no longer terminates gitview & gitps. * .gitrc.*: "GitPsModeHelp" & "GitViewModeHelp" have been renamed to "Help". Sat Dec 21 15:46:11 1996 Tudor Hulubei * .gitrc.common: Added -- to all the commands that support it. Thanks to Andrei Caraman for reporting the problem. Fri Dec 20 15:49:52 1996 Tudor Hulubei * .gitrc.common: Replaced `gitrgrep command' with `(command 1>&2 && exit 1)' in order to both get rid of gitredir and to avoid some quoting problems. Fri Nov 29 18:10:28 1996 Tudor Hulubei * .gitrc.common (MTOOLS-*): Added support for the commands provided by the mtools package. They use the ^Cm and ^Cbm key prefixes. Wed Oct 16 18:09:33 1996 Tudor Hulubei * .gitrc.xterm-color: New file. Sun Oct 13 18:47:19 1996 Tudor Hulubei * .gitrc.common: Added support for *.rpm files. Wed Aug 21 01:01:39 1996 Tudor Hulubei * .gitrc.generic: added *.eps & Co. * .gitrc.*: Switched back to System/Host/Machine/Date status bar. Thu Aug 8 11:58:01 1996 Tudor Hulubei * .gitrc.common: Function keys F1-F10 are available on ESC 1, ESC 2, ... ESC 0. * .gitrc.*: select-file changed to select-entry. file-to-input-line change to entry-to-input-line etc. Tue Aug 6 09:25:05 1996 Tudor Hulubei * .gitrc.common (^G): No longer an exit key for gitps. (^X^I): replaced ^X^G on selected-files-to-input-line. (F11 & F12): Removed. They don't have associated termcap capabilities. Mon Aug 5 19:39:00 1996 Tudor Hulubei * .gitrc.common: Added *.orig and *.r[0-9][0-9] for RAR archives. * .gitrc.common: Added recursive context diffs on ^Cd and ^Cbd. Should be started only when both panels point to the same directory. Thu Jun 6 09:18:06 1996 Tudor Hulubei * Makefile.in: install_strip renamed to install-strip. install now depends on all and on install-only. * .gitrc.common: backward-kill-word added on ^[^H. * Makefile.in: chmod 755 removed. gnuit-4.9.5/term/Makefile.in0000644000175000017500000007206111146671376012636 00000000000000# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 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@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. 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 = : build_triplet = @build@ host_triplet = @host@ subdir = term DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(srcdir)/gnuitrc.aixterm.in $(srcdir)/gnuitrc.ansi.in \ $(srcdir)/gnuitrc.generic.in $(srcdir)/gnuitrc.hft.in \ $(srcdir)/gnuitrc.hpterm.in $(srcdir)/gnuitrc.linux-m.in \ $(srcdir)/gnuitrc.linux.in $(srcdir)/gnuitrc.mach.in \ $(srcdir)/gnuitrc.minix.in $(srcdir)/gnuitrc.thix.in \ $(srcdir)/gnuitrc.vt100.in $(srcdir)/gnuitrc.vt102.in \ $(srcdir)/gnuitrc.xterm-color.in $(srcdir)/gnuitrc.xterm.in \ ChangeLog ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \ $(top_srcdir)/m4/alloca.m4 $(top_srcdir)/m4/argmatch.m4 \ $(top_srcdir)/m4/clock_time.m4 $(top_srcdir)/m4/codeset.m4 \ $(top_srcdir)/m4/dirname.m4 $(top_srcdir)/m4/dos.m4 \ $(top_srcdir)/m4/double-slash-root.m4 \ $(top_srcdir)/m4/eealloc.m4 $(top_srcdir)/m4/errno_h.m4 \ $(top_srcdir)/m4/error.m4 $(top_srcdir)/m4/exitfail.m4 \ $(top_srcdir)/m4/extensions.m4 $(top_srcdir)/m4/fcntl_h.m4 \ $(top_srcdir)/m4/flexmember.m4 $(top_srcdir)/m4/fnmatch.m4 \ $(top_srcdir)/m4/fsusage.m4 $(top_srcdir)/m4/getopt.m4 \ $(top_srcdir)/m4/gettime.m4 $(top_srcdir)/m4/gettimeofday.m4 \ $(top_srcdir)/m4/glibc21.m4 $(top_srcdir)/m4/gnulib-common.m4 \ $(top_srcdir)/m4/gnulib-comp.m4 $(top_srcdir)/m4/human.m4 \ $(top_srcdir)/m4/idcache.m4 $(top_srcdir)/m4/include_next.m4 \ $(top_srcdir)/m4/inline.m4 $(top_srcdir)/m4/inttypes-pri.m4 \ $(top_srcdir)/m4/inttypes.m4 $(top_srcdir)/m4/localcharset.m4 \ $(top_srcdir)/m4/locale-fr.m4 $(top_srcdir)/m4/locale-ja.m4 \ $(top_srcdir)/m4/locale-zh.m4 $(top_srcdir)/m4/longlong.m4 \ $(top_srcdir)/m4/lstat.m4 $(top_srcdir)/m4/malloc.m4 \ $(top_srcdir)/m4/malloca.m4 $(top_srcdir)/m4/mbchar.m4 \ $(top_srcdir)/m4/mbiter.m4 $(top_srcdir)/m4/mbrtowc.m4 \ $(top_srcdir)/m4/mbsinit.m4 $(top_srcdir)/m4/mbslen.m4 \ $(top_srcdir)/m4/mbsstr.m4 $(top_srcdir)/m4/mbstate_t.m4 \ $(top_srcdir)/m4/memmove.m4 $(top_srcdir)/m4/mkstemp.m4 \ $(top_srcdir)/m4/multiarch.m4 $(top_srcdir)/m4/nanosleep.m4 \ $(top_srcdir)/m4/onceonly.m4 $(top_srcdir)/m4/open.m4 \ $(top_srcdir)/m4/putenv.m4 $(top_srcdir)/m4/quote.m4 \ $(top_srcdir)/m4/quotearg.m4 $(top_srcdir)/m4/readlink.m4 \ $(top_srcdir)/m4/rename.m4 $(top_srcdir)/m4/safe-read.m4 \ $(top_srcdir)/m4/safe-write.m4 $(top_srcdir)/m4/sigaction.m4 \ $(top_srcdir)/m4/signal_h.m4 \ $(top_srcdir)/m4/signalblocking.m4 $(top_srcdir)/m4/ssize_t.m4 \ $(top_srcdir)/m4/stdbool.m4 $(top_srcdir)/m4/stdint.m4 \ $(top_srcdir)/m4/stdlib_h.m4 $(top_srcdir)/m4/strcase.m4 \ $(top_srcdir)/m4/strcasestr.m4 $(top_srcdir)/m4/strerror.m4 \ $(top_srcdir)/m4/string_h.m4 $(top_srcdir)/m4/strings_h.m4 \ $(top_srcdir)/m4/strndup.m4 $(top_srcdir)/m4/strnlen.m4 \ $(top_srcdir)/m4/strtoimax.m4 $(top_srcdir)/m4/strtol.m4 \ $(top_srcdir)/m4/strtoll.m4 $(top_srcdir)/m4/strtoul.m4 \ $(top_srcdir)/m4/strtoull.m4 $(top_srcdir)/m4/strtoumax.m4 \ $(top_srcdir)/m4/sys_select_h.m4 \ $(top_srcdir)/m4/sys_socket_h.m4 \ $(top_srcdir)/m4/sys_stat_h.m4 $(top_srcdir)/m4/sys_time_h.m4 \ $(top_srcdir)/m4/tempname.m4 $(top_srcdir)/m4/time_h.m4 \ $(top_srcdir)/m4/timespec.m4 $(top_srcdir)/m4/unistd_h.m4 \ $(top_srcdir)/m4/utimbuf.m4 $(top_srcdir)/m4/utime.m4 \ $(top_srcdir)/m4/utimes-null.m4 $(top_srcdir)/m4/wchar.m4 \ $(top_srcdir)/m4/wchar_t.m4 $(top_srcdir)/m4/wctype.m4 \ $(top_srcdir)/m4/wcwidth.m4 $(top_srcdir)/m4/wint_t.m4 \ $(top_srcdir)/m4/write.m4 $(top_srcdir)/m4/xalloc.m4 \ $(top_srcdir)/m4/xstrndup.m4 $(top_srcdir)/m4/xstrtol.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = gnuitrc.aixterm gnuitrc.ansi gnuitrc.generic \ gnuitrc.hft gnuitrc.hpterm gnuitrc.linux gnuitrc.linux-m \ gnuitrc.mach gnuitrc.minix gnuitrc.thix gnuitrc.vt100 \ gnuitrc.vt102 gnuitrc.xterm gnuitrc.xterm-color 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)$(pkgdatadir)" pkgdataDATA_INSTALL = $(INSTALL_DATA) DATA = $(pkgdata_DATA) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) INSTALL = @INSTALL@ ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ ALLOCA_H = @ALLOCA_H@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BITSIZEOF_PTRDIFF_T = @BITSIZEOF_PTRDIFF_T@ BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@ BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@ BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@ BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CLEANFILES = gnuitrc.common CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEBIAN_FALSE = @DEBIAN_FALSE@ DEBIAN_TRUE = @DEBIAN_TRUE@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EMULTIHOP_HIDDEN = @EMULTIHOP_HIDDEN@ EMULTIHOP_VALUE = @EMULTIHOP_VALUE@ ENOLINK_HIDDEN = @ENOLINK_HIDDEN@ ENOLINK_VALUE = @ENOLINK_VALUE@ EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@ EOVERFLOW_VALUE = @EOVERFLOW_VALUE@ ERRNO_H = @ERRNO_H@ EXEEXT = @EXEEXT@ FCNTL_H = @FCNTL_H@ FNMATCH_H = @FNMATCH_H@ GETOPT_H = @GETOPT_H@ GLIBC21 = @GLIBC21@ GL_COND_LIBTOOL_FALSE = @GL_COND_LIBTOOL_FALSE@ GL_COND_LIBTOOL_TRUE = @GL_COND_LIBTOOL_TRUE@ GNULIB_ACCEPT = @GNULIB_ACCEPT@ GNULIB_ATOLL = @GNULIB_ATOLL@ GNULIB_BIND = @GNULIB_BIND@ GNULIB_BTOWC = @GNULIB_BTOWC@ GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@ GNULIB_CHOWN = @GNULIB_CHOWN@ GNULIB_CLOSE = @GNULIB_CLOSE@ GNULIB_CONNECT = @GNULIB_CONNECT@ GNULIB_DUP2 = @GNULIB_DUP2@ GNULIB_ENVIRON = @GNULIB_ENVIRON@ GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@ GNULIB_FCHDIR = @GNULIB_FCHDIR@ GNULIB_FSYNC = @GNULIB_FSYNC@ GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@ GNULIB_GETCWD = @GNULIB_GETCWD@ GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@ GNULIB_GETDTABLESIZE = @GNULIB_GETDTABLESIZE@ GNULIB_GETHOSTNAME = @GNULIB_GETHOSTNAME@ GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@ GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@ GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@ GNULIB_GETPEERNAME = @GNULIB_GETPEERNAME@ GNULIB_GETSOCKNAME = @GNULIB_GETSOCKNAME@ GNULIB_GETSOCKOPT = @GNULIB_GETSOCKOPT@ GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@ GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@ GNULIB_IMAXABS = @GNULIB_IMAXABS@ GNULIB_IMAXDIV = @GNULIB_IMAXDIV@ GNULIB_LCHMOD = @GNULIB_LCHMOD@ GNULIB_LCHOWN = @GNULIB_LCHOWN@ GNULIB_LINK = @GNULIB_LINK@ GNULIB_LISTEN = @GNULIB_LISTEN@ GNULIB_LSEEK = @GNULIB_LSEEK@ GNULIB_LSTAT = @GNULIB_LSTAT@ GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@ GNULIB_MBRLEN = @GNULIB_MBRLEN@ GNULIB_MBRTOWC = @GNULIB_MBRTOWC@ GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@ GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@ GNULIB_MBSCHR = @GNULIB_MBSCHR@ GNULIB_MBSCSPN = @GNULIB_MBSCSPN@ GNULIB_MBSINIT = @GNULIB_MBSINIT@ GNULIB_MBSLEN = @GNULIB_MBSLEN@ GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@ GNULIB_MBSNLEN = @GNULIB_MBSNLEN@ GNULIB_MBSNRTOWCS = @GNULIB_MBSNRTOWCS@ GNULIB_MBSPBRK = @GNULIB_MBSPBRK@ GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@ GNULIB_MBSRCHR = @GNULIB_MBSRCHR@ GNULIB_MBSRTOWCS = @GNULIB_MBSRTOWCS@ GNULIB_MBSSEP = @GNULIB_MBSSEP@ GNULIB_MBSSPN = @GNULIB_MBSSPN@ GNULIB_MBSSTR = @GNULIB_MBSSTR@ GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@ GNULIB_MEMMEM = @GNULIB_MEMMEM@ GNULIB_MEMPCPY = @GNULIB_MEMPCPY@ GNULIB_MEMRCHR = @GNULIB_MEMRCHR@ GNULIB_MKDTEMP = @GNULIB_MKDTEMP@ GNULIB_MKSTEMP = @GNULIB_MKSTEMP@ GNULIB_OPEN = @GNULIB_OPEN@ GNULIB_PUTENV = @GNULIB_PUTENV@ GNULIB_RANDOM_R = @GNULIB_RANDOM_R@ GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@ GNULIB_READLINK = @GNULIB_READLINK@ GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@ GNULIB_RECV = @GNULIB_RECV@ GNULIB_RECVFROM = @GNULIB_RECVFROM@ GNULIB_RPMATCH = @GNULIB_RPMATCH@ GNULIB_SELECT = @GNULIB_SELECT@ GNULIB_SEND = @GNULIB_SEND@ GNULIB_SENDTO = @GNULIB_SENDTO@ GNULIB_SETENV = @GNULIB_SETENV@ GNULIB_SETSOCKOPT = @GNULIB_SETSOCKOPT@ GNULIB_SHUTDOWN = @GNULIB_SHUTDOWN@ GNULIB_SIGACTION = @GNULIB_SIGACTION@ GNULIB_SIGNAL_H_SIGPIPE = @GNULIB_SIGNAL_H_SIGPIPE@ GNULIB_SIGPROCMASK = @GNULIB_SIGPROCMASK@ GNULIB_SLEEP = @GNULIB_SLEEP@ GNULIB_SOCKET = @GNULIB_SOCKET@ GNULIB_STPCPY = @GNULIB_STPCPY@ GNULIB_STPNCPY = @GNULIB_STPNCPY@ GNULIB_STRCASESTR = @GNULIB_STRCASESTR@ GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@ GNULIB_STRDUP = @GNULIB_STRDUP@ GNULIB_STRERROR = @GNULIB_STRERROR@ GNULIB_STRNDUP = @GNULIB_STRNDUP@ GNULIB_STRNLEN = @GNULIB_STRNLEN@ GNULIB_STRPBRK = @GNULIB_STRPBRK@ GNULIB_STRSEP = @GNULIB_STRSEP@ GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@ GNULIB_STRSTR = @GNULIB_STRSTR@ GNULIB_STRTOD = @GNULIB_STRTOD@ GNULIB_STRTOIMAX = @GNULIB_STRTOIMAX@ GNULIB_STRTOK_R = @GNULIB_STRTOK_R@ GNULIB_STRTOLL = @GNULIB_STRTOLL@ GNULIB_STRTOULL = @GNULIB_STRTOULL@ GNULIB_STRTOUMAX = @GNULIB_STRTOUMAX@ GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@ GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@ GNULIB_UNSETENV = @GNULIB_UNSETENV@ GNULIB_WCRTOMB = @GNULIB_WCRTOMB@ GNULIB_WCSNRTOMBS = @GNULIB_WCSNRTOMBS@ GNULIB_WCSRTOMBS = @GNULIB_WCSRTOMBS@ GNULIB_WCTOB = @GNULIB_WCTOB@ GNULIB_WCWIDTH = @GNULIB_WCWIDTH@ GNULIB_WRITE = @GNULIB_WRITE@ GREP = @GREP@ HAVE_ATOLL = @HAVE_ATOLL@ HAVE_BTOWC = @HAVE_BTOWC@ HAVE_CALLOC_POSIX = @HAVE_CALLOC_POSIX@ HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@ HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@ HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@ HAVE_DECL_IMAXABS = @HAVE_DECL_IMAXABS@ HAVE_DECL_IMAXDIV = @HAVE_DECL_IMAXDIV@ HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@ HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@ HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@ HAVE_DECL_STRERROR = @HAVE_DECL_STRERROR@ HAVE_DECL_STRNCASECMP = @HAVE_DECL_STRNCASECMP@ HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@ HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@ HAVE_DECL_STRSIGNAL = @HAVE_DECL_STRSIGNAL@ HAVE_DECL_STRTOIMAX = @HAVE_DECL_STRTOIMAX@ HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@ HAVE_DECL_STRTOUMAX = @HAVE_DECL_STRTOUMAX@ HAVE_DECL_WCTOB = @HAVE_DECL_WCTOB@ HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@ HAVE_DUP2 = @HAVE_DUP2@ HAVE_EUIDACCESS = @HAVE_EUIDACCESS@ HAVE_FSYNC = @HAVE_FSYNC@ HAVE_FTRUNCATE = @HAVE_FTRUNCATE@ HAVE_GETDOMAINNAME = @HAVE_GETDOMAINNAME@ HAVE_GETDTABLESIZE = @HAVE_GETDTABLESIZE@ HAVE_GETHOSTNAME = @HAVE_GETHOSTNAME@ HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@ HAVE_GETSUBOPT = @HAVE_GETSUBOPT@ HAVE_GETUSERSHELL = @HAVE_GETUSERSHELL@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_ISWCNTRL = @HAVE_ISWCNTRL@ HAVE_LCHMOD = @HAVE_LCHMOD@ HAVE_LINK = @HAVE_LINK@ HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@ HAVE_LSTAT = @HAVE_LSTAT@ HAVE_MALLOC_POSIX = @HAVE_MALLOC_POSIX@ HAVE_MBRLEN = @HAVE_MBRLEN@ HAVE_MBRTOWC = @HAVE_MBRTOWC@ HAVE_MBSINIT = @HAVE_MBSINIT@ HAVE_MBSNRTOWCS = @HAVE_MBSNRTOWCS@ HAVE_MBSRTOWCS = @HAVE_MBSRTOWCS@ HAVE_MEMPCPY = @HAVE_MEMPCPY@ HAVE_MKDTEMP = @HAVE_MKDTEMP@ HAVE_OS_H = @HAVE_OS_H@ HAVE_POSIX_SIGNALBLOCKING = @HAVE_POSIX_SIGNALBLOCKING@ HAVE_RANDOM_H = @HAVE_RANDOM_H@ HAVE_RANDOM_R = @HAVE_RANDOM_R@ HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@ HAVE_READLINK = @HAVE_READLINK@ HAVE_REALLOC_POSIX = @HAVE_REALLOC_POSIX@ HAVE_RPMATCH = @HAVE_RPMATCH@ HAVE_SETENV = @HAVE_SETENV@ HAVE_SIGACTION = @HAVE_SIGACTION@ HAVE_SIGINFO_T = @HAVE_SIGINFO_T@ HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@ HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@ HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@ HAVE_SIGSET_T = @HAVE_SIGSET_T@ HAVE_SLEEP = @HAVE_SLEEP@ HAVE_STDINT_H = @HAVE_STDINT_H@ HAVE_STPCPY = @HAVE_STPCPY@ HAVE_STPNCPY = @HAVE_STPNCPY@ HAVE_STRCASECMP = @HAVE_STRCASECMP@ HAVE_STRCASESTR = @HAVE_STRCASESTR@ HAVE_STRCHRNUL = @HAVE_STRCHRNUL@ HAVE_STRNDUP = @HAVE_STRNDUP@ HAVE_STRPBRK = @HAVE_STRPBRK@ HAVE_STRSEP = @HAVE_STRSEP@ HAVE_STRTOD = @HAVE_STRTOD@ HAVE_STRTOLL = @HAVE_STRTOLL@ HAVE_STRTOULL = @HAVE_STRTOULL@ HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@ HAVE_STRUCT_SIGACTION_SA_SIGACTION = @HAVE_STRUCT_SIGACTION_SA_SIGACTION@ HAVE_STRUCT_TIMEVAL = @HAVE_STRUCT_TIMEVAL@ HAVE_STRVERSCMP = @HAVE_STRVERSCMP@ HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@ HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@ HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@ HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@ HAVE_SYS_SELECT_H = @HAVE_SYS_SELECT_H@ HAVE_SYS_SOCKET_H = @HAVE_SYS_SOCKET_H@ HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ HAVE_UNISTD_H = @HAVE_UNISTD_H@ HAVE_UNSETENV = @HAVE_UNSETENV@ HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@ HAVE_WCHAR_H = @HAVE_WCHAR_H@ HAVE_WCRTOMB = @HAVE_WCRTOMB@ HAVE_WCSNRTOMBS = @HAVE_WCSNRTOMBS@ HAVE_WCSRTOMBS = @HAVE_WCSRTOMBS@ HAVE_WCTYPE_H = @HAVE_WCTYPE_H@ HAVE_WINSOCK2_H = @HAVE_WINSOCK2_H@ HAVE_WINT_T = @HAVE_WINT_T@ HAVE_WS2TCPIP_H = @HAVE_WS2TCPIP_H@ HAVE__BOOL = @HAVE__BOOL@ HOST = @HOST@ HTMLDOCS_MAKEINFO_FALSE = @HTMLDOCS_MAKEINFO_FALSE@ HTMLDOCS_MAKEINFO_TRUE = @HTMLDOCS_MAKEINFO_TRUE@ HTMLDOCS_TEXI2HTML_FALSE = @HTMLDOCS_TEXI2HTML_FALSE@ HTMLDOCS_TEXI2HTML_TRUE = @HTMLDOCS_TEXI2HTML_TRUE@ INCLUDES = @INCLUDES@ INCLUDE_NEXT = @INCLUDE_NEXT@ INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INT32_MAX_LT_INTMAX_MAX = @INT32_MAX_LT_INTMAX_MAX@ INT64_MAX_EQ_LONG_MAX = @INT64_MAX_EQ_LONG_MAX@ INTTYPES_H = @INTTYPES_H@ LDFLAGS = @LDFLAGS@ LIBGNU_LIBDEPS = @LIBGNU_LIBDEPS@ LIBGNU_LTLIBDEPS = @LIBGNU_LTLIBDEPS@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@ LIB_NANOSLEEP = @LIB_NANOSLEEP@ LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@ LOCALE_FR_UTF8 = @LOCALE_FR_UTF8@ LOCALE_JA = @LOCALE_JA@ LOCALE_ZH_CN = @LOCALE_ZH_CN@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAKE = @MAKE@ MAKEINFO = @MAKEINFO@ NEXT_ERRNO_H = @NEXT_ERRNO_H@ NEXT_FCNTL_H = @NEXT_FCNTL_H@ NEXT_INTTYPES_H = @NEXT_INTTYPES_H@ NEXT_SIGNAL_H = @NEXT_SIGNAL_H@ NEXT_STDINT_H = @NEXT_STDINT_H@ NEXT_STDLIB_H = @NEXT_STDLIB_H@ NEXT_STRINGS_H = @NEXT_STRINGS_H@ NEXT_STRING_H = @NEXT_STRING_H@ NEXT_SYS_SELECT_H = @NEXT_SYS_SELECT_H@ NEXT_SYS_SOCKET_H = @NEXT_SYS_SOCKET_H@ NEXT_SYS_STAT_H = @NEXT_SYS_STAT_H@ NEXT_SYS_TIME_H = @NEXT_SYS_TIME_H@ NEXT_TIME_H = @NEXT_TIME_H@ NEXT_UNISTD_H = @NEXT_UNISTD_H@ NEXT_WCHAR_H = @NEXT_WCHAR_H@ NEXT_WCTYPE_H = @NEXT_WCTYPE_H@ 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@ PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@ PRIPTR_PREFIX = @PRIPTR_PREFIX@ PRI_MACROS_BROKEN = @PRI_MACROS_BROKEN@ PRODUCT = @PRODUCT@ PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@ RANLIB = @RANLIB@ REPLACE_BTOWC = @REPLACE_BTOWC@ REPLACE_CHOWN = @REPLACE_CHOWN@ REPLACE_CLOSE = @REPLACE_CLOSE@ REPLACE_FCHDIR = @REPLACE_FCHDIR@ REPLACE_GETCWD = @REPLACE_GETCWD@ REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@ REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@ REPLACE_ISWCNTRL = @REPLACE_ISWCNTRL@ REPLACE_LCHOWN = @REPLACE_LCHOWN@ REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@ REPLACE_LSEEK = @REPLACE_LSEEK@ REPLACE_LSTAT = @REPLACE_LSTAT@ REPLACE_MBRLEN = @REPLACE_MBRLEN@ REPLACE_MBRTOWC = @REPLACE_MBRTOWC@ REPLACE_MBSINIT = @REPLACE_MBSINIT@ REPLACE_MBSNRTOWCS = @REPLACE_MBSNRTOWCS@ REPLACE_MBSRTOWCS = @REPLACE_MBSRTOWCS@ REPLACE_MBSTATE_T = @REPLACE_MBSTATE_T@ REPLACE_MEMMEM = @REPLACE_MEMMEM@ REPLACE_MKDIR = @REPLACE_MKDIR@ REPLACE_MKSTEMP = @REPLACE_MKSTEMP@ REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@ REPLACE_OPEN = @REPLACE_OPEN@ REPLACE_PUTENV = @REPLACE_PUTENV@ REPLACE_STRCASESTR = @REPLACE_STRCASESTR@ REPLACE_STRDUP = @REPLACE_STRDUP@ REPLACE_STRERROR = @REPLACE_STRERROR@ REPLACE_STRPTIME = @REPLACE_STRPTIME@ REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@ REPLACE_STRSTR = @REPLACE_STRSTR@ REPLACE_STRTOD = @REPLACE_STRTOD@ REPLACE_TIMEGM = @REPLACE_TIMEGM@ REPLACE_WCRTOMB = @REPLACE_WCRTOMB@ REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@ REPLACE_WCTOB = @REPLACE_WCTOB@ REPLACE_WCWIDTH = @REPLACE_WCWIDTH@ REPLACE_WRITE = @REPLACE_WRITE@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@ SIZE_T_SUFFIX = @SIZE_T_SUFFIX@ STDBOOL_H = @STDBOOL_H@ STDINT_H = @STDINT_H@ STRIP = @STRIP@ SYS_SELECT_H = @SYS_SELECT_H@ SYS_SOCKET_H = @SYS_SOCKET_H@ SYS_STAT_H = @SYS_STAT_H@ SYS_TIME_H = @SYS_TIME_H@ SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ TEXI2DVI = @TEXI2DVI@ TEXI2HTML = @TEXI2HTML@ TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@ TRANSITION_FALSE = @TRANSITION_FALSE@ TRANSITION_TRUE = @TRANSITION_TRUE@ UINT32_MAX_LT_UINTMAX_MAX = @UINT32_MAX_LT_UINTMAX_MAX@ UINT64_MAX_EQ_ULONG_MAX = @UINT64_MAX_EQ_ULONG_MAX@ UNISTD_H_HAVE_WINSOCK2_H = @UNISTD_H_HAVE_WINSOCK2_H@ VERSION = @VERSION@ VOID_UNSETENV = @VOID_UNSETENV@ WCHAR_H = @WCHAR_H@ WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@ WCTYPE_H = @WCTYPE_H@ WINT_T_SUFFIX = @WINT_T_SUFFIX@ ac_ct_CC = @ac_ct_CC@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ 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 = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ gl_LIBOBJS = @gl_LIBOBJS@ gl_LTLIBOBJS = @gl_LTLIBOBJS@ gltests_LIBOBJS = @gltests_LIBOBJS@ gltests_LTLIBOBJS = @gltests_LTLIBOBJS@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ 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@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ EXTRA_DIST = gnuitrc.aixterm.in gnuitrc.ansi.in gnuitrc.common.IN\ gnuitrc.generic.in gnuitrc.hft.in gnuitrc.hpterm.in gnuitrc.linux.in\ gnuitrc.mach.in gnuitrc.minix.in gnuitrc.thix.in gnuitrc.vt100.in\ gnuitrc.vt102.in gnuitrc.xterm.in gnuitrc.xterm-color.in gnuitrc.linux-m.in pkgdata_DATA = gnuitrc.aixterm gnuitrc.ansi gnuitrc.common\ gnuitrc.generic gnuitrc.hft gnuitrc.hpterm gnuitrc.linux\ gnuitrc.mach gnuitrc.minix gnuitrc.thix gnuitrc.vt100\ gnuitrc.vt102 gnuitrc.xterm gnuitrc.xterm-color gnuitrc.linux-m GIT_GENERICS = gnuitrc.sun gnuitrc.sun-cmd gnuitrc.eterm gnuitrc.pc3 GIT_XTERMS = gnuitrc.xterms GIT_ANSIS = gnuitrc.iris-ansi gnuitrc.iris-ansi-net gnuitrc.cygwin GIT_COLOR_XTERMS = gnuitrc.dtterm gnuitrc.rxvt gnuitrc.xterm-debian gnuitrc.Eterm gnuitrc.rxvt-unicode GIT_LINUXS = gnuitrc.console GIT_HPTERMS = gnuitrc.hp GIT_VT100S = gnuitrc.vt125 gnuitrc.vt200 gnuitrc.vt201 gnuitrc.vt220\ gnuitrc.vt240 gnuitrc.vt300 gnuitrc.vt320 gnuitrc.vt400\ gnuitrc.vt420 gnuitrc.screen 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) --foreign term/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --foreign term/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 gnuitrc.aixterm: $(top_builddir)/config.status $(srcdir)/gnuitrc.aixterm.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ gnuitrc.ansi: $(top_builddir)/config.status $(srcdir)/gnuitrc.ansi.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ gnuitrc.generic: $(top_builddir)/config.status $(srcdir)/gnuitrc.generic.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ gnuitrc.hft: $(top_builddir)/config.status $(srcdir)/gnuitrc.hft.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ gnuitrc.hpterm: $(top_builddir)/config.status $(srcdir)/gnuitrc.hpterm.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ gnuitrc.linux: $(top_builddir)/config.status $(srcdir)/gnuitrc.linux.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ gnuitrc.linux-m: $(top_builddir)/config.status $(srcdir)/gnuitrc.linux-m.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ gnuitrc.mach: $(top_builddir)/config.status $(srcdir)/gnuitrc.mach.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ gnuitrc.minix: $(top_builddir)/config.status $(srcdir)/gnuitrc.minix.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ gnuitrc.thix: $(top_builddir)/config.status $(srcdir)/gnuitrc.thix.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ gnuitrc.vt100: $(top_builddir)/config.status $(srcdir)/gnuitrc.vt100.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ gnuitrc.vt102: $(top_builddir)/config.status $(srcdir)/gnuitrc.vt102.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ gnuitrc.xterm: $(top_builddir)/config.status $(srcdir)/gnuitrc.xterm.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ gnuitrc.xterm-color: $(top_builddir)/config.status $(srcdir)/gnuitrc.xterm-color.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ uninstall-info-am: install-pkgdataDATA: $(pkgdata_DATA) @$(NORMAL_INSTALL) test -z "$(pkgdatadir)" || $(mkdir_p) "$(DESTDIR)$(pkgdatadir)" @list='$(pkgdata_DATA)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f=$(am__strip_dir) \ echo " $(pkgdataDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgdatadir)/$$f'"; \ $(pkgdataDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgdatadir)/$$f"; \ done uninstall-pkgdataDATA: @$(NORMAL_UNINSTALL) @list='$(pkgdata_DATA)'; for p in $$list; do \ f=$(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(pkgdatadir)/$$f'"; \ rm -f "$(DESTDIR)$(pkgdatadir)/$$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)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ 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)$(pkgdatadir)"; 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." 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-pkgdataDATA @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) install-data-hook install-exec-am: install-info: install-info-am install-man: 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-info-am uninstall-local uninstall-pkgdataDATA .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-data-hook install-exec install-exec-am install-info \ install-info-am install-man install-pkgdataDATA install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ pdf-am ps ps-am uninstall uninstall-am uninstall-info-am \ uninstall-local uninstall-pkgdataDATA gnuitrc.common: Makefile $(srcdir)/gnuitrc.common.IN sed -e 's,@htmldir\@,$(htmldir),g' \ -e 's,@VERSION\@,$(VERSION),g' < $(srcdir)/gnuitrc.common.IN > gnuitrc.common install-data-hook: for i in $(GIT_XTERMS);\ do\ rm -f $(DESTDIR)$(datadir)/gnuit/$$i;\ ln -s $(datadir)/gnuit/gnuitrc.xterm $(DESTDIR)$(datadir)/gnuit/$$i;\ done \ for i in $(GIT_COLOR_XTERMS);\ do\ rm -f $(DESTDIR)$(datadir)/gnuit/$$i;\ ln -s $(datadir)/gnuit/gnuitrc.xterm-color $(DESTDIR)$(datadir)/gnuit/$$i;\ done \ for i in $(GIT_HPTERMS);\ do\ rm -f $(DESTDIR)$(datadir)/gnuit/$$i;\ ln -s $(datadir)/gnuit/gnuitrc.hpterm $(DESTDIR)$(datadir)/gnuit/$$i;\ done \ for i in $(GIT_GENERICS);\ do\ rm -f $(DESTDIR)$(datadir)/gnuit/$$i;\ ln -s $(datadir)/gnuit/gnuitrc.generic $(DESTDIR)$(datadir)/gnuit/$$i;\ done \ for i in $(GIT_VT100S);\ do\ rm -f $(DESTDIR)$(datadir)/gnuit/$$i;\ ln -s $(datadir)/gnuit/gnuitrc.vt100 $(DESTDIR)$(datadir)/gnuit/$$i;\ done \ for i in $(GIT_ANSIS);\ do\ rm -f $(DESTDIR)$(datadir)/gnuit/$$i;\ ln -s $(datadir)/gnuit/gnuitrc.ansi $(DESTDIR)$(datadir)/gnuit/$$i;\ done \ for i in $(GIT_LINUXS);\ do\ rm -f $(DESTDIR)$(datadir)/gnuit/$$i;\ ln -s $(datadir)/gnuit/gnuitrc.linux $(DESTDIR)$(datadir)/gnuit/$$i;\ done uninstall-local: for i in $(GIT_XTERMS);\ do\ rm -f $(DESTDIR)$(datadir)/gnuit/$$i;\ done \ for i in $(GIT_COLOR_XTERMS);\ do\ rm -f $(DESTDIR)$(datadir)/gnuit/$$i;\ done \ for i in $(GIT_HPTERMS);\ do\ rm -f $(DESTDIR)$(datadir)/gnuit/$$i;\ done \ for i in $(GIT_GENERICS);\ do\ rm -f $(DESTDIR)$(datadir)/gnuit/$$i;\ done \ for i in $(GIT_VT100S);\ do\ rm -f $(DESTDIR)$(datadir)/gnuit/$$i;\ done \ for i in $(GIT_ANSIS);\ do\ rm -f $(DESTDIR)$(datadir)/gnuit/$$i;\ done \ for i in $(GIT_LINUXS);\ do\ rm -f $(DESTDIR)$(datadir)/gnuit/$$i;\ done # 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: gnuit-4.9.5/term/gnuitrc.hft.in0000644000175000017500000002326311146671376013354 00000000000000############################################################################### ### ### ### GNU Interactive Tools @VERSION@ configuration file ### ### Copyright (c) 1993-2000, 2006-2007 Free Software Foundation, Inc. ### ### ### ### This file is part of gnuit. ### ### ### ### gnuit 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 3 of the ### ### License, or (at your option) any later version. ### ### ### ### gnuit 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, see ### ### http://www.gnu.org/licenses/. ### ### ### ############################################################################### ### ### hft configuration file. ### ### ### If your terminal supports the standard ANSI color sequences, set ### AnsiColors to ON ([GITxxx-Color] descriptions will be used). If ### it doesn't, AnsiColors should be OFF ([GITxxx-Monochrome] ### descriptions will be used instead). ### [Setup] AnsiColors = ON # empty means OFF UseLastScreenChar = OFF # use the last character on the screen StartupScrollStep = # empty means half the number of lines ### ### WARNING: empty lines are considered to be end of sections! ### [GITFM-Setup] StartupFileDisplayMode = Size # OwnerGroup, DateTime, Size, Mode or FullName StartupFileSortMethod = Name # Name, Extension, Size, Date, Mode, OwnerId, GroupId, OwnerName or GroupName ConfirmOnExit = # empty means OFF HistoryFile = ~/.githistory InfoDisplay = ON LeadingDotMatch = ON # OFF means that leading '.' is matched only explicitly TypeSensitivity = ON # Automatically set to OFF when AnsiColors is OFF NormalModeHelp = F3 View F4 Edit F5 Copy F6 Move F7 MkDir F8 Del F10 Exit ^CH Ln ^CS SymLn CommandLineModeHelp = ^G-STOP ^B/^F-MOVE ^P/^N-HISTORY ^A-BOL ^E-EOL ^O-RESTORE ^X^C-EXIT ^Z-SUSPEND #NormalModeHelp = System: \s Host: \h Machine: \m Date: \d #CommandLineModeHelp = System: \s Host: \h Machine: \m Date: \d [GITPS-Setup] Help = Arrows-MOVE Enter-SIGNALS ^L-REFRESH ^X^C/F10-QUIT ^Xk-KILL RefreshAfterKill = ON # Refresh process list after killing processes [GITVIEW-Setup] Help = Arrows/PgUp/PgDown/Home/End-MOVE ^L-REFRESH ^X^C/F10-QUIT 0-9/a-f/A-F-OFFSET ### ### To ignore a section just comment its name ### [GITFM-FTI] ################################## ### hft tty with color monitor ### ################################## [GITFM-Color] TitleForeground = CYAN TitleBackground = BLUE TitleBrightness = ON UserName = YELLOW TtyName = YELLOW ClockForeground = BLACK ClockBackground = CYAN ClockBrightness = OFF PanelFrame = WHITE PanelBackground = BLUE PanelThumbForeground = BLACK PanelThumbBackground = WHITE PanelThumbBrightness = OFF PanelSelectedFile = YELLOW PanelSelectedFileBrightness = ON PanelNotSelectedFile = WHITE PanelNotSelectedFileBrightness = ON PanelCurrentSelectedFile = YELLOW PanelCurrentNotSelectedFile = WHITE PanelCurrentFile = CYAN PanelPath = RED PanelPathBrightness = OFF PanelDeviceFreeSpace = RED PanelDeviceFreeSpaceBrightness = OFF PanelFileInfo = RED PanelFileInfoBrightness = OFF PanelFilesInfo = BLACK PanelFilesInfoBrightness = OFF InputLineForeground = WHITE InputLineBackground = BLACK InputLineBrightness = ON InputLineErrorForeground = WHITE InputLineErrorBackground = RED InputLineErrorBrightness = ON StatusBarForeground = BLACK StatusBarBackground = CYAN StatusBarBrightness = OFF StatusBarWarningForeground = BLACK StatusBarWarningBackground = WHITE StatusBarWarningBrightness = OFF StatusBarErrorForeground = WHITE StatusBarErrorBackground = RED StatusBarErrorBrightness = ON [GITPS-Color] TitleForeground = CYAN TitleBackground = BLUE TitleBrightness = ON HeaderForeground = CYAN HeaderBackground = RED HeaderBrightness = ON ScreenForeground = BLACK ScreenBackground = CYAN ScreenBrightness = OFF StatusForeground = CYAN StatusBackground = BLUE StatusBrightness = ON [GITVIEW-Color] TitleForeground = CYAN TitleBackground = BLUE TitleBrightness = ON HeaderForeground = CYAN HeaderBackground = RED HeaderBrightness = ON ScreenForeground = BLACK ScreenBackground = CYAN ScreenBrightness = OFF StatusForeground = CYAN StatusBackground = BLUE StatusBrightness = ON ################################################## ### hft tty with monochrome monitor or b/w tty ### ################################################## [GITFM-Monochrome] TitleForeground = WHITE TitleBackground = BLACK TitleBrightness = ON UserName = WHITE TtyName = WHITE ClockForeground = BLACK ClockBackground = WHITE ClockBrightness = OFF PanelFrame = WHITE PanelBackground = BLACK PanelThumbForeground = BLACK PanelThumbBackground = WHITE PanelThumbBrightness = OFF PanelSelectedFile = WHITE PanelSelectedFileBrightness = ON PanelNotSelectedFile = WHITE PanelNotSelectedFileBrightness = OFF PanelCurrentSelectedFile = WHITE PanelCurrentNotSelectedFile = BLACK PanelCurrentFile = WHITE PanelPath = BLACK PanelPathBrightness = OFF PanelDeviceFreeSpace = BLACK PanelDeviceFreeSpaceBrightness = OFF PanelFileInfo = BLACK PanelFileInfoBrightness = OFF PanelFilesInfo = BLACK PanelFilesInfoBrightness = OFF InputLineForeground = WHITE InputLineBackground = BLACK InputLineBrightness = ON InputLineErrorForeground = WHITE InputLineErrorBackground = BLACK InputLineErrorBrightness = ON StatusBarForeground = BLACK StatusBarBackground = WHITE StatusBarBrightness = OFF StatusBarWarningForeground = BLACK StatusBarWarningBackground = WHITE StatusBarWarningBrightness = OFF StatusBarErrorForeground = BLACK StatusBarErrorBackground = WHITE StatusBarErrorBrightness = OFF [GITPS-Monochrome] TitleForeground = BLACK TitleBackground = WHITE TitleBrightness = OFF HeaderForeground = WHITE HeaderBackground = BLACK HeaderBrightness = ON ScreenForeground = WHITE ScreenBackground = BLACK ScreenBrightness = OFF StatusForeground = BLACK StatusBackground = WHITE StatusBrightness = OFF [GITVIEW-Monochrome] TitleForeground = BLACK TitleBackground = WHITE TitleBrightness = OFF HeaderForeground = WHITE HeaderBackground = BLACK HeaderBrightness = ON ScreenForeground = WHITE ScreenBackground = BLACK ScreenBrightness = OFF StatusForeground = BLACK StatusBackground = WHITE StatusBrightness = OFF ### ### COMMAND FORMAT: ### key = command name; formatted command; new dir; save screen; pause; hide ### ### DEFAULTS: ### save screen = y ### pause = n ### hide = n ### ### PLEASE READ THE INFO DOCUMENTATION FOR DETAILS ### BRIEF: ### ### FORMAT SPECIFIERS: ### - %s{question,default_answer} ### - %?{confirmation} ### ### - %f file (not directory) ### - %d directory (not file) ### - %l symbolic link ### - %t fifo ### - %z socket ### - %a any type of directory entry (file, directory, link, fifo, socket) ### - %m current entry mode ### - %g current entry group ### - %o current entry owner ### - %p current panel path ### - %b current panel directory name ### - %i current panel selected or current entry ### ### **** For the other panel: ***** ### ### - %F file (not directory) ### - %D directory (not file) ### - %L symbolic link ### - %T fifo ### - %Z socket ### - %A any type of directory entry (file, directory, link, fifo, socket) ### - %M current entry mode ### - %G current entry group ### - %O current entry owner ### - %P the other panel path ### - %B the other panel directory name ### - %I the other panel selected or current entry ### ### For faster startup, try to keep this entries sorted alphabetically, ### at least locally. The order is given by the key sequence. ### ### ### Key sequences starting with characters between ' ' and '~' are IGNORED! ### [GITFM-Keys] ^[[001q = INFO; info %s{Info documentation: ,} # F1 ^[[002q = FILE-ACTION; gitaction %p %f # F2 ^[[003q = VIEW; gitview %f;;n # F3 ^[[004q = EDIT; $GNUIT_EDITOR %f;;n # F4 ^[[005q = copy # F5 ^[[006q = move # F6 ^[[007q = make-directory # F7 ^[[008q = delete # F8 ^[[009q = MAKE; make %s{Options: ,-k };;;y # F9 ^[[010q = exit # F10 ^[[011q = GITPS; gitps;;n # F11 ^[[012q = READ-MAIL; $GNUIT_RMAIL;;n # F12 ^[[139q = select-entry # INS ^[[P = delete-char # DEL ^[[H = beginning-of-panel # HOME ^[[146q = end-of-panel # END ^[[150q = scroll-down # PGUP ^[[154q = scroll-up # PGDOWN ### ### Only key sequences starting with characters between ' ' and '~' are ### ALLOWED. ### [GITPS-Keys] ^[[150q = scroll-down # PGUP ^[[154q = scroll-up # PGDOWN ^[[H = beginning-of-list # HOME ^[[146q = end-of-list # END ^[[010q = exit # F10 ### ### Key sequences starting with characters between ' ' and '~' are IGNORED! ### [GITVIEW-Keys] ^[[150q = scroll-down # PGUP ^[[154q = scroll-up # PGDOWN ^[[H = beginning-of-list # HOME ^[[146q = end-of-list # END ^[[010q = exit # F10 gnuit-4.9.5/term/Makefile.am0000644000175000017500000000570611146671376012627 00000000000000EXTRA_DIST = gnuitrc.aixterm.in gnuitrc.ansi.in gnuitrc.common.IN\ gnuitrc.generic.in gnuitrc.hft.in gnuitrc.hpterm.in gnuitrc.linux.in\ gnuitrc.mach.in gnuitrc.minix.in gnuitrc.thix.in gnuitrc.vt100.in\ gnuitrc.vt102.in gnuitrc.xterm.in gnuitrc.xterm-color.in gnuitrc.linux-m.in pkgdata_DATA = gnuitrc.aixterm gnuitrc.ansi gnuitrc.common\ gnuitrc.generic gnuitrc.hft gnuitrc.hpterm gnuitrc.linux\ gnuitrc.mach gnuitrc.minix gnuitrc.thix gnuitrc.vt100\ gnuitrc.vt102 gnuitrc.xterm gnuitrc.xterm-color gnuitrc.linux-m CLEANFILES = gnuitrc.common GIT_GENERICS = gnuitrc.sun gnuitrc.sun-cmd gnuitrc.eterm gnuitrc.pc3 GIT_XTERMS = gnuitrc.xterms GIT_ANSIS = gnuitrc.iris-ansi gnuitrc.iris-ansi-net gnuitrc.cygwin GIT_COLOR_XTERMS = gnuitrc.dtterm gnuitrc.rxvt gnuitrc.xterm-debian gnuitrc.Eterm gnuitrc.rxvt-unicode GIT_LINUXS = gnuitrc.console GIT_HPTERMS = gnuitrc.hp GIT_VT100S = gnuitrc.vt125 gnuitrc.vt200 gnuitrc.vt201 gnuitrc.vt220\ gnuitrc.vt240 gnuitrc.vt300 gnuitrc.vt320 gnuitrc.vt400\ gnuitrc.vt420 gnuitrc.screen gnuitrc.common: Makefile $(srcdir)/gnuitrc.common.IN sed -e 's,@htmldir\@,$(htmldir),g' \ -e 's,@VERSION\@,$(VERSION),g' < $(srcdir)/gnuitrc.common.IN > gnuitrc.common install-data-hook: for i in $(GIT_XTERMS);\ do\ rm -f $(DESTDIR)$(datadir)/gnuit/$$i;\ ln -s $(datadir)/gnuit/gnuitrc.xterm $(DESTDIR)$(datadir)/gnuit/$$i;\ done \ for i in $(GIT_COLOR_XTERMS);\ do\ rm -f $(DESTDIR)$(datadir)/gnuit/$$i;\ ln -s $(datadir)/gnuit/gnuitrc.xterm-color $(DESTDIR)$(datadir)/gnuit/$$i;\ done \ for i in $(GIT_HPTERMS);\ do\ rm -f $(DESTDIR)$(datadir)/gnuit/$$i;\ ln -s $(datadir)/gnuit/gnuitrc.hpterm $(DESTDIR)$(datadir)/gnuit/$$i;\ done \ for i in $(GIT_GENERICS);\ do\ rm -f $(DESTDIR)$(datadir)/gnuit/$$i;\ ln -s $(datadir)/gnuit/gnuitrc.generic $(DESTDIR)$(datadir)/gnuit/$$i;\ done \ for i in $(GIT_VT100S);\ do\ rm -f $(DESTDIR)$(datadir)/gnuit/$$i;\ ln -s $(datadir)/gnuit/gnuitrc.vt100 $(DESTDIR)$(datadir)/gnuit/$$i;\ done \ for i in $(GIT_ANSIS);\ do\ rm -f $(DESTDIR)$(datadir)/gnuit/$$i;\ ln -s $(datadir)/gnuit/gnuitrc.ansi $(DESTDIR)$(datadir)/gnuit/$$i;\ done \ for i in $(GIT_LINUXS);\ do\ rm -f $(DESTDIR)$(datadir)/gnuit/$$i;\ ln -s $(datadir)/gnuit/gnuitrc.linux $(DESTDIR)$(datadir)/gnuit/$$i;\ done uninstall-local: for i in $(GIT_XTERMS);\ do\ rm -f $(DESTDIR)$(datadir)/gnuit/$$i;\ done \ for i in $(GIT_COLOR_XTERMS);\ do\ rm -f $(DESTDIR)$(datadir)/gnuit/$$i;\ done \ for i in $(GIT_HPTERMS);\ do\ rm -f $(DESTDIR)$(datadir)/gnuit/$$i;\ done \ for i in $(GIT_GENERICS);\ do\ rm -f $(DESTDIR)$(datadir)/gnuit/$$i;\ done \ for i in $(GIT_VT100S);\ do\ rm -f $(DESTDIR)$(datadir)/gnuit/$$i;\ done \ for i in $(GIT_ANSIS);\ do\ rm -f $(DESTDIR)$(datadir)/gnuit/$$i;\ done \ for i in $(GIT_LINUXS);\ do\ rm -f $(DESTDIR)$(datadir)/gnuit/$$i;\ done gnuit-4.9.5/term/gnuitrc.linux-m.in0000644000175000017500000002231411146671376014160 00000000000000############################################################################### ### ### ### GNU Interactive Tools @VERSION@ configuration file ### ### Copyright (c) 1993-1999, 2006-2007 Free Software Foundation, Inc. ### ### ### ### This file is part of gnuit. ### ### ### ### gnuit 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 3 of the ### ### License, or (at your option) any later version. ### ### ### ### gnuit 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, see ### ### http://www.gnu.org/licenses/. ### ### ### ############################################################################### ### ### Linux virtual console configuration file. ### ### ### If your terminal supports the standard ANSI color sequences, set ### AnsiColors to ON ([GITxxx-Color] descriptions will be used). If it ### doesn't, AnsiColors should be OFF ([GITxxx-Monochrome] descriptions ### will be used instead). ### [Setup] AnsiColors = OFF # empty means OFF UseLastScreenChar = ON # use the last character on the screen StartupScrollStep = # empty means half the number of lines ### ### WARNING: empty lines are considered to be end of sections! ### [GITFM-Setup] StartupFileDisplayMode = Size # OwnerGroup, DateTime, Size, AbbrevSize, Mode or FullName StartupFileSortMethod = Name # Name, Extension, Size, Date, Mode, OwnerId, GroupId, OwnerName or GroupName MaxUnscaledDigits = 9 GroupDigits = ON ConfirmOnExit = # empty means OFF HistoryFile = ~/.githistory InfoDisplay = ON LeadingDotMatch = ON # OFF means that leading '.' is matched only explicitly TypeSensitivity = ON # Automatically set to OFF when AnsiColors is OFF NormalModeHelp = F3 View F4 Edit F5 Copy F6 Move F7 MkDir F8 Del F10 Exit ^CH Ln ^CS SymLn CommandLineModeHelp = ^G-STOP ^B/^F-MOVE ^P/^N-HISTORY ^A-BOL ^E-EOL ^O-RESTORE ^X^C-EXIT ^Z-SUSPEND #NormalModeHelp = System: \s Host: \h Machine: \m Date: \d #CommandLineModeHelp = System: \s Host: \h Machine: \m Date: \d [GITPS-Setup] Help = Arrows-MOVE Enter-SIGNALS ^L-REFRESH ^X^C/F10-QUIT ^Xk-KILL RefreshAfterKill = ON # Refresh process list after killing processes [GITVIEW-Setup] Help = Arrows/PgUp/PgDown/Home/End-MOVE ^L-REFRESH ^X^C/F10-QUIT 0-9/a-f/A-F-OFFSET ### ### To ignore a section just comment its name ### [GITFM-FTI] ################################################ ### Linux virtual console with color monitor ### ################################################ [GITFM-Color] TitleForeground = CYAN TitleBackground = BLUE TitleBrightness = ON UserName = YELLOW TtyName = YELLOW ClockForeground = BLACK ClockBackground = CYAN ClockBrightness = OFF PanelFrame = WHITE PanelBackground = BLUE PanelThumbForeground = BLACK PanelThumbBackground = WHITE PanelThumbBrightness = OFF PanelSelectedFile = YELLOW PanelSelectedFileBrightness = ON PanelNotSelectedFile = WHITE PanelNotSelectedFileBrightness = ON PanelCurrentSelectedFile = YELLOW PanelCurrentNotSelectedFile = WHITE PanelCurrentFile = CYAN PanelPath = RED PanelPathBrightness = OFF PanelDeviceFreeSpace = RED PanelDeviceFreeSpaceBrightness = OFF PanelFileInfo = RED PanelFileInfoBrightness = OFF PanelFilesInfo = BLACK PanelFilesInfoBrightness = OFF InputLineForeground = WHITE InputLineBackground = BLACK InputLineBrightness = ON InputLineErrorForeground = WHITE InputLineErrorBackground = RED InputLineErrorBrightness = ON StatusBarForeground = BLACK StatusBarBackground = CYAN StatusBarBrightness = OFF StatusBarWarningForeground = BLACK StatusBarWarningBackground = WHITE StatusBarWarningBrightness = OFF StatusBarErrorForeground = WHITE StatusBarErrorBackground = RED StatusBarErrorBrightness = ON [GITPS-Color] TitleForeground = CYAN TitleBackground = BLUE TitleBrightness = ON HeaderForeground = CYAN HeaderBackground = RED HeaderBrightness = ON ScreenForeground = BLACK ScreenBackground = CYAN ScreenBrightness = OFF StatusForeground = CYAN StatusBackground = BLUE StatusBrightness = ON [GITVIEW-Color] TitleForeground = CYAN TitleBackground = BLUE TitleBrightness = ON HeaderForeground = CYAN HeaderBackground = RED HeaderBrightness = ON ScreenForeground = BLACK ScreenBackground = CYAN ScreenBrightness = OFF StatusForeground = CYAN StatusBackground = BLUE StatusBrightness = ON ################################################################ ### Linux virtual console with monochrome monitor or b/w tty ### ################################################################ [GITFM-Monochrome] TitleForeground = WHITE TitleBackground = BLACK TitleBrightness = ON UserName = WHITE TtyName = WHITE ClockForeground = BLACK ClockBackground = WHITE ClockBrightness = OFF PanelFrame = WHITE PanelBackground = BLACK PanelThumbForeground = BLACK PanelThumbBackground = WHITE PanelThumbBrightness = OFF PanelSelectedFile = WHITE PanelSelectedFileBrightness = ON PanelNotSelectedFile = WHITE PanelNotSelectedFileBrightness = OFF PanelCurrentSelectedFile = WHITE PanelCurrentNotSelectedFile = BLACK PanelCurrentFile = WHITE PanelPath = BLACK PanelPathBrightness = OFF PanelDeviceFreeSpace = BLACK PanelDeviceFreeSpaceBrightness = OFF PanelFileInfo = BLACK PanelFileInfoBrightness = OFF PanelFilesInfo = BLACK PanelFilesInfoBrightness = OFF InputLineForeground = WHITE InputLineBackground = BLACK InputLineBrightness = ON InputLineErrorForeground = WHITE InputLineErrorBackground = BLACK InputLineErrorBrightness = ON StatusBarForeground = BLACK StatusBarBackground = WHITE StatusBarBrightness = OFF StatusBarWarningForeground = BLACK StatusBarWarningBackground = WHITE StatusBarWarningBrightness = OFF StatusBarErrorForeground = BLACK StatusBarErrorBackground = WHITE StatusBarErrorBrightness = OFF [GITPS-Monochrome] TitleForeground = BLACK TitleBackground = WHITE TitleBrightness = OFF HeaderForeground = WHITE HeaderBackground = BLACK HeaderBrightness = ON ScreenForeground = WHITE ScreenBackground = BLACK ScreenBrightness = OFF StatusForeground = BLACK StatusBackground = WHITE StatusBrightness = OFF [GITVIEW-Monochrome] TitleForeground = BLACK TitleBackground = WHITE TitleBrightness = OFF HeaderForeground = WHITE HeaderBackground = BLACK HeaderBrightness = ON ScreenForeground = WHITE ScreenBackground = BLACK ScreenBrightness = OFF StatusForeground = BLACK StatusBackground = WHITE StatusBrightness = OFF ### ### COMMAND FORMAT: ### key = command name; formatted command; new dir; save screen; pause; hide ### ### DEFAULTS: ### save screen = y ### pause = n ### hide = n ### ### PLEASE READ THE INFO DOCUMENTATION FOR DETAILS ### BRIEF: ### ### FORMAT SPECIFIERS: ### - %s{question,default_answer} ### - %?{confirmation} ### ### - %f file (not directory) ### - %d directory (not file) ### - %l symbolic link ### - %t fifo ### - %z socket ### - %a any type of directory entry (file, directory, link, fifo, socket) ### - %m current entry mode ### - %g current entry group ### - %o current entry owner ### - %p current panel path ### - %b current panel directory name ### - %i current panel selected entry or current entry ### ### **** For the other panel: ***** ### ### - %F file (not directory) ### - %D directory (not file) ### - %L symbolic link ### - %T fifo ### - %Z socket ### - %A any type of directory entry (file, directory, link, fifo, socket) ### - %M current entry mode ### - %G current entry group ### - %O current entry owner ### - %P the other panel path ### - %B the other panel directory name ### - %I the other panel selected or current entry ### ### For faster startup, try to keep this entries sorted alphabetically, ### at least locally. The order is given by the key sequence. ### ### ### Key sequences starting with characters between ' ' and '~' are IGNORED! ### [GITFM-Keys] ^[[4~ = end-of-panel # END ^[[21~ = exit # F10 ^[[23~ = GITPS; gitps;;n # F11 ^[[24~ = READ-MAIL; $GNUIT_RMAIL;;n # F12 ### ### Only key sequences starting with characters between ' ' and '~' are ### ALLOWED. ### [GITPS-Keys] ^[[4~ = end-of-list # END ^[[21~ = exit # F10 ### ### Key sequences starting with characters between ' ' and '~' are IGNORED! ### [GITVIEW-Keys] ^[[3 = backspace # DEL ^[[4~ = end-of-file # END ^[[21~ = exit # F10 gnuit-4.9.5/term/gnuitrc.mach.in0000644000175000017500000002174711146671376013510 00000000000000############################################################################### ### ### ### GNU Interactive Tools @VERSION@ configuration file ### ### Copyright (c) 1993-2000, 2006-2007 Free Software Foundation, Inc. ### ### ### ### This file is part of gnuit. ### ### ### ### gnuit 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 3 of the ### ### License, or (at your option) any later version. ### ### ### ### gnuit 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, see ### ### http://www.gnu.org/licenses/. ### ### ### ############################################################################### ### ### Mach console configuration file. ### ### ### If your terminal supports the standard ANSI color sequences, set ### AnsiColors to ON ([GITxxx-Color] descriptions will be used). If it ### doesn't, AnsiColors should be OFF ([GITxxx-Monochrome] descriptions ### will be used instead). ### [Setup] AnsiColors = ON # empty means OFF UseLastScreenChar = OFF # use the last character on the screen StartupScrollStep = # empty means half the number of lines ### ### WARNING: empty lines are considered to be end of sections! ### [GITFM-Setup] StartupFileDisplayMode = Size # OwnerGroup, DateTime, Size, AbbrevSize, Mode or FullName StartupFileSortMethod = Name # Name, Extension, Size, Date, Mode, OwnerId, GroupId, OwnerName or GroupName MaxUnscaledDigits = 9 GroupDigits = ON ConfirmOnExit = # empty means OFF HistoryFile = ~/.githistory InfoDisplay = ON LeadingDotMatch = ON # OFF means that leading '.' is matched only explicitly TypeSensitivity = ON # Automatically set to OFF when AnsiColors is OFF NormalModeHelp = F3 View F4 Edit F5 Copy F6 Move F7 MkDir F8 Del F10 Exit ^CH Ln ^CS SymLn CommandLineModeHelp = ^G-STOP ^B/^F-MOVE ^P/^N-HISTORY ^A-BOL ^E-EOL ^O-RESTORE ^X^C-EXIT ^Z-SUSPEND #NormalModeHelp = System: \s Host: \h Machine: \m Date: \d #CommandLineModeHelp = System: \s Host: \h Machine: \m Date: \d [GITPS-Setup] Help = Arrows-MOVE Enter-SIGNALS ^L-REFRESH ^X^C/F10-QUIT ^Xk-KILL RefreshAfterKill = ON # Refresh process list after killing processes [GITVIEW-Setup] Help = Arrows/PgUp/PgDown/Home/End-MOVE ^L-REFRESH ^X^C/F10-QUIT 0-9/a-f/A-F-OFFSET ### ### To ignore a section just comment its name ### [GITFM-FTI] ################################################ ### Linux virtual console with color monitor ### ################################################ [GITFM-Color] TitleForeground = CYAN TitleBackground = BLUE TitleBrightness = ON UserName = YELLOW TtyName = YELLOW ClockForeground = BLACK ClockBackground = CYAN ClockBrightness = OFF PanelFrame = WHITE PanelBackground = BLUE PanelThumbForeground = BLACK PanelThumbBackground = WHITE PanelThumbBrightness = OFF PanelSelectedFile = YELLOW PanelSelectedFileBrightness = ON PanelNotSelectedFile = WHITE PanelNotSelectedFileBrightness = ON PanelCurrentSelectedFile = YELLOW PanelCurrentNotSelectedFile = WHITE PanelCurrentFile = CYAN PanelPath = RED PanelPathBrightness = OFF PanelDeviceFreeSpace = RED PanelDeviceFreeSpaceBrightness = OFF PanelFileInfo = RED PanelFileInfoBrightness = OFF PanelFilesInfo = BLACK PanelFilesInfoBrightness = OFF InputLineForeground = WHITE InputLineBackground = BLACK InputLineBrightness = ON InputLineErrorForeground = WHITE InputLineErrorBackground = RED InputLineErrorBrightness = ON StatusBarForeground = BLACK StatusBarBackground = CYAN StatusBarBrightness = OFF StatusBarWarningForeground = BLACK StatusBarWarningBackground = WHITE StatusBarWarningBrightness = OFF StatusBarErrorForeground = WHITE StatusBarErrorBackground = RED StatusBarErrorBrightness = ON [GITPS-Color] TitleForeground = CYAN TitleBackground = BLUE TitleBrightness = ON HeaderForeground = CYAN HeaderBackground = RED HeaderBrightness = ON ScreenForeground = BLACK ScreenBackground = CYAN ScreenBrightness = OFF StatusForeground = CYAN StatusBackground = BLUE StatusBrightness = ON [GITVIEW-Color] TitleForeground = CYAN TitleBackground = BLUE TitleBrightness = ON HeaderForeground = CYAN HeaderBackground = RED HeaderBrightness = ON ScreenForeground = BLACK ScreenBackground = CYAN ScreenBrightness = OFF StatusForeground = CYAN StatusBackground = BLUE StatusBrightness = ON ################################################################ ### Linux virtual console with monochrome monitor or b/w tty ### ################################################################ [GITFM-Monochrome] TitleForeground = WHITE TitleBackground = BLACK TitleBrightness = ON UserName = WHITE TtyName = WHITE ClockForeground = BLACK ClockBackground = WHITE ClockBrightness = OFF PanelFrame = WHITE PanelBackground = BLACK PanelThumbForeground = BLACK PanelThumbBackground = WHITE PanelThumbBrightness = OFF PanelSelectedFile = WHITE PanelSelectedFileBrightness = ON PanelNotSelectedFile = WHITE PanelNotSelectedFileBrightness = OFF PanelCurrentSelectedFile = WHITE PanelCurrentNotSelectedFile = BLACK PanelCurrentFile = WHITE PanelPath = BLACK PanelPathBrightness = OFF PanelDeviceFreeSpace = BLACK PanelDeviceFreeSpaceBrightness = OFF PanelFileInfo = BLACK PanelFileInfoBrightness = OFF PanelFilesInfo = BLACK PanelFilesInfoBrightness = OFF InputLineForeground = WHITE InputLineBackground = BLACK InputLineBrightness = ON InputLineErrorForeground = WHITE InputLineErrorBackground = BLACK InputLineErrorBrightness = ON StatusBarForeground = BLACK StatusBarBackground = WHITE StatusBarBrightness = OFF StatusBarWarningForeground = BLACK StatusBarWarningBackground = WHITE StatusBarWarningBrightness = OFF StatusBarErrorForeground = BLACK StatusBarErrorBackground = WHITE StatusBarErrorBrightness = OFF [GITPS-Monochrome] TitleForeground = BLACK TitleBackground = WHITE TitleBrightness = OFF HeaderForeground = WHITE HeaderBackground = BLACK HeaderBrightness = ON ScreenForeground = WHITE ScreenBackground = BLACK ScreenBrightness = OFF StatusForeground = BLACK StatusBackground = WHITE StatusBrightness = OFF [GITVIEW-Monochrome] TitleForeground = BLACK TitleBackground = WHITE TitleBrightness = OFF HeaderForeground = WHITE HeaderBackground = BLACK HeaderBrightness = ON ScreenForeground = WHITE ScreenBackground = BLACK ScreenBrightness = OFF StatusForeground = BLACK StatusBackground = WHITE StatusBrightness = OFF ### ### COMMAND FORMAT: ### key = command name; formatted command; new dir; save screen; pause; hide ### ### DEFAULTS: ### save screen = y ### pause = n ### hide = n ### ### PLEASE READ THE INFO DOCUMENTATION FOR DETAILS ### BRIEF: ### ### FORMAT SPECIFIERS: ### - %s{question,default_answer} ### - %?{confirmation} ### ### - %f file (not directory) ### - %d directory (not file) ### - %l symbolic link ### - %t fifo ### - %z socket ### - %a any type of directory entry (file, directory, link, fifo, socket) ### - %m current entry mode ### - %g current entry group ### - %o current entry owner ### - %p current panel path ### - %b current panel directory name ### - %i current panel selected entry or current entry ### ### **** For the other panel: ***** ### ### - %F file (not directory) ### - %D directory (not file) ### - %L symbolic link ### - %T fifo ### - %Z socket ### - %A any type of directory entry (file, directory, link, fifo, socket) ### - %M current entry mode ### - %G current entry group ### - %O current entry owner ### - %P the other panel path ### - %B the other panel directory name ### - %I the other panel selected or current entry ### ### For faster startup, try to keep this entries sorted alphabetically, ### at least locally. The order is given by the key sequence. ### ### ### Key sequences starting with characters between ' ' and '~' are IGNORED! ### [GITFM-Keys] ^[OZ = GITPS; gitps;;n # F11 ^[O[ = READ-MAIL; $GNUIT_RMAIL;;n # F12 ### ### Only key sequences starting with characters between ' ' and '~' are ### ALLOWED. ### [GITPS-Keys] ### ### Key sequences starting with characters between ' ' and '~' are IGNORED! ### [GITVIEW-Keys] gnuit-4.9.5/term/gnuitrc.linux.in0000644000175000017500000002231311146671376013725 00000000000000############################################################################### ### ### ### GNU Interactive Tools @VERSION@ configuration file ### ### Copyright (c) 1993-2000, 2006-2007 Free Software Foundation, Inc. ### ### ### ### This file is part of gnuit. ### ### ### ### gnuit 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 3 of the ### ### License, or (at your option) any later version. ### ### ### ### gnuit 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, see ### ### http://www.gnu.org/licenses/. ### ### ### ############################################################################### ### ### Linux virtual console configuration file. ### ### ### If your terminal supports the standard ANSI color sequences, set ### AnsiColors to ON ([GITxxx-Color] descriptions will be used). If it ### doesn't, AnsiColors should be OFF ([GITxxx-Monochrome] descriptions ### will be used instead). ### [Setup] AnsiColors = ON # empty means OFF UseLastScreenChar = ON # use the last character on the screen StartupScrollStep = # empty means half the number of lines ### ### WARNING: empty lines are considered to be end of sections! ### [GITFM-Setup] StartupFileDisplayMode = Size # OwnerGroup, DateTime, Size, AbbrevSize, Mode or FullName StartupFileSortMethod = Name # Name, Extension, Size, Date, Mode, OwnerId, GroupId, OwnerName or GroupName MaxUnscaledDigits = 9 GroupDigits = ON ConfirmOnExit = # empty means OFF HistoryFile = ~/.githistory InfoDisplay = ON LeadingDotMatch = ON # OFF means that leading '.' is matched only explicitly TypeSensitivity = ON # Automatically set to OFF when AnsiColors is OFF NormalModeHelp = F3 View F4 Edit F5 Copy F6 Move F7 MkDir F8 Del F10 Exit ^CH Ln ^CS SymLn CommandLineModeHelp = ^G-STOP ^B/^F-MOVE ^P/^N-HISTORY ^A-BOL ^E-EOL ^O-RESTORE ^X^C-EXIT ^Z-SUSPEND #NormalModeHelp = System: \s Host: \h Machine: \m Date: \d #CommandLineModeHelp = System: \s Host: \h Machine: \m Date: \d [GITPS-Setup] Help = Arrows-MOVE Enter-SIGNALS ^L-REFRESH ^X^C/F10-QUIT ^Xk-KILL RefreshAfterKill = ON # Refresh process list after killing processes [GITVIEW-Setup] Help = Arrows/PgUp/PgDown/Home/End-MOVE ^L-REFRESH ^X^C/F10-QUIT 0-9/a-f/A-F-OFFSET ### ### To ignore a section just comment its name ### [GITFM-FTI] ################################################ ### Linux virtual console with color monitor ### ################################################ [GITFM-Color] TitleForeground = CYAN TitleBackground = BLUE TitleBrightness = ON UserName = YELLOW TtyName = YELLOW ClockForeground = BLACK ClockBackground = CYAN ClockBrightness = OFF PanelFrame = WHITE PanelBackground = BLUE PanelThumbForeground = BLACK PanelThumbBackground = WHITE PanelThumbBrightness = OFF PanelSelectedFile = YELLOW PanelSelectedFileBrightness = ON PanelNotSelectedFile = WHITE PanelNotSelectedFileBrightness = ON PanelCurrentSelectedFile = YELLOW PanelCurrentNotSelectedFile = WHITE PanelCurrentFile = CYAN PanelPath = RED PanelPathBrightness = OFF PanelDeviceFreeSpace = RED PanelDeviceFreeSpaceBrightness = OFF PanelFileInfo = RED PanelFileInfoBrightness = OFF PanelFilesInfo = BLACK PanelFilesInfoBrightness = OFF InputLineForeground = WHITE InputLineBackground = BLACK InputLineBrightness = ON InputLineErrorForeground = WHITE InputLineErrorBackground = RED InputLineErrorBrightness = ON StatusBarForeground = BLACK StatusBarBackground = CYAN StatusBarBrightness = OFF StatusBarWarningForeground = BLACK StatusBarWarningBackground = WHITE StatusBarWarningBrightness = OFF StatusBarErrorForeground = WHITE StatusBarErrorBackground = RED StatusBarErrorBrightness = ON [GITPS-Color] TitleForeground = CYAN TitleBackground = BLUE TitleBrightness = ON HeaderForeground = CYAN HeaderBackground = RED HeaderBrightness = ON ScreenForeground = BLACK ScreenBackground = CYAN ScreenBrightness = OFF StatusForeground = CYAN StatusBackground = BLUE StatusBrightness = ON [GITVIEW-Color] TitleForeground = CYAN TitleBackground = BLUE TitleBrightness = ON HeaderForeground = CYAN HeaderBackground = RED HeaderBrightness = ON ScreenForeground = BLACK ScreenBackground = CYAN ScreenBrightness = OFF StatusForeground = CYAN StatusBackground = BLUE StatusBrightness = ON ################################################################ ### Linux virtual console with monochrome monitor or b/w tty ### ################################################################ [GITFM-Monochrome] TitleForeground = WHITE TitleBackground = BLACK TitleBrightness = ON UserName = WHITE TtyName = WHITE ClockForeground = BLACK ClockBackground = WHITE ClockBrightness = OFF PanelFrame = WHITE PanelBackground = BLACK PanelThumbForeground = BLACK PanelThumbBackground = WHITE PanelThumbBrightness = OFF PanelSelectedFile = WHITE PanelSelectedFileBrightness = ON PanelNotSelectedFile = WHITE PanelNotSelectedFileBrightness = OFF PanelCurrentSelectedFile = WHITE PanelCurrentNotSelectedFile = BLACK PanelCurrentFile = WHITE PanelPath = BLACK PanelPathBrightness = OFF PanelDeviceFreeSpace = BLACK PanelDeviceFreeSpaceBrightness = OFF PanelFileInfo = BLACK PanelFileInfoBrightness = OFF PanelFilesInfo = BLACK PanelFilesInfoBrightness = OFF InputLineForeground = WHITE InputLineBackground = BLACK InputLineBrightness = ON InputLineErrorForeground = WHITE InputLineErrorBackground = BLACK InputLineErrorBrightness = ON StatusBarForeground = BLACK StatusBarBackground = WHITE StatusBarBrightness = OFF StatusBarWarningForeground = BLACK StatusBarWarningBackground = WHITE StatusBarWarningBrightness = OFF StatusBarErrorForeground = BLACK StatusBarErrorBackground = WHITE StatusBarErrorBrightness = OFF [GITPS-Monochrome] TitleForeground = BLACK TitleBackground = WHITE TitleBrightness = OFF HeaderForeground = WHITE HeaderBackground = BLACK HeaderBrightness = ON ScreenForeground = WHITE ScreenBackground = BLACK ScreenBrightness = OFF StatusForeground = BLACK StatusBackground = WHITE StatusBrightness = OFF [GITVIEW-Monochrome] TitleForeground = BLACK TitleBackground = WHITE TitleBrightness = OFF HeaderForeground = WHITE HeaderBackground = BLACK HeaderBrightness = ON ScreenForeground = WHITE ScreenBackground = BLACK ScreenBrightness = OFF StatusForeground = BLACK StatusBackground = WHITE StatusBrightness = OFF ### ### COMMAND FORMAT: ### key = command name; formatted command; new dir; save screen; pause; hide ### ### DEFAULTS: ### save screen = y ### pause = n ### hide = n ### ### PLEASE READ THE INFO DOCUMENTATION FOR DETAILS ### BRIEF: ### ### FORMAT SPECIFIERS: ### - %s{question,default_answer} ### - %?{confirmation} ### ### - %f file (not directory) ### - %d directory (not file) ### - %l symbolic link ### - %t fifo ### - %z socket ### - %a any type of directory entry (file, directory, link, fifo, socket) ### - %m current entry mode ### - %g current entry group ### - %o current entry owner ### - %p current panel path ### - %b current panel directory name ### - %i current panel selected entry or current entry ### ### **** For the other panel: ***** ### ### - %F file (not directory) ### - %D directory (not file) ### - %L symbolic link ### - %T fifo ### - %Z socket ### - %A any type of directory entry (file, directory, link, fifo, socket) ### - %M current entry mode ### - %G current entry group ### - %O current entry owner ### - %P the other panel path ### - %B the other panel directory name ### - %I the other panel selected or current entry ### ### For faster startup, try to keep this entries sorted alphabetically, ### at least locally. The order is given by the key sequence. ### ### ### Key sequences starting with characters between ' ' and '~' are IGNORED! ### [GITFM-Keys] ^[[4~ = end-of-panel # END ^[[21~ = exit # F10 ^[[23~ = GITPS; gitps;;n # F11 ^[[24~ = READ-MAIL; $GNUIT_RMAIL;;n # F12 ### ### Only key sequences starting with characters between ' ' and '~' are ### ALLOWED. ### [GITPS-Keys] ^[[4~ = end-of-list # END ^[[21~ = exit # F10 ### ### Key sequences starting with characters between ' ' and '~' are IGNORED! ### [GITVIEW-Keys] ^[[3 = backspace # DEL ^[[4~ = end-of-file # END ^[[21~ = exit # F10 gnuit-4.9.5/term/gnuitrc.xterm.in0000644000175000017500000005203111146671376013725 00000000000000############################################################################### ### ### ### GNU Interactive Tools @VERSION@ configuration file ### ### Copyright (c) 1993-2000, 2006-2007 Free Software Foundation, Inc. ### ### ### ### This file is part of gnuit. ### ### ### ### gnuit 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 3 of the ### ### License, or (at your option) any later version. ### ### ### ### gnuit 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, see ### ### http://www.gnu.org/licenses/. ### ### ### ############################################################################### ### ### xterm configuration file (X window system terminal emulator). ### If you are using color_xterm or you are using the Ultrix xterm, consider ### changing AnsiColors to ON. ### ### ### If your terminal supports the standard ANSI color sequences, set ### AnsiColors to ON ([GITxxx-Color] descriptions will be used). If it ### doesn't, AnsiColors should be OFF ([GITxxx-Monochrome] descriptions ### will be used instead). ### [Setup] AnsiColors = OFF # empty means OFF UseLastScreenChar = ON # use the last character on the screen StartupScrollStep = # empty means half the number of lines ### ### WARNING: empty lines are considered to be end of sections! ### [GITFM-Setup] StartupFileDisplayMode = Size # OwnerGroup, DateTime, Size, AbbrevSize, Mode or FullName StartupFileSortMethod = Name # Name, Extension, Size, Date, Mode, OwnerId, GroupId, OwnerName or GroupName MaxUnscaledDigits = 9 GroupDigits = ON ConfirmOnExit = # empty means OFF HistoryFile = ~/.githistory InfoDisplay = ON LeadingDotMatch = ON # OFF means that leading '.' is matched only explicitly TypeSensitivity = ON # Automatically set to OFF when AnsiColors is OFF NormalModeHelp = F3 View F4 Edit F5 Copy F6 Move F7 MkDir F8 Del F10 Exit ^CH Ln ^CS SymLn CommandLineModeHelp = ^G-STOP ^B/^F-MOVE ^P/^N-HISTORY ^A-BOL ^E-EOL ^O-RESTORE ^X^C-EXIT ^Z-SUSPEND #NormalModeHelp = System: \s Host: \h Machine: \m Date: \d #CommandLineModeHelp = System: \s Host: \h Machine: \m Date: \d [GITPS-Setup] Help = Arrows-MOVE Enter-SIGNALS ^L-REFRESH ^X^C/F10-QUIT ^Xk-KILL RefreshAfterKill = ON # Refresh process list after killing processes [GITVIEW-Setup] Help = Arrows/PgUp/PgDown/Home/End-MOVE ^L-REFRESH ^X^C/F10-QUIT 0-9/a-f/A-F-OFFSET ### ### To ignore a section just comment its name ### ### ### shell-pattern = [foreground]; [background]; [brightness] ### [GITFM-FTI] *.[chlysp] = GREEN;; *.[chlysp].[bg]z = GREEN;; *.[chlysp].bz2 = GREEN;; *.[chlysp].Z = GREEN;; *.cc = GREEN;; *.cc.[bg]z = GREEN;; *.cc.bz2 = GREEN;; *.cc.Z = GREEN;; *.cpp = GREEN;; *.cpp.[bg]z = GREEN;; *.cpp.bz2 = GREEN;; *.cpp.Z = GREEN;; *.c++ = GREEN;; *.c++.[bg]z = GREEN;; *.c++.bz2 = GREEN;; *.c++.Z = GREEN;; *.java = GREEN;; *.java.[bg]z = GREEN;; *.java.bz2 = GREEN;; *.java.Z = GREEN;; *.pov = GREEN;; *.pov.[bg]z = GREEN;; *.pov.bz2 = GREEN;; *.pov.Z = GREEN;; *.m4 = GREEN;; *.m4.[bg]z = GREEN;; *.m4.bz2 = GREEN;; *.m4.Z = GREEN;; *.pl = GREEN;; *.pl.[bg]z = GREEN;; *.pl.bz2 = GREEN;; *.pl.Z = GREEN;; *.inc = GREEN;; *.inc.[bg]z = GREEN;; *.inc.bz2 = GREEN;; *.inc.Z = GREEN;; *.el = GREEN;; *.el.[bg]z = GREEN;; *.el.bz2 = GREEN;; *.el.Z = GREEN;; *.elc = GREEN;; *.elc.[bg]z = GREEN;; *.elc.bz2 = GREEN;; *.elc.Z = GREEN;; *.py.[bg]z = GREEN;; *.py.bz2 = GREEN;; *.py.Z = GREEN;; *.idl = GREEN;; *.idl.[bg]z = GREEN;; *.idl.bz2 = GREEN;; *.idl.Z = GREEN;; *.in = GREEN;; *.in.[bg]z = GREEN;; *.in.bz2 = GREEN;; *.in.Z = GREEN;; *.pas = GREEN;; *.pas.[bg]z = GREEN;; *.pas.bz2 = GREEN;; *.pas.Z = GREEN;; *.pm = GREEN;; *.pm.[bg]z = GREEN;; *.pm.bz2 = GREEN;; *.pm.Z = GREEN;; *,v = CYAN;; *,v.[bg]z = CYAN;; *,v.bz2 = CYAN;; *,v.Z = CYAN;; Makefile = CYAN;; Makefile.am = GREEN;; Makefile.* = CYAN;; *.o = CYAN;; *.o.[bg]z = CYAN;; *.o.bz2 = CYAN;; *.o.Z = CYAN;; *.lo = CYAN;; *.lo.[bg]z = CYAN;; *.lo.bz2 = CYAN;; *.lo.Z = CYAN;; *.la = CYAN;; *.la.[bg]z = CYAN;; *.la.bz2 = CYAN;; *.la.Z = CYAN;; *.class = CYAN;; *.class.[bg]z = CYAN;; *.class.bz2 = CYAN;; *.class.Z = CYAN;; *.a = CYAN;; *.a.[bg]z = CYAN;; *.a.bz2 = CYAN;; *.a.Z = CYAN;; *.sa = CYAN;; *.sa.* = CYAN;; *.so = CYAN;; *.so.[0-9]* = CYAN;; *.texi = WHITE;; *.texi.[bg]z = WHITE;; *.texi.bz2 = WHITE;; *.texi.Z = WHITE;; *.texinfo = WHITE;; *.texinfo.[bg]z = WHITE;; *.texinfo.bz2 = WHITE;; *.texinfo.Z = WHITE;; *.info* = WHITE;; *.dir = WHITE;; *.dir.[bg]z = WHITE;; *.dir.bz2 = WHITE;; *.dir.Z = WHITE;; *.man = WHITE;; *.man.[bg]z = WHITE;; *.man.bz2 = WHITE;; *.man.Z = WHITE;; *.ms = WHITE;; *.ms.[bg]z = WHITE;; *.ms.bz2 = WHITE;; *.ms.Z = WHITE;; *.[0-9n] = WHITE;; *.[0-9n].[bg]z = WHITE;; *.[0-9n].bz2 = WHITE;; *.[0-9n].Z = WHITE;; *.[0-9n][xm] = WHITE;; *.[0-9n][xm].[bg]z = WHITE;; *.[0-9n][xm].bz2 = WHITE;; *.[0-9n][xm].Z = WHITE;; *.[0-9n]tk = WHITE;; *.[0-9n]tk.[bg]z = WHITE;; *.[0-9n]tk.bz2 = WHITE;; *.[0-9n]tk.Z = WHITE;; *.[0-9n]tcl = WHITE;; *.[0-9n]tcl.[bg]z = WHITE;; *.[0-9n]tcl.bz2 = WHITE;; *.[0-9n]tcl.Z = WHITE;; *.[0-9n]tclx = WHITE;; *.[0-9n]tclx.[bg]z = WHITE;; *.[0-9n]tclx.bz2 = WHITE;; *.[0-9n]tclx.Z = WHITE;; *.[0-9n]itcl = WHITE;; *.[0-9n]itcl.[bg]z = WHITE;; *.[0-9n]itcl.bz2 = WHITE;; *.[0-9n]itcl.Z = WHITE;; *.[0-9n]blt = WHITE;; *.[0-9n]blt.[bg]z = WHITE;; *.[0-9n]blt.bz2 = WHITE;; *.[0-9n]blt.Z = WHITE;; *.doc = WHITE;; *.doc.[bg]z = WHITE;; *.doc.bz2 = WHITE;; *.doc.Z = WHITE;; *.ppt = WHITE;; *.ppt.[bg]z = WHITE;; *.ppt.bz2 = WHITE;; *.ppt.Z = WHITE;; *.aw = WHITE;; *.aw.[bg]z = WHITE;; *.aw.bz2 = WHITE;; *.aw.Z = WHITE;; *.lyx = WHITE;; *.lyx.[bg]z = WHITE;; *.lyx.bz2 = WHITE;; *.lyx.Z = WHITE;; *.orig = WHITE;; *.orig.[bg]z = WHITE;; *.orig.bz2 = WHITE;; *.orig.Z = WHITE;; *.txt = WHITE;; *.txt.[bg]z = WHITE;; *.txt.bz2 = WHITE;; *.txt.Z = WHITE;; *.text = WHITE;; *.text.[bg]z = WHITE;; *.text.bz2 = WHITE;; *.text.Z = WHITE;; *.log = WHITE;; *.log.[bg]z = WHITE;; *.log.bz2 = WHITE;; *.log.Z = WHITE;; *.aux = WHITE;; *.aux.[bg]z = WHITE;; *.aux.bz2 = WHITE;; *.aux.Z = WHITE;; *.lsm = WHITE;; *.lsm.[bg]z = WHITE;; *.lsm.bz2 = WHITE;; *.lsm.Z = WHITE;; *.tex = WHITE;; *.tex.[bg]z = WHITE;; *.tex.bz2 = WHITE;; *.tex.Z = WHITE;; *.diff = WHITE;; *.diff.[bg]z = WHITE;; *.diff.bz2 = WHITE;; *.diff.Z = WHITE;; *.html = WHITE;; *.html.[bg]z = WHITE;; *.html.bz2 = WHITE;; *.html.Z = WHITE;; *.htm = WHITE;; *.htm.[bg]z = WHITE;; *.htm.bz2 = WHITE;; *.htm.Z = WHITE;; README* = WHITE;; *.README = WHITE;; *.README.[bg]z = WHITE;; *.README.bz2 = WHITE;; *.README.Z = WHITE;; ChangeLog = WHITE;; ChangeLog.[bg]z = WHITE;; ChangeLog.bz2 = WHITE;; ChangeLog.Z = WHITE;; INSTALL* = WHITE;; *NEWS = WHITE;; PLATFORMS = WHITE;; PROBLEMS = WHITE;; TODO* = WHITE;; LSM = WHITE;; TAGS = WHITE;; TAGS. = WHITE;; COPYING = WHITE;; COPYING.[bg]z = WHITE;; COPYING.bz2 = WHITE;; COPYING.Z = WHITE;; [SR]MAIL* = WHITE;; INBOX* = WHITE;; OUTBOX* = WHITE;; *.pgp = CYAN;; *.pgp.[bg]z = CYAN;; *.pgp.bz2 = CYAN;; *.pgp.Z = CYAN;; *.ps = MAGENTA;; *.ps.[bg]z = MAGENTA;; *.ps.bz2 = MAGENTA;; *.ps.Z = MAGENTA;; *.eps = MAGENTA;; *.eps.[bg]z = MAGENTA;; *.eps.bz2 = MAGENTA;; *.eps.Z = MAGENTA;; *.fig = MAGENTA;; *.fig.[bg]z = MAGENTA;; *.fig.bz2 = MAGENTA;; *.fig.Z = MAGENTA;; *.dvi = MAGENTA;; *.dvi.[bg]z = MAGENTA;; *.dvi.bz2 = MAGENTA;; *.dvi.Z = MAGENTA;; *.pdf = MAGENTA;; *.pdf.[bg]z = MAGENTA;; *.pdf.bz2 = MAGENTA;; *.pdf.Z = MAGENTA;; *.gif = MAGENTA;; *.gif.[bg]z = MAGENTA;; *.gif.bz2 = MAGENTA;; *.gif.Z = MAGENTA;; *.jpg = MAGENTA;; *.jpg.[bg]z = MAGENTA;; *.jpg.bz2 = MAGENTA;; *.jpg.Z = MAGENTA;; *.jpeg = MAGENTA;; *.jpeg.[bg]z = MAGENTA;; *.jpeg.bz2 = MAGENTA;; *.jpeg.Z = MAGENTA;; *.djv = MAGENTA;; *.djv.[bg]z = MAGENTA;; *.djv.bz2 = MAGENTA;; *.djv.Z = MAGENTA;; *.tif = MAGENTA;; *.tif.[bg]z = MAGENTA;; *.tif.bz2 = MAGENTA;; *.tif.Z = MAGENTA;; *.tiff = MAGENTA;; *.tiff.[bg]z = MAGENTA;; *.tiff.bz2 = MAGENTA;; *.tiff.Z = MAGENTA;; *.bmp = MAGENTA;; *.bmp.[bg]z = MAGENTA;; *.bmp.bz2 = MAGENTA;; *.bmp.Z = MAGENTA;; *.png = MAGENTA;; *.png.[bg]z = MAGENTA;; *.png.bz2 = MAGENTA;; *.png.Z = MAGENTA;; *.pnm = MAGENTA;; *.pnm.[bg]z = MAGENTA;; *.pnm.bz2 = MAGENTA;; *.pnm.Z = MAGENTA;; *.ppm = MAGENTA;; *.ppm.[bg]z = MAGENTA;; *.ppm.bz2 = MAGENTA;; *.ppm.Z = MAGENTA;; *.pgm = MAGENTA;; *.pgm.[bg]z = MAGENTA;; *.pgm.bz2 = MAGENTA;; *.pgm.Z = MAGENTA;; *.pbm = MAGENTA;; *.pbm.[bg]z = MAGENTA;; *.pbm.bz2 = MAGENTA;; *.pbm.Z = MAGENTA;; *.xbm = MAGENTA;; *.xbm.[bg]z = MAGENTA;; *.xbm.bz2 = MAGENTA;; *.xbm.Z = MAGENTA;; *.xpm = MAGENTA;; *.xpm.[bg]z = MAGENTA;; *.xpm.bz2 = MAGENTA;; *.xpm.Z = MAGENTA;; *.fit = MAGENTA;; *.fit.[bg]z = MAGENTA;; *.fit.bz2 = MAGENTA;; *.fit.Z = MAGENTA;; *.icon = MAGENTA;; *.icon.[bg]z = MAGENTA;; *.icon.bz2 = MAGENTA;; *.icon.Z = MAGENTA;; *.cursor = MAGENTA;; *.cursor.[bg]z = MAGENTA;; *.cursor.bz2 = MAGENTA;; *.cursor.Z = MAGENTA;; *.ras = MAGENTA;; *.ras.[bg]z = MAGENTA;; *.ras.bz2 = MAGENTA;; *.ras.Z = MAGENTA;; *.tga = MAGENTA;; *.tga.[bg]z = MAGENTA;; *.tga.bz2 = MAGENTA;; *.tga.Z = MAGENTA;; *.xcf = MAGENTA;; *.xcf.[bg]z = MAGENTA;; *.xcf.bz2 = MAGENTA;; *.xcf.Z = MAGENTA;; *.pr = MAGENTA;; *.pr.[bg]z = MAGENTA;; *.pr.bz2 = MAGENTA;; *.pr.Z = MAGENTA;; *.rgb = MAGENTA;; *.rgb.[bg]z = MAGENTA;; *.rgb.bz2 = MAGENTA;; *.rgb.Z = MAGENTA;; *.fts = MAGENTA;; *.fts.[bg]z = MAGENTA;; *.fts.bz2 = MAGENTA;; *.fts.Z = MAGENTA;; *.mov = CYAN;; *.mov.[bg]z = CYAN;; *.mov.bz2 = CYAN;; *.mov.Z = CYAN;; *.mpg = CYAN;; *.mpg.[bg]z = CYAN;; *.mpg.bz2 = CYAN;; *.mpg.Z = CYAN;; *.mpeg = CYAN;; *.mpeg.[bg]z = CYAN;; *.mpeg.bz2 = CYAN;; *.mpeg.Z = CYAN;; *.avi = CYAN;; *.avi.[bg]z = CYAN;; *.avi.bz2 = CYAN;; *.avi.Z = CYAN;; *.fli = CYAN;; *.fli.[bg]z = CYAN;; *.fli.bz2 = CYAN;; *.fli.Z = CYAN;; *.flc = CYAN;; *.flc.[bg]z = CYAN;; *.flc.bz2 = CYAN;; *.flc.Z = CYAN;; *.au = CYAN;; *.au.[bg]z = CYAN;; *.au.bz2 = CYAN;; *.au.Z = CYAN;; *.mp3 = CYAN;; *.mp3.[bg]z = CYAN;; *.mp3.bz2 = CYAN;; *.mp3.Z = CYAN;; *.ra = CYAN;; *.ra.[bg]z = CYAN;; *.ra.bz2 = CYAN;; *.ra.Z = CYAN;; *.ram = CYAN;; *.ram.[bg]z = CYAN;; *.ram.bz2 = CYAN;; *.ram.Z = CYAN;; *.mod = CYAN;; *.mod.[bg]z = CYAN;; *.mod.bz2 = CYAN;; *.mod.Z = CYAN;; *.mtm = CYAN;; *.mtm.[bg]z = CYAN;; *.mtm.bz2 = CYAN;; *.mtm.Z = CYAN;; *.xm = CYAN;; *.xm.[bg]z = CYAN;; *.xm.bz2 = CYAN;; *.xm.Z = CYAN;; *.mid = CYAN;; *.mid.[bg]z = CYAN;; *.mid.bz2 = CYAN;; *.mid.Z = CYAN;; *.midi = CYAN;; *.midi.[bg]z = CYAN;; *.midi.bz2 = CYAN;; *.midi.Z = CYAN;; *.s3m = CYAN;; *.s3m.[bg]z = CYAN;; *.s3m.bz2 = CYAN;; *.s3m.Z = CYAN;; *.voc = CYAN;; *.voc.[bg]z = CYAN;; *.voc.bz2 = CYAN;; *.voc.Z = CYAN;; *.aiff = CYAN;; *.aiff.[bg]z = CYAN;; *.aiff.bz2 = CYAN;; *.aiff.Z = CYAN;; *.aifc = CYAN;; *.aifc.[bg]z = CYAN;; *.aifc.bz2 = CYAN;; *.aifc.Z = CYAN;; *.wav = CYAN;; *.wav.[bg]z = CYAN;; *.wav.bz2 = CYAN;; *.wav.Z = CYAN;; *.rmd = CYAN;; *.rmd.[bg]z = CYAN;; *.rmd.bz2 = CYAN;; *.rmd.Z = CYAN;; *.pvf = CYAN;; *.pvf.[bg]z = CYAN;; *.pvf.bz2 = CYAN;; *.pvf.Z = CYAN;; *.tar.[bg]z = RED;; *.tar.bz2 = RED;; *.tar.Z = RED;; *.tgZ = RED;; *.ta[rZ] = RED;; *.trZ = RED;; *.[bg]z = RED;; *.bz2 = RED;; *.Z = RED;; *.zip = RED;; *.jar = RED;; *.arj = RED;; *.a[0-9][1-9] = RED;; *.rar = RED;; *.r[0-9][0-9] = RED;; *.shar = RED;; *.uu = RED;; *.rpm = RED;; *.deb = RED;; .* = CYAN;; ################### ### Color xterm ### ################### [GITFM-Color] TitleForeground = CYAN TitleBackground = BLACK TitleBrightness = OFF UserName = RED TtyName = RED ClockForeground = BLACK ClockBackground = CYAN ClockBrightness = OFF PanelFrame = WHITE PanelBackground = BLACK PanelThumbForeground = BLACK PanelThumbBackground = WHITE PanelThumbBrightness = OFF PanelSelectedFile = YELLOW PanelSelectedFileBrightness = OFF PanelNotSelectedFile = WHITE PanelNotSelectedFileBrightness = OFF PanelCurrentSelectedFile = YELLOW PanelCurrentNotSelectedFile = WHITE PanelCurrentFile = BLUE PanelPath = RED PanelPathBrightness = OFF PanelDeviceFreeSpace = RED PanelDeviceFreeSpaceBrightness = OFF PanelFileInfo = RED PanelFileInfoBrightness = OFF PanelFilesInfo = BLACK PanelFilesInfoBrightness = OFF InputLineForeground = WHITE InputLineBackground = BLACK InputLineBrightness = OFF InputLineErrorForeground = WHITE InputLineErrorBackground = RED InputLineErrorBrightness = OFF StatusBarForeground = BLACK StatusBarBackground = CYAN StatusBarBrightness = OFF StatusBarWarningForeground = BLACK StatusBarWarningBackground = WHITE StatusBarWarningBrightness = OFF StatusBarErrorForeground = WHITE StatusBarErrorBackground = RED StatusBarErrorBrightness = OFF [GITPS-Color] TitleForeground = CYAN TitleBackground = BLUE TitleBrightness = OFF HeaderForeground = CYAN HeaderBackground = RED HeaderBrightness = OFF ScreenForeground = BLACK ScreenBackground = CYAN ScreenBrightness = OFF StatusForeground = CYAN StatusBackground = BLUE StatusBrightness = OFF [GITVIEW-Color] TitleForeground = CYAN TitleBackground = BLUE TitleBrightness = OFF HeaderForeground = CYAN HeaderBackground = RED HeaderBrightness = OFF ScreenForeground = BLACK ScreenBackground = CYAN ScreenBrightness = OFF StatusForeground = CYAN StatusBackground = BLUE StatusBrightness = OFF ######################## ### monochrome xterm ### ######################## [GITFM-Monochrome] TitleForeground = WHITE TitleBackground = BLACK TitleBrightness = ON UserName = WHITE TtyName = WHITE ClockForeground = BLACK ClockBackground = WHITE ClockBrightness = OFF PanelFrame = WHITE PanelBackground = BLACK PanelThumbForeground = BLACK PanelThumbBackground = WHITE PanelThumbBrightness = OFF PanelSelectedFile = WHITE PanelSelectedFileBrightness = ON PanelNotSelectedFile = WHITE PanelNotSelectedFileBrightness = OFF PanelCurrentSelectedFile = WHITE PanelCurrentNotSelectedFile = BLACK PanelCurrentFile = WHITE PanelPath = BLACK PanelPathBrightness = OFF PanelDeviceFreeSpace = BLACK PanelDeviceFreeSpaceBrightness = OFF PanelFileInfo = BLACK PanelFileInfoBrightness = OFF PanelFilesInfo = BLACK PanelFilesInfoBrightness = OFF InputLineForeground = WHITE InputLineBackground = BLACK InputLineBrightness = ON InputLineErrorForeground = WHITE InputLineErrorBackground = BLACK InputLineErrorBrightness = ON StatusBarForeground = BLACK StatusBarBackground = WHITE StatusBarBrightness = OFF StatusBarWarningForeground = BLACK StatusBarWarningBackground = WHITE StatusBarWarningBrightness = OFF StatusBarErrorForeground = BLACK StatusBarErrorBackground = WHITE StatusBarErrorBrightness = OFF [GITPS-Monochrome] TitleForeground = BLACK TitleBackground = WHITE TitleBrightness = OFF HeaderForeground = WHITE HeaderBackground = BLACK HeaderBrightness = ON ScreenForeground = WHITE ScreenBackground = BLACK ScreenBrightness = OFF StatusForeground = BLACK StatusBackground = WHITE StatusBrightness = OFF [GITVIEW-Monochrome] TitleForeground = BLACK TitleBackground = WHITE TitleBrightness = OFF HeaderForeground = WHITE HeaderBackground = BLACK HeaderBrightness = ON ScreenForeground = WHITE ScreenBackground = BLACK ScreenBrightness = OFF StatusForeground = BLACK StatusBackground = WHITE StatusBrightness = OFF ### ### COMMAND FORMAT: ### key = command name; formatted command; new dir; save screen; pause; hide ### ### DEFAULTS: ### save screen = y ### pause = n ### hide = n ### ### PLEASE READ THE INFO DOCUMENTATION FOR DETAILS ### BRIEF: ### ### FORMAT SPECIFIERS: ### - %s{question,default_answer} ### - %?{confirmation} ### ### - %f file (not directory) ### - %d directory (not file) ### - %l symbolic link ### - %t fifo ### - %z socket ### - %a any type of directory entry (file, directory, link, fifo, socket) ### - %m current entry mode ### - %g current entry group ### - %o current entry owner ### - %p current panel path ### - %b current panel directory name ### - %i current panel selected or current entry ### ### **** For the other panel: ***** ### ### - %F file (not directory) ### - %D directory (not file) ### - %L symbolic link ### - %T fifo ### - %Z socket ### - %A any type of directory entry (file, directory, link, fifo, socket) ### - %M current entry mode ### - %G current entry group ### - %O current entry owner ### - %P the other panel path ### - %B the other panel directory name ### - %I the other panel selected or current entry ### ### For faster startup, try to keep this entries sorted alphabetically, ### at least locally. The order is given by the key sequence. ### ### ### Key sequences starting with characters between ' ' and '~' are IGNORED! ### [GITFM-Keys] ^[[A = previous-line ^[[B = next-line ^[[C = forward-char ^[[D = backward-char ^[OB = next-line ^[OC = forward-char ^[OD = backward-char ^[[2~ = select-entry ^[[5~ = scroll-down # PGUP ^[[6~ = scroll-up # PGDOWN ^[[7~ = beginning-of-panel # HOME ^[[8~ = end-of-panel # END ^[[H = beginning-of-panel # HOME ^[[F = end-of-panel # END ^[Ow = end-of-panel # END ^[[11~ = INFO; info %s{Info documentation: ,} # F1 (HP-UX xterm) ^[[12~ = FILE-ACTION; gitaction %p %f # F2 (HP-UX xterm) ^[[13~ = VIEW; gitview %f;;n # F3 (HP-UX xterm) ^[[14~ = EDIT; $GNUIT_EDITOR %f;;n # F4 (HP-UX xterm) ^[[15~ = copy # F5 (HP-UX xterm) ^[OP = INFO; info %s{Info documentation: ,} # F1 ^[OQ = FILE-ACTION; gitaction %p %f # F2 ^[OR = VIEW; gitview %f;;n # F3 ^[OS = EDIT; $GNUIT_EDITOR %f;;n # F4 ^[[28~ = INFO; info %s{Info documentation: ,} # F1 ^[[33~ = FILE-ACTION; gitaction %p %f # F2 ^[[34~ = VIEW; gitview %f;;n # F3 ^[[29~ = EDIT; $GNUIT_EDITOR %f;;n # F4 ^[[32~ = copy # F5 ^[[17~ = move # F6 ^[[18~ = make-directory # F7 ^[[19~ = delete # F8 ^[[20~ = MAKE; make %s{Options: ,-k };;;y # F9 ^[[21~ = exit # F10 ^[[23~ = GITPS; gitps;;n # F11 ^[[24~ = READ-MAIL; $GNUIT_RMAIL;;n # F12 ### ### Only key sequences starting with characters between ' ' and '~' are ### ALLOWED. ### [GITPS-Keys] ^[[A = previous-line ^[[B = next-line ^[[5~ = scroll-down # PGUP ^[[D = scroll-down # PGUP ^[[6~ = scroll-up # PGDOWN ^[[C = scroll-up # PGDOWN ^[[H = beginning-of-list # HOME ^[[F = end-of-list # END ^[OA = previous-line ^[OB = next-line ^[OC = scroll-up ^[OD = scroll-down ^[[21~ = exit # F10 ### ### Key sequences starting with characters between ' ' and '~' are IGNORED! ### [GITVIEW-Keys] ^[[A = previous-line ^[[B = next-line ^[[H = beginning-of-file # HOME ^[[F = end-of-file # END ^[[5~ = scroll-down # PGUP ^[[D = scroll-down # PGUP ^[[6~ = scroll-up # PGDOWN ^[[C = scroll-up # PGDOWN ^[OA = previous-line ^[OB = next-line ^[OC = scroll-up ^[OD = scroll-down ^[[21~ = exit # F10 gnuit-4.9.5/term/gnuitrc.vt100.in0000644000175000017500000002542011146671376013442 00000000000000############################################################################### ### ### ### GNU Interactive Tools @VERSION@ configuration file ### ### Copyright (c) 1993-2000, 2006-2007 Free Software Foundation, Inc. ### ### ### ### This file is part of gnuit. ### ### ### ### gnuit 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 3 of the ### ### License, or (at your option) any later version. ### ### ### ### gnuit 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, see ### ### http://www.gnu.org/licenses/. ### ### ### ############################################################################### ### ### vt100 configuration file. ### ### ### If your terminal supports the standard ANSI color sequences, set ### AnsiColors to ON ([GITxxx-Color] descriptions will be used). If ### it doesn't, AnsiColors should be OFF ([GITxxx-Monochrome] ### descriptions # will be used instead). ### [Setup] AnsiColors = OFF # empty means OFF UseLastScreenChar = ON # use the last character on the screen StartupScrollStep = # empty means half the number of lines ### ### WARNING: empty lines are considered to be end of sections! ### [GITFM-Setup] StartupFileDisplayMode = Size # OwnerGroup, DateTime, Size, AbbrevSize, Mode or FullName StartupFileSortMethod = Name # Name, Extension, Size, Date, Mode, OwnerId, GroupId, OwnerName or GroupName MaxUnscaledDigits = 9 GroupDigits = ON ConfirmOnExit = # empty means OFF HistoryFile = ~/.githistory InfoDisplay = ON LeadingDotMatch = ON # OFF means that leading '.' is matched only explicitly TypeSensitivity = ON # Automatically set to OFF when AnsiColors is OFF NormalModeHelp = F3 View F4 Edit F5 Copy F6 Move F7 MkDir F8 Del ^X^C Exit ^CH Ln ^CS SymLn CommandLineModeHelp = ^G-STOP ^B/^F-MOVE ^P/^N-HISTORY ^A-BOL ^E-EOL ^O-RESTORE ^X^C-EXIT ^Z-SUSPEND #NormalModeHelp = System: \s Host: \h Machine: \m Date: \d #CommandLineModeHelp = System: \s Host: \h Machine: \m Date: \d [GITPS-Setup] Help = Arrows-MOVE Enter-SIGNALS ^L-REFRESH ^X^C/F10-QUIT ^Xk-KILL RefreshAfterKill = ON # Refresh process list after killing processes [GITVIEW-Setup] Help = Arrows/PgUp/PgDown/Home/End-MOVE ^L-REFRESH ^X^C/F10-QUIT 0-9/a-f/A-F-OFFSET ### ### To ignore a section just comment its name ### [GITFM-FTI] ############################### ### vt100 with ANSI colors. ### ############################### [GITFM-Color] TitleForeground = CYAN TitleBackground = BLUE TitleBrightness = ON UserName = YELLOW TtyName = YELLOW ClockForeground = BLACK ClockBackground = CYAN ClockBrightness = OFF PanelFrame = WHITE PanelBackground = BLUE PanelThumbForeground = BLACK PanelThumbBackground = WHITE PanelThumbBrightness = OFF PanelSelectedFile = YELLOW PanelSelectedFileBrightness = ON PanelNotSelectedFile = WHITE PanelNotSelectedFileBrightness = ON PanelCurrentSelectedFile = YELLOW PanelCurrentNotSelectedFile = WHITE PanelCurrentFile = CYAN PanelPath = RED PanelPathBrightness = OFF PanelDeviceFreeSpace = RED PanelDeviceFreeSpaceBrightness = OFF PanelFileInfo = RED PanelFileInfoBrightness = OFF PanelFilesInfo = BLACK PanelFilesInfoBrightness = OFF InputLineForeground = WHITE InputLineBackground = BLACK InputLineBrightness = ON InputLineErrorForeground = WHITE InputLineErrorBackground = RED InputLineErrorBrightness = ON StatusBarForeground = BLACK StatusBarBackground = CYAN StatusBarBrightness = OFF StatusBarWarningForeground = BLACK StatusBarWarningBackground = WHITE StatusBarWarningBrightness = OFF StatusBarErrorForeground = WHITE StatusBarErrorBackground = RED StatusBarErrorBrightness = ON [GITPS-Color] TitleForeground = CYAN TitleBackground = BLUE TitleBrightness = ON HeaderForeground = CYAN HeaderBackground = RED HeaderBrightness = ON ScreenForeground = BLACK ScreenBackground = CYAN ScreenBrightness = OFF StatusForeground = CYAN StatusBackground = BLUE StatusBrightness = ON [GITVIEW-Color] TitleForeground = CYAN TitleBackground = BLUE TitleBrightness = ON HeaderForeground = CYAN HeaderBackground = RED HeaderBrightness = ON ScreenForeground = BLACK ScreenBackground = CYAN ScreenBrightness = OFF StatusForeground = CYAN StatusBackground = BLUE StatusBrightness = ON ################################### ### vt100 monochrome settings. ### ################################### [GITFM-Monochrome] TitleForeground = WHITE TitleBackground = BLACK TitleBrightness = ON UserName = WHITE TtyName = WHITE ClockForeground = BLACK ClockBackground = WHITE ClockBrightness = OFF PanelFrame = WHITE PanelBackground = BLACK PanelThumbForeground = BLACK PanelThumbBackground = WHITE PanelThumbBrightness = OFF PanelSelectedFile = WHITE PanelSelectedFileBrightness = ON PanelNotSelectedFile = WHITE PanelNotSelectedFileBrightness = OFF PanelCurrentSelectedFile = WHITE PanelCurrentNotSelectedFile = BLACK PanelCurrentFile = WHITE PanelPath = BLACK PanelPathBrightness = OFF PanelDeviceFreeSpace = BLACK PanelDeviceFreeSpaceBrightness = OFF PanelFileInfo = BLACK PanelFileInfoBrightness = OFF PanelFilesInfo = BLACK PanelFilesInfoBrightness = OFF InputLineForeground = WHITE InputLineBackground = BLACK InputLineBrightness = ON InputLineErrorForeground = WHITE InputLineErrorBackground = BLACK InputLineErrorBrightness = ON StatusBarForeground = BLACK StatusBarBackground = WHITE StatusBarBrightness = OFF StatusBarWarningForeground = BLACK StatusBarWarningBackground = WHITE StatusBarWarningBrightness = OFF StatusBarErrorForeground = BLACK StatusBarErrorBackground = WHITE StatusBarErrorBrightness = OFF [GITPS-Monochrome] TitleForeground = BLACK TitleBackground = WHITE TitleBrightness = OFF HeaderForeground = WHITE HeaderBackground = BLACK HeaderBrightness = ON ScreenForeground = WHITE ScreenBackground = BLACK ScreenBrightness = OFF StatusForeground = BLACK StatusBackground = WHITE StatusBrightness = OFF [GITVIEW-Monochrome] TitleForeground = BLACK TitleBackground = WHITE TitleBrightness = OFF HeaderForeground = WHITE HeaderBackground = BLACK HeaderBrightness = ON ScreenForeground = WHITE ScreenBackground = BLACK ScreenBrightness = OFF StatusForeground = BLACK StatusBackground = WHITE StatusBrightness = OFF ### ### COMMAND FORMAT: ### key = command name; formatted command; new dir; save screen; pause; hide ### ### DEFAULTS: ### save screen = y ### pause = n ### hide = n ### ### PLEASE READ THE INFO DOCUMENTATION FOR DETAILS ### BRIEF: ### ### FORMAT SPECIFIERS: ### - %s{question,default_answer} ### - %?{confirmation} ### ### - %f file (not directory) ### - %d directory (not file) ### - %l symbolic link ### - %t fifo ### - %z socket ### - %a any type of directory entry (file, directory, link, fifo, socket) ### - %m current entry mode ### - %g current entry group ### - %o current entry owner ### - %p current panel path ### - %b current panel directory name ### - %i current panel selected or current entry ### ### **** For the other panel: ***** ### ### - %F file (not directory) ### - %D directory (not file) ### - %L symbolic link ### - %T fifo ### - %Z socket ### - %A any type of directory entry (file, directory, link, fifo, socket) ### - %M current entry mode ### - %G current entry group ### - %O current entry owner ### - %P the other panel path ### - %B the other panel directory name ### - %I the other panel selected or current entry ### ### For faster startup, try to keep this entries sorted alphabetically, ### at least locally. The order is given by the key sequence. ### ### ### Key sequences starting with characters between ' ' and '~' are IGNORED! ### [GITFM-Keys] ^[[A = previous-line ^[[B = next-line ^[[C = forward-char ^[[D = backward-char ^[OA = previous-line ^[OB = next-line ^[OC = forward-char ^[OD = backward-char ^[[1~ = beginning-of-panel # HOME ^[[4~ = end-of-panel # END ^[[2~ = select-entry # INS ^[[3~ = delete-char # DEL ^[[5~ = scroll-down # PGUP ^[[6~ = scroll-up # PGDOWN ^[[[A = INFO; info %s{Info documentation: ,} # F1 (telnet from a Linux console) ^[[[B = FILE-ACTION; gitaction %p %f # F2 (telnet from a Linux console) ^[[[C = VIEW; gitview %f;;n # F3 (telnet from a Linux console) ^[[[D = EDIT; $GNUIT_EDITOR %f;;n # F4 (telnet from a Linux console) ^[[[E = copy # F5 (telnet from a Linux console) ^[OP = INFO; info %s{Info documentation: ,} # F1 ^[OQ = FILE-ACTION; gitaction %p %f # F2 ^[OR = VIEW; gitview %f;;n # F3 ^[OS = EDIT; $GNUIT_EDITOR %f;;n # F4 ^[[16~ = copy # F5 ^[[17~ = move # F6 ^[[18~ = make-directory # F7 ^[[19~ = delete # F8 ^[[20~ = MAKE; make %s{Options: ,-k };;;y # F9 ^[[21~ = exit # F10 ^[[23~ = GITPS; gitps;;n # F11 ^[[24~ = READ-MAIL; $GNUIT_RMAIL;;n # F12 ### ### Only key sequences starting with characters between ' ' and '~' are ### ALLOWED. ### [GITPS-Keys] ^[[A = previous-line ^[[B = next-line ^[[5~ = scroll-down # PGUP ^[[D = scroll-down # PGUP ^[[6~ = scroll-up # PGDOWN ^[[C = scroll-up # PGDOWN ^[[1~ = beginning-of-list ^[[4~ = end-of-list ^[OA = previous-line ^[OB = next-line ^[OC = scroll-up ^[OD = scroll-down ^[[21~ = exit # F10 ### ### Key sequences starting with characters between ' ' and '~' are IGNORED! ### [GITVIEW-Keys] ^[[A = previous-line ^[[B = next-line ^[[5~ = scroll-down # PGUP ^[[D = scroll-down # PGUP ^[[6~ = scroll-up # PGDOWN ^[[C = scroll-up # PGDOWN ^[OA = previous-line ^[OB = next-line ^[OC = scroll-up ^[OD = scroll-down ^[[1~ = beginning-of-file # HOME ^[[4~ = end-of-file # END ^[[21~ = exit # F10 gnuit-4.9.5/term/gnuitrc.minix.in0000644000175000017500000002156711146671376013724 00000000000000############################################################################### ### ### ### GNU Interactive Tools @VERSION@ configuration file ### ### Copyright (c) 1993-2000, 2006-2007 Free Software Foundation, Inc. ### ### ### ### This file is part of gnuit. ### ### ### ### gnuit 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 3 of the ### ### License, or (at your option) any later version. ### ### ### ### gnuit 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, see ### ### http://www.gnu.org/licenses/. ### ### ### ############################################################################### ### ### minix configuration file. ### ### ### If your terminal supports the standard ANSI color sequences, set ### AnsiColors to ON ([GITxxx-Color] descriptions will be used). If it ### doesn't, AnsiColors should be OFF ([GITxxx-Monochrome] descriptions ### will be used instead). Ansi terminals usually support color ### sequences so AnsiColors is ON here. ### [Setup] AnsiColors = ON # empty means OFF UseLastScreenChar = OFF # use the last character on the screen StartupScrollStep = # empty means half the number of lines ### ### WARNING: empty lines are considered to be end of sections! ### [GITFM-Setup] StartupFileDisplayMode = Size # OwnerGroup, DateTime, Size, AbbrevSize, Mode or FullName StartupFileSortMethod = Name # Name, Extension, Size, Date, Mode, OwnerId, GroupId, OwnerName or GroupName MaxUnscaledDigits = 9 GroupDigits = ON ConfirmOnExit = # empty means OFF HistoryFile = ~/.githistory InfoDisplay = ON LeadingDotMatch = ON # OFF means that leading '.' is matched only explicitly TypeSensitivity = ON # Automatically set to OFF when AnsiColors is OFF NormalModeHelp = F3 View F4 Edit F5 Copy F6 Move F7 MkDir F8 Del F10 Exit ^CH Ln ^CS SymLn CommandLineModeHelp = ^G-STOP ^B/^F-MOVE ^P/^N-HISTORY ^A-BOL ^E-EOL ^O-RESTORE ^X^C-EXIT ^Z-SUSPEND #NormalModeHelp = System: \s Host: \h Machine: \m Date: \d #CommandLineModeHelp = System: \s Host: \h Machine: \m Date: \d [GITPS-Setup] Help = Arrows-MOVE Enter-SIGNALS ^L-REFRESH ^X^C/F10-QUIT ^Xk-KILL RefreshAfterKill = ON # Refresh process list after killing processes [GITVIEW-Setup] Help = Arrows/PgUp/PgDown/Home/End-MOVE ^L-REFRESH ^X^C/F10-QUIT 0-9/a-f/A-F-OFFSET ### ### To ignore a section just comment its name ### [GITFM-FTI] ################################ ### minix with color monitor ### ################################ [GITFM-Color] TitleForeground = CYAN TitleBackground = BLUE TitleBrightness = ON UserName = YELLOW TtyName = YELLOW ClockForeground = BLACK ClockBackground = CYAN ClockBrightness = OFF PanelFrame = WHITE PanelBackground = BLUE PanelThumbForeground = BLACK PanelThumbBackground = WHITE PanelThumbBrightness = OFF PanelSelectedFile = YELLOW PanelSelectedFileBrightness = ON PanelNotSelectedFile = WHITE PanelNotSelectedFileBrightness = ON PanelCurrentSelectedFile = YELLOW PanelCurrentNotSelectedFile = WHITE PanelCurrentFile = CYAN PanelPath = RED PanelPathBrightness = OFF PanelDeviceFreeSpace = RED PanelDeviceFreeSpaceBrightness = OFF PanelFileInfo = RED PanelFileInfoBrightness = OFF PanelFilesInfo = BLACK PanelFilesInfoBrightness = OFF InputLineForeground = WHITE InputLineBackground = BLACK InputLineBrightness = ON InputLineErrorForeground = WHITE InputLineErrorBackground = RED InputLineErrorBrightness = ON StatusBarForeground = BLACK StatusBarBackground = CYAN StatusBarBrightness = OFF StatusBarWarningForeground = BLACK StatusBarWarningBackground = WHITE StatusBarWarningBrightness = OFF StatusBarErrorForeground = WHITE StatusBarErrorBackground = RED StatusBarErrorBrightness = ON [GITPS-Color] TitleForeground = CYAN TitleBackground = BLUE TitleBrightness = ON HeaderForeground = CYAN HeaderBackground = RED HeaderBrightness = ON ScreenForeground = BLACK ScreenBackground = CYAN ScreenBrightness = OFF StatusForeground = CYAN StatusBackground = BLUE StatusBrightness = ON [GITVIEW-Color] TitleForeground = CYAN TitleBackground = BLUE TitleBrightness = ON HeaderForeground = CYAN HeaderBackground = RED HeaderBrightness = ON ScreenForeground = BLACK ScreenBackground = CYAN ScreenBrightness = OFF StatusForeground = CYAN StatusBackground = BLUE StatusBrightness = ON ################################################ ### minix with monochrome monitor or b/w tty ### ################################################ [GITFM-Monochrome] TitleForeground = WHITE TitleBackground = BLACK TitleBrightness = ON UserName = WHITE TtyName = WHITE ClockForeground = BLACK ClockBackground = WHITE ClockBrightness = OFF PanelFrame = WHITE PanelBackground = BLACK PanelThumbForeground = BLACK PanelThumbBackground = WHITE PanelThumbBrightness = OFF PanelSelectedFile = WHITE PanelSelectedFileBrightness = ON PanelNotSelectedFile = WHITE PanelNotSelectedFileBrightness = OFF PanelCurrentSelectedFile = WHITE PanelCurrentNotSelectedFile = BLACK PanelCurrentFile = WHITE PanelPath = BLACK PanelPathBrightness = OFF PanelDeviceFreeSpace = BLACK PanelDeviceFreeSpaceBrightness = OFF PanelFileInfo = BLACK PanelFileInfoBrightness = OFF PanelFilesInfo = BLACK PanelFilesInfoBrightness = OFF InputLineForeground = WHITE InputLineBackground = BLACK InputLineBrightness = ON InputLineErrorForeground = WHITE InputLineErrorBackground = BLACK InputLineErrorBrightness = ON StatusBarForeground = BLACK StatusBarBackground = WHITE StatusBarBrightness = OFF StatusBarWarningForeground = BLACK StatusBarWarningBackground = WHITE StatusBarWarningBrightness = OFF StatusBarErrorForeground = BLACK StatusBarErrorBackground = WHITE StatusBarErrorBrightness = OFF [GITPS-Monochrome] TitleForeground = BLACK TitleBackground = WHITE TitleBrightness = OFF HeaderForeground = WHITE HeaderBackground = BLACK HeaderBrightness = ON ScreenForeground = WHITE ScreenBackground = BLACK ScreenBrightness = OFF StatusForeground = BLACK StatusBackground = WHITE StatusBrightness = OFF [GITVIEW-Monochrome] TitleForeground = BLACK TitleBackground = WHITE TitleBrightness = OFF HeaderForeground = WHITE HeaderBackground = BLACK HeaderBrightness = ON ScreenForeground = WHITE ScreenBackground = BLACK ScreenBrightness = OFF StatusForeground = BLACK StatusBackground = WHITE StatusBrightness = OFF ### ### COMMAND FORMAT: ### key = command name; formatted command; new dir; save screen; pause; hide ### ### DEFAULTS: ### save screen = y ### pause = n ### hide = n ### ### PLEASE READ THE INFO DOCUMENTATION FOR DETAILS ### BRIEF: ### ### FORMAT SPECIFIERS: ### - %s{question,default_answer} ### - %?{confirmation} ### ### - %f file (not directory) ### - %d directory (not file) ### - %l symbolic link ### - %t fifo ### - %z socket ### - %a any type of directory entry (file, directory, link, fifo, socket) ### - %m current entry mode ### - %g current entry group ### - %o current entry owner ### - %p current panel path ### - %b current panel directory name ### - %i current panel selected or current entry ### ### **** For the other panel: ***** ### ### - %F file (not directory) ### - %D directory (not file) ### - %L symbolic link ### - %T fifo ### - %Z socket ### - %A any type of directory entry (file, directory, link, fifo, socket) ### - %M current entry mode ### - %G current entry group ### - %O current entry owner ### - %P the other panel path ### - %B the other panel directory name ### - %I the other panel selected or current entry ### ### For faster startup, try to keep this entries sorted alphabetically, ### at least locally. The order is given by the key sequence. ### ### ### Key sequences starting with characters between ' ' and '~' are IGNORED! ### [GITFM-Keys] ### ### Only key sequences starting with characters between ' ' and '~' are ### ALLOWED. ### [GITPS-Keys] ### ### Key sequences starting with characters between ' ' and '~' are IGNORED! ### [GITVIEW-Keys] gnuit-4.9.5/term/gnuitrc.thix.in0000644000175000017500000002210311146671376013537 00000000000000############################################################################### ### ### ### GNU Interactive Tools @VERSION@ configuration file ### ### Copyright (c) 1993-2000, 2006-2007 Free Software Foundation, Inc. ### ### ### ### This file is part of gnuit. ### ### ### ### gnuit 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 3 of the ### ### License, or (at your option) any later version. ### ### ### ### gnuit 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, see ### ### http://www.gnu.org/licenses/. ### ### ### ############################################################################### ### ### Thix virtual terminal configuration file. ### ### ### If your terminal supports the standard ANSI color sequences, set ### AnsiColors to ON ([GITxxx-Color] descriptions will be used). If it ### doesn't, AnsiColors should be OFF ([GITxxx-Monochrome] descriptions ### will be used instead). ### [Setup] AnsiColors = ON # empty means OFF UseLastScreenChar = OFF # use the last character on the screen StartupScrollStep = # empty means half the number of lines ### ### WARNING: empty lines are considered to be end of sections! ### [GITFM-Setup] StartupFileDisplayMode = Size # OwnerGroup, DateTime, Size, AbbrevSize, Mode or FullName StartupFileSortMethod = Name # Name, Extension, Size, Date, Mode, OwnerId, GroupId, OwnerName or GroupName MaxUnscaledDigits = 9 GroupDigits = ON ConfirmOnExit = # empty means OFF HistoryFile = ~/.githistory InfoDisplay = ON LeadingDotMatch = ON # OFF means that leading '.' is matched only explicitly TypeSensitivity = ON # Automatically set to OFF when AnsiColors is OFF NormalModeHelp = F3 View F4 Edit F5 Copy F6 Move F7 MkDir F8 Del F10 Exit ^CH Ln ^CS SymLn CommandLineModeHelp = ^G-STOP ^B/^F-MOVE ^P/^N-HISTORY ^A-BOL ^E-EOL ^O-RESTORE ^X^C-EXIT ^Z-SUSPEND #NormalModeHelp = System: \s Host: \h Machine: \m Date: \d #CommandLineModeHelp = System: \s Host: \h Machine: \m Date: \d [GITPS-Setup] Help = Arrows-MOVE Enter-SIGNALS ^L-REFRESH ^X^C/F10-QUIT ^Xk-KILL RefreshAfterKill = ON # Refresh process list after killing processes [GITVIEW-Setup] Help = Arrows/PgUp/PgDown/Home/End-MOVE ^L-REFRESH ^X^C/F10-QUIT 0-9/a-f/A-F-OFFSET ### ### To ignore a section just comment its name ### [GITFM-FTI] ################################################ ### Thix virtual terminal with color monitor ### ################################################ [GITFM-Color] TitleForeground = CYAN TitleBackground = BLUE TitleBrightness = ON UserName = YELLOW TtyName = YELLOW ClockForeground = BLACK ClockBackground = CYAN ClockBrightness = OFF PanelFrame = WHITE PanelBackground = BLUE PanelThumbForeground = BLACK PanelThumbBackground = WHITE PanelThumbBrightness = OFF PanelSelectedFile = YELLOW PanelSelectedFileBrightness = ON PanelNotSelectedFile = WHITE PanelNotSelectedFileBrightness = ON PanelCurrentSelectedFile = YELLOW PanelCurrentNotSelectedFile = WHITE PanelCurrentFile = CYAN PanelPath = RED PanelPathBrightness = OFF PanelDeviceFreeSpace = RED PanelDeviceFreeSpaceBrightness = OFF PanelFileInfo = RED PanelFileInfoBrightness = OFF PanelFilesInfo = BLACK PanelFilesInfoBrightness = OFF InputLineForeground = WHITE InputLineBackground = BLACK InputLineBrightness = ON InputLineErrorForeground = WHITE InputLineErrorBackground = RED InputLineErrorBrightness = ON StatusBarForeground = BLACK StatusBarBackground = CYAN StatusBarBrightness = OFF StatusBarWarningForeground = BLACK StatusBarWarningBackground = WHITE StatusBarWarningBrightness = OFF StatusBarErrorForeground = WHITE StatusBarErrorBackground = RED StatusBarErrorBrightness = ON [GITPS-Color] TitleForeground = CYAN TitleBackground = BLUE TitleBrightness = ON HeaderForeground = CYAN HeaderBackground = RED HeaderBrightness = ON ScreenForeground = BLACK ScreenBackground = CYAN ScreenBrightness = OFF StatusForeground = CYAN StatusBackground = BLUE StatusBrightness = ON [GITVIEW-Color] TitleForeground = CYAN TitleBackground = BLUE TitleBrightness = ON HeaderForeground = CYAN HeaderBackground = RED HeaderBrightness = ON ScreenForeground = BLACK ScreenBackground = CYAN ScreenBrightness = OFF StatusForeground = CYAN StatusBackground = BLUE StatusBrightness = ON ################################################################ ### Thix virtual terminal with monochrome monitor or b/w tty ### ################################################################ [GITFM-Monochrome] TitleForeground = WHITE TitleBackground = BLACK TitleBrightness = ON UserName = WHITE TtyName = WHITE ClockForeground = BLACK ClockBackground = WHITE ClockBrightness = OFF PanelFrame = WHITE PanelBackground = BLACK PanelThumbForeground = BLACK PanelThumbBackground = WHITE PanelThumbBrightness = OFF PanelSelectedFile = WHITE PanelSelectedFileBrightness = ON PanelNotSelectedFile = WHITE PanelNotSelectedFileBrightness = OFF PanelCurrentSelectedFile = WHITE PanelCurrentNotSelectedFile = BLACK PanelCurrentFile = WHITE PanelPath = BLACK PanelPathBrightness = OFF PanelDeviceFreeSpace = BLACK PanelDeviceFreeSpaceBrightness = OFF PanelFileInfo = BLACK PanelFileInfoBrightness = OFF PanelFilesInfo = BLACK PanelFilesInfoBrightness = OFF InputLineForeground = WHITE InputLineBackground = BLACK InputLineBrightness = ON InputLineErrorForeground = WHITE InputLineErrorBackground = BLACK InputLineErrorBrightness = ON StatusBarForeground = BLACK StatusBarBackground = WHITE StatusBarBrightness = OFF StatusBarWarningForeground = BLACK StatusBarWarningBackground = WHITE StatusBarWarningBrightness = OFF StatusBarErrorForeground = BLACK StatusBarErrorBackground = WHITE StatusBarErrorBrightness = OFF [GITPS-Monochrome] TitleForeground = BLACK TitleBackground = WHITE TitleBrightness = OFF HeaderForeground = WHITE HeaderBackground = BLACK HeaderBrightness = ON ScreenForeground = WHITE ScreenBackground = BLACK ScreenBrightness = OFF StatusForeground = BLACK StatusBackground = WHITE StatusBrightness = OFF [GITVIEW-Monochrome] TitleForeground = BLACK TitleBackground = WHITE TitleBrightness = OFF HeaderForeground = WHITE HeaderBackground = BLACK HeaderBrightness = ON ScreenForeground = WHITE ScreenBackground = BLACK ScreenBrightness = OFF StatusForeground = BLACK StatusBackground = WHITE StatusBrightness = OFF ### ### COMMAND FORMAT: ### key = command name; formatted command; new dir; save screen; pause; hide ### ### DEFAULTS: ### save screen = y ### pause = n ### hide = n ### ### PLEASE READ THE INFO DOCUMENTATION FOR DETAILS ### BRIEF: ### ### FORMAT SPECIFIERS: ### - %s{question,default_answer} ### - %?{confirmation} ### ### - %f file (not directory) ### - %d directory (not file) ### - %l symbolic link ### - %t fifo ### - %z socket ### - %a any type of directory entry (file, directory, link, fifo, socket) ### - %m current entry mode ### - %g current entry group ### - %o current entry owner ### - %p current panel path ### - %b current panel directory name ### - %i current panel selected or current entry ### ### **** For the other panel: ***** ### ### - %F file (not directory) ### - %D directory (not file) ### - %L symbolic link ### - %T fifo ### - %Z socket ### - %A any type of directory entry (file, directory, link, fifo, socket) ### - %M current entry mode ### - %G current entry group ### - %O current entry owner ### - %P the other panel path ### - %B the other panel directory name ### - %I the other panel selected or current entry ### ### For faster startup, try to keep this entries sorted alphabetically, ### at least locally. The order is given by the key sequence. ### ### ### Key sequences starting with characters between ' ' and '~' are IGNORED! ### [GITFM-Keys] ^[[21~ = exit # F10 ^[@k = GITPS; gitps;;n # F11 ^[@l = READ-MAIL; $GNUIT_RMAIL;;n # F12 ### ### Only key sequences starting with characters between ' ' and '~' are ### ALLOWED. ### [GITPS-Keys] ^[[21~ = exit # F10 ### ### Key sequences starting with characters between ' ' and '~' are IGNORED! ### [GITVIEW-Keys] ^[[21~ = exit # F10 gnuit-4.9.5/term/gnuitrc.common.IN0000644000175000017500000013115011146671376013756 00000000000000############################################################################### ### ### ### GNU Interactive Tools @VERSION@ configuration file ### ### Copyright (c) 1993-2000, 2006-2009 Free Software Foundation, Inc. ### ### ### ### This file is part of gnuit. ### ### ### ### gnuit 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 3 of the ### ### License, or (at your option) any later version. ### ### ### ### gnuit 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, see ### ### http://www.gnu.org/licenses/. ### ### ### ############################################################################### ### ### This file contains the command bindings common for all terminal types. ### Don't modify it in order to define a new command for a particular terminal ### type. Use the the file gnuitrc.TERM instead (TERM stands for your terminal ### type, e.g. vt100). Don't copy this file to your home directory, it will ### be ignored. Use .~/gnuitrc.TERM instead. The key bindings in this file can ### be overwritten by the ~/.gnuitrc.TERM key bindings. ### ### ### shell-pattern = [foreground]; [background]; [brightness] ### [GITFM-FTI] *.pgp = BLACK;; *.pgp.[bg]z = BLACK;; *.pgp.bz2 = BLACK;; *.pgp.Z = BLACK;; *.gpg = BLACK;; *.gpg.[bg]z = BLACK;; *.gpg.bz2 = BLACK;; *.gpg.Z = BLACK;; *.gpg.asc = BLACK;; *.gpg.asc.[bg]z = BLACK;; *.gpg.asc.bz2 = BLACK;; *.gpg.asc.Z = BLACK;; *.[chlysp] = GREEN;; ON *.[chlysp].[bg]z = GREEN;; ON *.[chlysp].bz2 = GREEN;; ON *.[chlysp].Z = GREEN;; ON *.cc = GREEN;; ON *.cc.[bg]z = GREEN;; ON *.cc.bz2 = GREEN;; ON *.cc.Z = GREEN;; ON *.cpp = GREEN;; ON *.cpp.[bg]z = GREEN;; ON *.cpp.bz2 = GREEN;; ON *.cpp.Z = GREEN;; ON *.c++ = GREEN;; ON *.c++.[bg]z = GREEN;; ON *.c++.bz2 = GREEN;; ON *.c++.Z = GREEN;; ON *.java = GREEN;; ON *.java.[bg]z = GREEN;; ON *.java.bz2 = GREEN;; ON *.java.Z = GREEN;; ON *.pov = GREEN;; ON *.pov.[bg]z = GREEN;; ON *.pov.bz2 = GREEN;; ON *.pov.Z = GREEN;; ON *.m4 = GREEN;; ON *.m4.[bg]z = GREEN;; ON *.m4.bz2 = GREEN;; ON *.m4.Z = GREEN;; ON *.pl = GREEN;; ON *.pl.[bg]z = GREEN;; ON *.pl.bz2 = GREEN;; ON *.pl.Z = GREEN;; ON *.inc = GREEN;; ON *.inc.[bg]z = GREEN;; ON *.inc.bz2 = GREEN;; ON *.inc.Z = GREEN;; ON *.el = GREEN;; ON *.el.[bg]z = GREEN;; ON *.el.bz2 = GREEN;; ON *.el.Z = GREEN;; ON *.elc = GREEN;; ON *.elc.[bg]z = GREEN;; ON *.elc.bz2 = GREEN;; ON *.elc.Z = GREEN;; ON *.py.[bg]z = GREEN;; ON *.py.bz2 = GREEN;; ON *.py.Z = GREEN;; ON *.idl = GREEN;; ON *.idl.[bg]z = GREEN;; ON *.idl.bz2 = GREEN;; ON *.idl.Z = GREEN;; ON *.in = GREEN;; ON *.in.[bg]z = GREEN;; ON *.in.bz2 = GREEN;; ON *.in.Z = GREEN;; ON *.pas = GREEN;; ON *.pas.[bg]z = GREEN;; ON *.pas.bz2 = GREEN;; ON *.pas.Z = GREEN;; ON *.pm = GREEN;; ON *.pm.[bg]z = GREEN;; ON *.pm.bz2 = GREEN;; ON *.pm.Z = GREEN;; ON *.rb = GREEN;; ON *.rb.[bg]z = GREEN;; ON *.rb.bz2 = GREEN;; ON *.rb.Z = GREEN;; ON *.scm = GREEN;; ON *.scm.[bg]z = GREEN;; ON *.scm.bz2 = GREEN;; ON *.scm.Z = GREEN;; ON *.sql = GREEN;; ON *.sql.[bg]z = GREEN;; ON *.sql.bz2 = GREEN;; ON *.sql.Z = GREEN;; ON *.php = GREEN;; ON *.php.[bg]z = GREEN;; ON *.php.bz2 = GREEN;; ON *.php.Z = GREEN;; ON *.php[0-9] = GREEN;; ON *.php[0-9].[bg]z = GREEN;; ON *.php[0-9].bz2 = GREEN;; ON *.php[0-9].Z = GREEN;; ON *.js = GREEN;; ON *.js.[bg]z = GREEN;; ON *.js.bz2 = GREEN;; ON *.js.Z = GREEN;; ON *.lua = GREEN;; ON *.lua.[bg]z = GREEN;; ON *.lua.bz2 = GREEN;; ON *.lua.Z = GREEN;; ON *.sh = GREEN;; ON *.sh.[bg]z = GREEN;; ON *.sh.bz2 = GREEN;; ON *.sh.Z = GREEN;; ON *,v = CYAN;; ON *,v.[bg]z = CYAN;; ON *,v.bz2 = CYAN;; ON *,v.Z = CYAN;; ON Makefile = CYAN;; ON Makefile.am = GREEN;; ON Makefile.* = CYAN;; ON *.o = BLUE;; ON *.o.[bg]z = BLUE;; ON *.o.bz2 = BLUE;; ON *.o.Z = BLUE;; ON *.lo = BLUE;; ON *.lo.[bg]z = BLUE;; ON *.lo.bz2 = BLUE;; ON *.lo.Z = BLUE;; ON *.la = BLUE;; ON *.la.[bg]z = BLUE;; ON *.la.bz2 = BLUE;; ON *.la.Z = BLUE;; ON *.class = BLUE;; ON *.class.[bg]z = BLUE;; ON *.class.bz2 = BLUE;; ON *.class.Z = BLUE;; ON *.a = BLUE;; ON *.a.[bg]z = BLUE;; ON *.a.bz2 = BLUE;; ON *.a.Z = BLUE;; ON *.sa = BLUE;; ON *.sa.* = BLUE;; ON *.so = BLUE;; ON *.so.[0-9]* = BLUE;; ON *.texi = WHITE;; *.texi.[bg]z = WHITE;; *.texi.bz2 = WHITE;; *.texi.Z = WHITE;; *.texinfo = WHITE;; *.texinfo.[bg]z = WHITE;; *.texinfo.bz2 = WHITE;; *.texinfo.Z = WHITE;; *.info* = WHITE;; *.dir = WHITE;; *.dir.[bg]z = WHITE;; *.dir.bz2 = WHITE;; *.dir.Z = WHITE;; *.man = WHITE;; *.man.[bg]z = WHITE;; *.man.bz2 = WHITE;; *.man.Z = WHITE;; *.ms = WHITE;; *.ms.[bg]z = WHITE;; *.ms.bz2 = WHITE;; *.ms.Z = WHITE;; *.[0-9n] = WHITE;; *.[0-9n].[bg]z = WHITE;; *.[0-9n].bz2 = WHITE;; *.[0-9n].Z = WHITE;; *.[0-9n][xm] = WHITE;; *.[0-9n][xm].[bg]z = WHITE;; *.[0-9n][xm].bz2 = WHITE;; *.[0-9n][xm].Z = WHITE;; *.[0-9n]tk = WHITE;; *.[0-9n]tk.[bg]z = WHITE;; *.[0-9n]tk.bz2 = WHITE;; *.[0-9n]tk.Z = WHITE;; *.[0-9n]tcl = WHITE;; *.[0-9n]tcl.[bg]z = WHITE;; *.[0-9n]tcl.bz2 = WHITE;; *.[0-9n]tcl.Z = WHITE;; *.[0-9n]tclx = WHITE;; *.[0-9n]tclx.[bg]z = WHITE;; *.[0-9n]tclx.bz2 = WHITE;; *.[0-9n]tclx.Z = WHITE;; *.[0-9n]itcl = WHITE;; *.[0-9n]itcl.[bg]z = WHITE;; *.[0-9n]itcl.bz2 = WHITE;; *.[0-9n]itcl.Z = WHITE;; *.[0-9n]blt = WHITE;; *.[0-9n]blt.[bg]z = WHITE;; *.[0-9n]blt.bz2 = WHITE;; *.[0-9n]blt.Z = WHITE;; *.do[ct] = WHITE;; *.do[ct].[bg]z = WHITE;; *.do[ct].bz2 = WHITE;; *.do[ct].Z = WHITE;; *.do[ct][mx] = WHITE;; *.do[ct][mx].[bg]z = WHITE;; *.do[ct][mx].bz2 = WHITE;; *.do[ct][mx].Z = WHITE;; *.pp[st] = WHITE;; *.pp[st].[bg]z = WHITE;; *.pp[st].bz2 = WHITE;; *.pp[st].Z = WHITE;; *.pp[st][mx] = WHITE;; *.pp[st][mx].[bg]z = WHITE;; *.pp[st][mx].bz2 = WHITE;; *.pp[st][mx].Z = WHITE;; *.aw = WHITE;; *.aw.[bg]z = WHITE;; *.aw.bz2 = WHITE;; *.aw.Z = WHITE;; *.lyx = WHITE;; *.lyx.[bg]z = WHITE;; *.lyx.bz2 = WHITE;; *.lyx.Z = WHITE;; *.orig = WHITE;; *.orig.[bg]z = WHITE;; *.orig.bz2 = WHITE;; *.orig.Z = WHITE;; *.txt = WHITE;; *.txt.[bg]z = WHITE;; *.txt.bz2 = WHITE;; *.txt.Z = WHITE;; *.text = WHITE;; *.text.[bg]z = WHITE;; *.text.bz2 = WHITE;; *.text.Z = WHITE;; *.log = WHITE;; *.log.[bg]z = WHITE;; *.log.bz2 = WHITE;; *.log.Z = WHITE;; *.aux = WHITE;; *.aux.[bg]z = WHITE;; *.aux.bz2 = WHITE;; *.aux.Z = WHITE;; *.lsm = WHITE;; *.lsm.[bg]z = WHITE;; *.lsm.bz2 = WHITE;; *.lsm.Z = WHITE;; *.tex = WHITE;; *.tex.[bg]z = WHITE;; *.tex.bz2 = WHITE;; *.tex.Z = WHITE;; *.diff = WHITE;; *.diff.[bg]z = WHITE;; *.diff.bz2 = WHITE;; *.diff.Z = WHITE;; *.html = WHITE;; *.html.[bg]z = WHITE;; *.html.bz2 = WHITE;; *.html.Z = WHITE;; *.shtml = WHITE;; *.shtml.[bg]z = WHITE;; *.shtml.bz2 = WHITE;; *.shtml.Z = WHITE;; *.htm = WHITE;; *.htm.[bg]z = WHITE;; *.htm.bz2 = WHITE;; *.htm.Z = WHITE;; *.xml = WHITE;; *.xml.[bg]z = WHITE;; *.xml.bz2 = WHITE;; *.xml.Z = WHITE;; README* = WHITE;; *.README = WHITE;; *.README.[bg]z = WHITE;; *.README.bz2 = WHITE;; *.README.Z = WHITE;; ChangeLog = WHITE;; ChangeLog.[bg]z = WHITE;; ChangeLog.bz2 = WHITE;; ChangeLog.Z = WHITE;; changelog.Debian.gz = WHITE;; INSTALL* = WHITE;; *NEWS = WHITE;; NEWS* = WHITE;; PLATFORMS = WHITE;; PROBLEMS = WHITE;; TODO* = WHITE;; LSM = WHITE;; TAGS = WHITE;; TAGS. = WHITE;; COPYING = WHITE;; COPYING.[bg]z = WHITE;; COPYING.bz2 = WHITE;; COPYING.Z = WHITE;; [SR]MAIL* = WHITE;; INBOX* = WHITE;; OUTBOX* = WHITE;; *.ans = WHITE;; *.ans.[bg]z = WHITE;; *.ans.bz2 = WHITE;; *.ans.Z = WHITE;; *.asc = WHITE;; *.asc.[bg]z = WHITE;; *.asc.bz2 = WHITE;; *.asc.Z = WHITE;; *.csv = WHITE;; *.csv.[bg]z = WHITE;; *.csv.bz2 = WHITE;; *.csv.Z = WHITE;; *.tsv = WHITE;; *.tsv.[bg]z = WHITE;; *.tsv.bz2 = WHITE;; *.tsv.Z = WHITE;; *.od[bcmstbpgf] = WHITE;; *.od[bcmstbpgf].[bg]z = WHITE;; *.od[bcmstbpgf].bz2 = WHITE;; *.od[bcmstbpgf].Z = WHITE;; *.pod = WHITE;; *.pod.[bg]z = WHITE;; *.pod.bz2 = WHITE;; *.pod.Z = WHITE;; *.po = WHITE;; *.po.[bg]z = WHITE;; *.po.bz2 = WHITE;; *.po.Z = WHITE;; *.rtf = WHITE;; *.rtf.[bg]z = WHITE;; *.rtf.bz2 = WHITE;; *.rtf.Z = WHITE;; *.sqlite = WHITE;; *.sqlite.[bg]z = WHITE;; *.sqlite.bz2 = WHITE;; *.sqlite.Z = WHITE;; *.uof = WHITE;; *.uof.[bg]z = WHITE;; *.uof.bz2 = WHITE;; *.uof.Z = WHITE;; *.wp[5dst] = WHITE;; *.wp[5dst].[bg]z = WHITE;; *.wp[5dst].bz2 = WHITE;; *.wp[5dst].Z = WHITE;; *.wri = WHITE;; *.wri.[bg]z = WHITE;; *.wri.bz2 = WHITE;; *.wri.Z = WHITE;; *.db = WHITE;; *.db.[bg]z = WHITE;; *.db.bz2 = WHITE;; *.db.Z = WHITE;; *.dbf = WHITE;; *.dbf.[bg]z = WHITE;; *.dbf.bz2 = WHITE;; *.dbf.Z = WHITE;; *.mdb = WHITE;; *.mdb.[bg]z = WHITE;; *.mdb.bz2 = WHITE;; *.mdb.Z = WHITE;; *.abw = WHITE;; *.abw.[bg]z = WHITE;; *.abw.bz2 = WHITE;; *.abw.Z = WHITE;; *.xl[cksrtw] = WHITE;; *.xl[cksrtw].[bg]z = WHITE;; *.xl[cksrtw].bz2 = WHITE;; *.xl[cksrtw].Z = WHITE;; *.xl[cksrtw][bmx] = WHITE;; *.xl[cksrtw][bmx].[bg]z = WHITE;; *.xl[cksrtw][bmx].bz2 = WHITE;; *.xl[cksrtw][bmx].Z = WHITE;; *.123 = WHITE;; *.123.[bg]z = WHITE;; *.123.bz2 = WHITE;; *.123.Z = WHITE;; *.602 = WHITE;; *.602.[bg]z = WHITE;; *.602.bz2 = WHITE;; *.602.Z = WHITE;; *.ot = WHITE;; *.ot.[bg]z = WHITE;; *.ot.bz2 = WHITE;; *.ot.Z = WHITE;; *.mml = WHITE;; *.mml.[bg]z = WHITE;; *.mml.bz2 = WHITE;; *.mml.Z = WHITE;; *.wb2 = WHITE;; *.wb2.[bg]z = WHITE;; *.wb2.bz2 = WHITE;; *.wb2.Z = WHITE;; *.wp = WHITE;; *.wp.[bg]z = WHITE;; *.wp.bz2 = WHITE;; *.wp.Z = WHITE;; *.ot[ghpst] = WHITE;; *.ot[ghpst].[bg]z = WHITE;; *.ot[ghpst].bz2 = WHITE;; *.ot[ghpst].Z = WHITE;; *.pot[mx] = WHITE;; *.pot[mx].[bg]z = WHITE;; *.pot[mx].bz2 = WHITE;; *.pot[mx].Z = WHITE;; *.pot = WHITE;; *.pot.[bg]z = WHITE;; *.pot.bz2 = WHITE;; *.pot.Z = WHITE;; *.sd[abcdfsw] = WHITE;; *.sd[abcdfsw].[bg]z = WHITE;; *.sd[abcdfsw].bz2 = WHITE;; *.sd[abcdfsw].Z = WHITE;; *.sg[lk] = WHITE;; *.sg[lk].[bg]z = WHITE;; *.sg[lk].bz2 = WHITE;; *.sg[lk].Z = WHITE;; *.st[cdiw] = WHITE;; *.st[cdiw].[bg]z = WHITE;; *.st[cdiw].bz2 = WHITE;; *.st[cdiw].Z = WHITE;; *.sx[cdgimw] = WHITE;; *.sx[cdgimw].[bg]z = WHITE;; *.sx[cdgimw].bz2 = WHITE;; *.sx[cdgimw].Z = WHITE;; *.chm = WHITE;; *.chm.[bg]z = WHITE;; *.chm.bz2 = WHITE;; *.chm.Z = WHITE;; *.ps = MAGENTA;; ON *.ps.[bg]z = MAGENTA;; ON *.ps.bz2 = MAGENTA;; ON *.ps.Z = MAGENTA;; ON *.eps = MAGENTA;; ON *.eps.[bg]z = MAGENTA;; ON *.eps.bz2 = MAGENTA;; ON *.eps.Z = MAGENTA;; ON *.fig = MAGENTA;; ON *.fig.[bg]z = MAGENTA;; ON *.fig.bz2 = MAGENTA;; ON *.fig.Z = MAGENTA;; ON *.dvi = MAGENTA;; ON *.dvi.[bg]z = MAGENTA;; ON *.dvi.bz2 = MAGENTA;; ON *.dvi.Z = MAGENTA;; ON *.pdf = MAGENTA;; ON *.pdf.[bg]z = MAGENTA;; ON *.pdf.bz2 = MAGENTA;; ON *.pdf.Z = MAGENTA;; ON *.gif = MAGENTA;; ON *.gif.[bg]z = MAGENTA;; ON *.gif.bz2 = MAGENTA;; ON *.gif.Z = MAGENTA;; ON *.jpg = MAGENTA;; ON *.jpg.[bg]z = MAGENTA;; ON *.jpg.bz2 = MAGENTA;; ON *.jpg.Z = MAGENTA;; ON *.jpeg = MAGENTA;; ON *.jpeg.[bg]z = MAGENTA;; ON *.jpeg.bz2 = MAGENTA;; ON *.jpeg.Z = MAGENTA;; ON *.djv = MAGENTA;; ON *.djv.[bg]z = MAGENTA;; ON *.djv.bz2 = MAGENTA;; ON *.djv.Z = MAGENTA;; ON *.tif = MAGENTA;; ON *.tif.[bg]z = MAGENTA;; ON *.tif.bz2 = MAGENTA;; ON *.tif.Z = MAGENTA;; ON *.tiff = MAGENTA;; ON *.tiff.[bg]z = MAGENTA;; ON *.tiff.bz2 = MAGENTA;; ON *.tiff.Z = MAGENTA;; ON *.bmp = MAGENTA;; ON *.bmp.[bg]z = MAGENTA;; ON *.bmp.bz2 = MAGENTA;; ON *.bmp.Z = MAGENTA;; ON *.png = MAGENTA;; ON *.png.[bg]z = MAGENTA;; ON *.png.bz2 = MAGENTA;; ON *.png.Z = MAGENTA;; ON *.pnm = MAGENTA;; ON *.pnm.[bg]z = MAGENTA;; ON *.pnm.bz2 = MAGENTA;; ON *.pnm.Z = MAGENTA;; ON *.ppm = MAGENTA;; ON *.ppm.[bg]z = MAGENTA;; ON *.ppm.bz2 = MAGENTA;; ON *.ppm.Z = MAGENTA;; ON *.pgm = MAGENTA;; ON *.pgm.[bg]z = MAGENTA;; ON *.pgm.bz2 = MAGENTA;; ON *.pgm.Z = MAGENTA;; ON *.pbm = MAGENTA;; ON *.pbm.[bg]z = MAGENTA;; ON *.pbm.bz2 = MAGENTA;; ON *.pbm.Z = MAGENTA;; ON *.xbm = MAGENTA;; ON *.xbm.[bg]z = MAGENTA;; ON *.xbm.bz2 = MAGENTA;; ON *.xbm.Z = MAGENTA;; ON *.xpm = MAGENTA;; ON *.xpm.[bg]z = MAGENTA;; ON *.xpm.bz2 = MAGENTA;; ON *.xpm.Z = MAGENTA;; ON *.fit = MAGENTA;; ON *.fit.[bg]z = MAGENTA;; ON *.fit.bz2 = MAGENTA;; ON *.fit.Z = MAGENTA;; ON *.icon = MAGENTA;; ON *.icon.[bg]z = MAGENTA;; ON *.icon.bz2 = MAGENTA;; ON *.icon.Z = MAGENTA;; ON *.cursor = MAGENTA;; ON *.cursor.[bg]z = MAGENTA;; ON *.cursor.bz2 = MAGENTA;; ON *.cursor.Z = MAGENTA;; ON *.ras = MAGENTA;; ON *.ras.[bg]z = MAGENTA;; ON *.ras.bz2 = MAGENTA;; ON *.ras.Z = MAGENTA;; ON *.tga = MAGENTA;; ON *.tga.[bg]z = MAGENTA;; ON *.tga.bz2 = MAGENTA;; ON *.tga.Z = MAGENTA;; ON *.xcf = MAGENTA;; ON *.xcf.[bg]z = MAGENTA;; ON *.xcf.bz2 = MAGENTA;; ON *.xcf.Z = MAGENTA;; ON *.pr = MAGENTA;; ON *.pr.[bg]z = MAGENTA;; ON *.pr.bz2 = MAGENTA;; ON *.pr.Z = MAGENTA;; ON *.rgb = MAGENTA;; ON *.rgb.[bg]z = MAGENTA;; ON *.rgb.bz2 = MAGENTA;; ON *.rgb.Z = MAGENTA;; ON *.fts = MAGENTA;; ON *.fts.[bg]z = MAGENTA;; ON *.fts.bz2 = MAGENTA;; ON *.fts.Z = MAGENTA;; ON *.ai = MAGENTA;; ON *.ai.[bg]z = MAGENTA;; ON *.ai.bz2 = MAGENTA;; ON *.ai.Z = MAGENTA;; ON *.arw = MAGENTA;; ON *.arw.[bg]z = MAGENTA;; ON *.arw.bz2 = MAGENTA;; ON *.arw.Z = MAGENTA;; ON *.bw = MAGENTA;; ON *.bw.[bg]z = MAGENTA;; ON *.bw.bz2 = MAGENTA;; ON *.bw.Z = MAGENTA;; ON *.cdr = MAGENTA;; ON *.cdr.[bg]z = MAGENTA;; ON *.cdr.bz2 = MAGENTA;; ON *.cdr.Z = MAGENTA;; ON *.cgm = MAGENTA;; ON *.cgm.[bg]z = MAGENTA;; ON *.cgm.bz2 = MAGENTA;; ON *.cgm.Z = MAGENTA;; ON *.cmx = MAGENTA;; ON *.cmx.[bg]z = MAGENTA;; ON *.cmx.bz2 = MAGENTA;; ON *.cmx.Z = MAGENTA;; ON *.cr2 = MAGENTA;; ON *.cr2.[bg]z = MAGENTA;; ON *.cr2.bz2 = MAGENTA;; ON *.cr2.Z = MAGENTA;; ON *.crw = MAGENTA;; ON *.crw.[bg]z = MAGENTA;; ON *.crw.bz2 = MAGENTA;; ON *.crw.Z = MAGENTA;; ON *.dcr = MAGENTA;; ON *.dcr.[bg]z = MAGENTA;; ON *.dcr.bz2 = MAGENTA;; ON *.dcr.Z = MAGENTA;; ON *.dib = MAGENTA;; ON *.dib.[bg]z = MAGENTA;; ON *.dib.bz2 = MAGENTA;; ON *.dib.Z = MAGENTA;; ON *.djvu = MAGENTA;; ON *.djvu.[bg]z = MAGENTA;; ON *.djvu.bz2 = MAGENTA;; ON *.djvu.Z = MAGENTA;; ON *.dng = MAGENTA;; ON *.dng.[bg]z = MAGENTA;; ON *.dng.bz2 = MAGENTA;; ON *.dng.Z = MAGENTA;; ON *.dxf = MAGENTA;; ON *.dxf.[bg]z = MAGENTA;; ON *.dxf.bz2 = MAGENTA;; ON *.dxf.Z = MAGENTA;; ON *.emf = MAGENTA;; ON *.emf.[bg]z = MAGENTA;; ON *.emf.bz2 = MAGENTA;; ON *.emf.Z = MAGENTA;; ON *.icns = MAGENTA;; ON *.icns.[bg]z = MAGENTA;; ON *.icns.bz2 = MAGENTA;; ON *.icns.Z = MAGENTA;; ON *.ico = MAGENTA;; ON *.ico.[bg]z = MAGENTA;; ON *.ico.bz2 = MAGENTA;; ON *.ico.Z = MAGENTA;; ON *.int = MAGENTA;; ON *.int.[bg]z = MAGENTA;; ON *.int.bz2 = MAGENTA;; ON *.int.Z = MAGENTA;; ON *.jng = MAGENTA;; ON *.jng.[bg]z = MAGENTA;; ON *.jng.bz2 = MAGENTA;; ON *.jng.Z = MAGENTA;; ON *.jp2 = MAGENTA;; ON *.jp2.[bg]z = MAGENTA;; ON *.jp2.bz2 = MAGENTA;; ON *.jp2.Z = MAGENTA;; ON *.k25 = MAGENTA;; ON *.k25.[bg]z = MAGENTA;; ON *.k25.bz2 = MAGENTA;; ON *.k25.Z = MAGENTA;; ON *.kdc = MAGENTA;; ON *.kdc.[bg]z = MAGENTA;; ON *.kdc.bz2 = MAGENTA;; ON *.kdc.Z = MAGENTA;; ON *.mef = MAGENTA;; ON *.mef.[bg]z = MAGENTA;; ON *.mef.bz2 = MAGENTA;; ON *.mef.Z = MAGENTA;; ON *.mos = MAGENTA;; ON *.mos.[bg]z = MAGENTA;; ON *.mos.bz2 = MAGENTA;; ON *.mos.Z = MAGENTA;; ON *.mrw = MAGENTA;; ON *.mrw.[bg]z = MAGENTA;; ON *.mrw.bz2 = MAGENTA;; ON *.mrw.Z = MAGENTA;; ON *.nef = MAGENTA;; ON *.nef.[bg]z = MAGENTA;; ON *.nef.bz2 = MAGENTA;; ON *.nef.Z = MAGENTA;; ON *.orf = MAGENTA;; ON *.orf.[bg]z = MAGENTA;; ON *.orf.bz2 = MAGENTA;; ON *.orf.Z = MAGENTA;; ON *.ota = MAGENTA;; ON *.ota.[bg]z = MAGENTA;; ON *.ota.bz2 = MAGENTA;; ON *.ota.Z = MAGENTA;; ON *.pc[ftx] = MAGENTA;; ON *.pc[ftx].[bg]z = MAGENTA;; ON *.pc[ftx].bz2 = MAGENTA;; ON *.pc[ftx].Z = MAGENTA;; ON *.pdd = MAGENTA;; ON *.pdd.[bg]z = MAGENTA;; ON *.pdd.bz2 = MAGENTA;; ON *.pdd.Z = MAGENTA;; ON *.pef = MAGENTA;; ON *.pef.[bg]z = MAGENTA;; ON *.pef.bz2 = MAGENTA;; ON *.pef.Z = MAGENTA;; ON *.pict = MAGENTA;; ON *.pict.[bg]z = MAGENTA;; ON *.pict.bz2 = MAGENTA;; ON *.pict.Z = MAGENTA;; ON *.ps[bdp] = MAGENTA;; ON *.ps[bdp].[bg]z = MAGENTA;; ON *.ps[bdp].bz2 = MAGENTA;; ON *.ps[bdp].Z = MAGENTA;; ON *.raf = MAGENTA;; ON *.raf.[bg]z = MAGENTA;; ON *.raf.bz2 = MAGENTA;; ON *.raf.Z = MAGENTA;; ON *.sgi = MAGENTA;; ON *.sgi.[bg]z = MAGENTA;; ON *.sgi.bz2 = MAGENTA;; ON *.sgi.Z = MAGENTA;; ON *.sr2 = MAGENTA;; ON *.sr2.[bg]z = MAGENTA;; ON *.sr2.bz2 = MAGENTA;; ON *.sr2.Z = MAGENTA;; ON *.srf = MAGENTA;; ON *.srf.[bg]z = MAGENTA;; ON *.srf.bz2 = MAGENTA;; ON *.srf.Z = MAGENTA;; ON *.svg = MAGENTA;; ON *.svg.[bg]z = MAGENTA;; ON *.svg.bz2 = MAGENTA;; ON *.svg.Z = MAGENTA;; ON *.tif = MAGENTA;; ON *.tif.[bg]z = MAGENTA;; ON *.tif.bz2 = MAGENTA;; ON *.tif.Z = MAGENTA;; ON *.wmf = MAGENTA;; ON *.wmf.[bg]z = MAGENTA;; ON *.wmf.bz2 = MAGENTA;; ON *.wmf.Z = MAGENTA;; ON *.xpm = MAGENTA;; ON *.xpm.[bg]z = MAGENTA;; ON *.xpm.bz2 = MAGENTA;; ON *.xpm.Z = MAGENTA;; ON *.ani = MAGENTA;; ON *.ani.[bg]z = MAGENTA;; ON *.ani.bz2 = MAGENTA;; ON *.ani.Z = MAGENTA;; ON *.cur = MAGENTA;; ON *.cur.[bg]z = MAGENTA;; ON *.cur.bz2 = MAGENTA;; ON *.cur.Z = MAGENTA;; ON *.pam = MAGENTA;; ON *.pam.[bg]z = MAGENTA;; ON *.pam.bz2 = MAGENTA;; ON *.pam.Z = MAGENTA;; ON *.g3 = MAGENTA;; ON *.g3.[bg]z = MAGENTA;; ON *.g3.bz2 = MAGENTA;; ON *.g3.Z = MAGENTA;; ON *.mov = BLACK;; *.mov.[bg]z = BLACK;; *.mov.bz2 = BLACK;; *.mov.Z = BLACK;; *.mp[4g] = BLACK;; *.mp[4g].[bg]z = BLACK;; *.mp[4g].bz2 = BLACK;; *.mp[4g].Z = BLACK;; *.mpeg = BLACK;; *.mpeg.[bg]z = BLACK;; *.mpeg.bz2 = BLACK;; *.mpeg.Z = BLACK;; *.avi = BLACK;; *.avi.[bg]z = BLACK;; *.avi.bz2 = BLACK;; *.avi.Z = BLACK;; *.fli = BLACK;; *.fli.[bg]z = BLACK;; *.fli.bz2 = BLACK;; *.fli.Z = BLACK;; *.flc = BLACK;; *.flc.[bg]z = BLACK;; *.flc.bz2 = BLACK;; *.flc.Z = BLACK;; *.3gp = BLACK;; *.3gp.[bg]z = BLACK;; *.3gp.bz2 = BLACK;; *.3gp.Z = BLACK;; *.cam = BLACK;; *.cam.[bg]z = BLACK;; *.cam.bz2 = BLACK;; *.cam.Z = BLACK;; *.dat = BLACK;; *.dat.[bg]z = BLACK;; *.dat.bz2 = BLACK;; *.dat.Z = BLACK;; *.divx = BLACK;; *.divx.[bg]z = BLACK;; *.divx.bz2 = BLACK;; *.divx.Z = BLACK;; *.flv = BLACK;; *.flv.[bg]z = BLACK;; *.flv.bz2 = BLACK;; *.flv.Z = BLACK;; *.mkv = BLACK;; *.mkv.[bg]z = BLACK;; *.mkv.bz2 = BLACK;; *.mkv.Z = BLACK;; *.ogm = BLACK;; *.ogm.[bg]z = BLACK;; *.ogm.bz2 = BLACK;; *.ogm.Z = BLACK;; *.swf = BLACK;; *.swf.[bg]z = BLACK;; *.swf.bz2 = BLACK;; *.swf.Z = BLACK;; *.wmv = BLACK;; *.wmv.[bg]z = BLACK;; *.wmv.bz2 = BLACK;; *.wmv.Z = BLACK;; *.au = CYAN;; ON *.au.[bg]z = CYAN;; ON *.au.bz2 = CYAN;; ON *.au.Z = CYAN;; ON *.mp[23] = CYAN;; ON *.mp[23].[bg]z = CYAN;; ON *.mp[23].bz2 = CYAN;; ON *.mp[23].Z = CYAN;; ON *.ra = CYAN;; ON *.ra.[bg]z = CYAN;; ON *.ra.bz2 = CYAN;; ON *.ra.Z = CYAN;; ON *.ram = CYAN;; ON *.ram.[bg]z = CYAN;; ON *.ram.bz2 = CYAN;; ON *.ram.Z = CYAN;; ON *.mod = CYAN;; ON *.mod.[bg]z = CYAN;; ON *.mod.bz2 = CYAN;; ON *.mod.Z = CYAN;; ON *.mtm = CYAN;; ON *.mtm.[bg]z = CYAN;; ON *.mtm.bz2 = CYAN;; ON *.mtm.Z = CYAN;; ON *.xm = CYAN;; ON *.xm.[bg]z = CYAN;; ON *.xm.bz2 = CYAN;; ON *.xm.Z = CYAN;; ON *.mid = CYAN;; ON *.mid.[bg]z = CYAN;; ON *.mid.bz2 = CYAN;; ON *.mid.Z = CYAN;; ON *.midi = CYAN;; ON *.midi.[bg]z = CYAN;; ON *.midi.bz2 = CYAN;; ON *.midi.Z = CYAN;; ON *.s3m = CYAN;; ON *.s3m.[bg]z = CYAN;; ON *.s3m.bz2 = CYAN;; ON *.s3m.Z = CYAN;; ON *.voc = CYAN;; ON *.voc.[bg]z = CYAN;; ON *.voc.bz2 = CYAN;; ON *.voc.Z = CYAN;; ON *.aiff = CYAN;; ON *.aiff.[bg]z = CYAN;; ON *.aiff.bz2 = CYAN;; ON *.aiff.Z = CYAN;; ON *.aifc = CYAN;; ON *.aifc.[bg]z = CYAN;; ON *.aifc.bz2 = CYAN;; ON *.aifc.Z = CYAN;; ON *.wav = CYAN;; ON *.wav.[bg]z = CYAN;; ON *.wav.bz2 = CYAN;; ON *.wav.Z = CYAN;; ON *.rmd = CYAN;; ON *.rmd.[bg]z = CYAN;; ON *.rmd.bz2 = CYAN;; ON *.rmd.Z = CYAN;; ON *.pvf = CYAN;; ON *.pvf.[bg]z = CYAN;; ON *.pvf.bz2 = CYAN;; ON *.pvf.Z = CYAN;; ON *.wma = CYAN;; ON *.wma.[bg]z = CYAN;; ON *.wma.bz2 = CYAN;; ON *.wma.Z = CYAN;; ON *.m4a = CYAN;; ON *.m4a.[bg]z = CYAN;; ON *.m4a.bz2 = CYAN;; ON *.m4a.Z = CYAN;; ON *.cdda = CYAN;; ON *.cdda.[bg]z = CYAN;; ON *.cdda.bz2 = CYAN;; ON *.cdda.Z = CYAN;; ON *.flac = CYAN;; ON *.flac.[bg]z = CYAN;; ON *.flac.bz2 = CYAN;; ON *.flac.Z = CYAN;; ON *.pac = CYAN;; ON *.pac.[bg]z = CYAN;; ON *.pac.bz2 = CYAN;; ON *.pac.Z = CYAN;; ON *.ape = CYAN;; ON *.ape.[bg]z = CYAN;; ON *.ape.bz2 = CYAN;; ON *.ape.Z = CYAN;; ON *.rka = CYAN;; ON *.rka.[bg]z = CYAN;; ON *.rka.bz2 = CYAN;; ON *.rka.Z = CYAN;; ON *.shn = CYAN;; ON *.shn.[bg]z = CYAN;; ON *.shn.bz2 = CYAN;; ON *.shn.Z = CYAN;; ON *.tta = CYAN;; ON *.tta.[bg]z = CYAN;; ON *.tta.bz2 = CYAN;; ON *.tta.Z = CYAN;; ON *.wv = CYAN;; ON *.wv.[bg]z = CYAN;; ON *.wv.bz2 = CYAN;; ON *.wv.Z = CYAN;; ON *.ogg = CYAN;; ON *.ogg.[bg]z = CYAN;; ON *.ogg.bz2 = CYAN;; ON *.ogg.Z = CYAN;; ON *.gsm = CYAN;; ON *.gsm.[bg]z = CYAN;; ON *.gsm.bz2 = CYAN;; ON *.gsm.Z = CYAN;; ON *.aac = CYAN;; ON *.aac.[bg]z = CYAN;; ON *.aac.bz2 = CYAN;; ON *.aac.Z = CYAN;; ON *.mpc = CYAN;; ON *.mpc.[bg]z = CYAN;; ON *.mpc.bz2 = CYAN;; ON *.mpc.Z = CYAN;; ON *.vqf = CYAN;; ON *.vqf.[bg]z = CYAN;; ON *.vqf.bz2 = CYAN;; ON *.vqf.Z = CYAN;; ON *.ots = CYAN;; ON *.ots.[bg]z = CYAN;; ON *.ots.bz2 = CYAN;; ON *.ots.Z = CYAN;; ON *.swa = CYAN;; ON *.swa.[bg]z = CYAN;; ON *.swa.bz2 = CYAN;; ON *.swa.Z = CYAN;; ON *.vox = CYAN;; ON *.vox.[bg]z = CYAN;; ON *.vox.bz2 = CYAN;; ON *.vox.Z = CYAN;; ON *.dwd = CYAN;; ON *.dwd.[bg]z = CYAN;; ON *.dwd.bz2 = CYAN;; ON *.dwd.Z = CYAN;; ON *.smp = CYAN;; ON *.smp.[bg]z = CYAN;; ON *.smp.bz2 = CYAN;; ON *.smp.Z = CYAN;; ON *.mus = CYAN;; ON *.mus.[bg]z = CYAN;; ON *.mus.bz2 = CYAN;; ON *.mus.Z = CYAN;; ON *.sib = CYAN;; ON *.sib.[bg]z = CYAN;; ON *.sib.bz2 = CYAN;; ON *.sib.Z = CYAN;; ON *.gym = CYAN;; ON *.gym.[bg]z = CYAN;; ON *.gym.bz2 = CYAN;; ON *.gym.Z = CYAN;; ON *.vgm = CYAN;; ON *.vgm.[bg]z = CYAN;; ON *.vgm.bz2 = CYAN;; ON *.vgm.Z = CYAN;; ON *.psf = CYAN;; ON *.psf.[bg]z = CYAN;; ON *.psf.bz2 = CYAN;; ON *.psf.Z = CYAN;; ON *.nsf = CYAN;; ON *.nsf.[bg]z = CYAN;; ON *.nsf.bz2 = CYAN;; ON *.nsf.Z = CYAN;; ON *.it = CYAN;; ON *.it.[bg]z = CYAN;; ON *.it.bz2 = CYAN;; ON *.it.Z = CYAN;; ON *.mt2 = CYAN;; ON *.mt2.[bg]z = CYAN;; ON *.mt2.bz2 = CYAN;; ON *.mt2.Z = CYAN;; ON *.mng = CYAN;; ON *.mng.[bg]z = CYAN;; ON *.mng.bz2 = CYAN;; ON *.mng.Z = CYAN;; ON *.rmj = CYAN;; ON *.rmj.[bg]z = CYAN;; ON *.rmj.bz2 = CYAN;; ON *.rmj.Z = CYAN;; ON *.spc = CYAN;; ON *.spc.[bg]z = CYAN;; ON *.spc.bz2 = CYAN;; ON *.spc.Z = CYAN;; ON *.niff = CYAN;; ON *.niff.[bg]z = CYAN;; ON *.niff.bz2 = CYAN;; ON *.niff.Z = CYAN;; ON *.ym = CYAN;; ON *.ym.[bg]z = CYAN;; ON *.ym.bz2 = CYAN;; ON *.ym.Z = CYAN;; ON *.jam = CYAN;; ON *.jam.[bg]z = CYAN;; ON *.jam.bz2 = CYAN;; ON *.jam.Z = CYAN;; ON *.asf = CYAN;; ON *.asf.[bg]z = CYAN;; ON *.asf.bz2 = CYAN;; ON *.asf.Z = CYAN;; ON *.asx = CYAN;; ON *.asx.[bg]z = CYAN;; ON *.asx.bz2 = CYAN;; ON *.asx.Z = CYAN;; ON *.m3u = CYAN;; ON *.m3u.[bg]z = CYAN;; ON *.m3u.bz2 = CYAN;; ON *.m3u.Z = CYAN;; ON *.pls = CYAN;; ON *.pls.[bg]z = CYAN;; ON *.pls.bz2 = CYAN;; ON *.pls.Z = CYAN;; ON *.xspf = CYAN;; ON *.xspf.[bg]z = CYAN;; ON *.xspf.bz2 = CYAN;; ON *.xspf.Z = CYAN;; ON *.zpl = CYAN;; ON *.zpl.[bg]z = CYAN;; ON *.zpl.bz2 = CYAN;; ON *.zpl.Z = CYAN;; ON *.sf2 = CYAN;; ON *.sf2.[bg]z = CYAN;; ON *.sf2.bz2 = CYAN;; ON *.sf2.Z = CYAN;; ON *.sfx = CYAN;; ON *.sfx.[bg]z = CYAN;; ON *.sfx.bz2 = CYAN;; ON *.sfx.Z = CYAN;; ON *.sbk = CYAN;; ON *.sbk.[bg]z = CYAN;; ON *.sbk.bz2 = CYAN;; ON *.sbk.Z = CYAN;; ON *.nst = CYAN;; ON *.nst.[bg]z = CYAN;; ON *.nst.bz2 = CYAN;; ON *.nst.Z = CYAN;; ON *.stx = CYAN;; ON *.stx.[bg]z = CYAN;; ON *.stx.bz2 = CYAN;; ON *.stx.Z = CYAN;; ON *.ptm = CYAN;; ON *.ptm.[bg]z = CYAN;; ON *.ptm.bz2 = CYAN;; ON *.ptm.Z = CYAN;; ON *.okt = CYAN;; ON *.okt.[bg]z = CYAN;; ON *.okt.bz2 = CYAN;; ON *.okt.Z = CYAN;; ON *.wow = CYAN;; ON *.wow.[bg]z = CYAN;; ON *.wow.bz2 = CYAN;; ON *.wow.Z = CYAN;; ON *.mdl = CYAN;; ON *.mdl.[bg]z = CYAN;; ON *.mdl.bz2 = CYAN;; ON *.mdl.Z = CYAN;; ON *.alm = CYAN;; ON *.alm.[bg]z = CYAN;; ON *.alm.bz2 = CYAN;; ON *.alm.Z = CYAN;; ON *.669 = CYAN;; ON *.669.[bg]z = CYAN;; ON *.669.bz2 = CYAN;; ON *.669.Z = CYAN;; ON *.dsm = CYAN;; ON *.dsm.[bg]z = CYAN;; ON *.dsm.bz2 = CYAN;; ON *.dsm.Z = CYAN;; ON *.far = CYAN;; ON *.far.[bg]z = CYAN;; ON *.far.bz2 = CYAN;; ON *.far.Z = CYAN;; ON *.med = CYAN;; ON *.med.[bg]z = CYAN;; ON *.med.bz2 = CYAN;; ON *.med.Z = CYAN;; ON *.ult = CYAN;; ON *.ult.[bg]z = CYAN;; ON *.ult.bz2 = CYAN;; ON *.ult.Z = CYAN;; ON *.stm = CYAN;; ON *.stm.[bg]z = CYAN;; ON *.stm.bz2 = CYAN;; ON *.stm.Z = CYAN;; ON *.tar.[bg]z = RED;; ON *.tar.bz2 = RED;; ON *.tar.Z = RED;; ON *.tgZ = RED;; ON *.ta[rZ] = RED;; ON *.trZ = RED;; ON *.[bg]z = RED;; ON *.bz2 = RED;; ON *.Z = RED;; ON *.zip = RED;; ON *.cbz = RED;; ON *.jar = RED;; ON *.arj = RED;; ON *.a[0-9][1-9] = RED;; ON *.rar = RED;; ON *.cbr = RED;; ON *.r[0-9][0-9] = RED;; ON *.shar = RED;; ON *.uu = RED;; ON *.rpm = RED;; ON *.deb = RED;; ON *.7z = RED;; ON *.ace = RED;; ON *.arc = RED;; ON *.bkf = RED;; ON *.cab = RED;; ON *.dmg = RED;; ON *.gho = RED;; ON *.gho.[bg]z = RED;; ON *.gho.bz2 = RED;; ON *.gho.Z = RED;; ON *.lha = RED;; ON *.lzh = RED;; ON *.pak = RED;; ON *.sit = RED;; ON *.zoo = RED;; ON *.iso = RED;; ON *.iso.[bg]z = RED;; ON *.iso.bz2 = RED;; ON *.iso.Z = RED;; ON *.nrg = RED;; ON *.nrg.[bg]z = RED;; ON *.nrg.bz2 = RED;; ON *.nrg.Z = RED;; ON *.adf = RED;; ON *.adf.[bg]z = RED;; ON *.adf.bz2 = RED;; ON *.adf.Z = RED;; ON *.adz = RED;; ON *.cbt = RED;; ON *.cbt.[bg]z = RED;; ON *.cbt.bz2 = RED;; ON *.cbt.Z = RED;; ON *.cpio = RED;; ON *.cpio.[bg]z = RED;; ON *.cpio.bz2 = RED;; ON *.cpio.Z = RED;; ON .* = CYAN;; ### ### COMMAND FORMAT: ### key = command name; formatted command; new dir; save screen; pause; hide ### ### DEFAULTS: ### save screen = y ### pause = n ### hide = n ### ### PLEASE READ THE INFO DOCUMENTATION FOR DETAILS ### BRIEF: ### ### FORMAT SPECIFIERS: ### - %s{question,default_answer} ### - %?{confirmation} ### ### - %f file (not directory) ### - %d directory (not file) ### - %l symbolic link ### - %t fifo ### - %z socket ### - %a any type of directory entry (file, directory, link, fifo, socket) ### - %m current entry mode ### - %g current entry group ### - %o current entry owner ### - %p current panel path ### - %b current panel directory name ### - %i current panel selected or current entry ### ### **** For the other panel: ***** ### ### - %F file (not directory) ### - %D directory (not file) ### - %L symbolic link ### - %T fifo ### - %Z socket ### - %A any type of directory entry (file, directory, link, fifo, socket) ### - %M current entry mode ### - %G current entry group ### - %O current entry owner ### - %P the other panel path ### - %B the other panel directory name ### - %I the other panel selected or current entry ### ### For faster startup, try to keep this entries sorted alphabetically, ### at least locally. The order is given by the key sequence. ### ### ### Key sequences starting with characters between ' ' and '~' are IGNORED! ### [GITFM-Keys] UP = previous-line DOWN = next-line RIGHT = forward-char LEFT = backward-char HOME = beginning-of-panel END = end-of-panel INS = select-entry DEL = delete-char PGUP = scroll-down PGDOWN = scroll-up F1 = INFO; info %s{Info documentation: ,} F2 = FILE-ACTION; gitaction %p %f F3 = VIEW; gitview %f;;n F4 = EDIT; $GNUIT_EDITOR %f;;n F5 = copy F6 = move F7 = make-directory F8 = delete F9 = MAKE; make %s{Options: ,-k };;;y F10 = exit ^[1 = INFO; info %s{Info documentation: ,} ^[2 = FILE-ACTION; gitaction %p %f ^[3 = VIEW; gitview %f;;n ^[4 = EDIT; $GNUIT_EDITOR %f;;n ^[5 = copy ^[6 = move ^[7 = make-directory ^[8 = delete ^[9 = MAKE; make %s{Options: ,-k };;;y ^[0 = exit ^A = beginning-of-line ^B = backward-char ^D = delete-char ^E = end-of-line ^F = forward-char ^H = backward-delete-char ^I = other-panel ^J = action ^K = kill-to-end-of-line ^L = refresh ^M = action ^N = next-line ^O = tty-mode ^P = previous-line ^R = isearch-backward ^S = isearch-forward ^T = select-entry ^U = kill-to-beginning-of-line ^V = scroll-up ^W = kill-region ^Ccq = quick-compare-panels ^Cct = thorough-compare-panels ^CD = delete ^CbD = B-DELETE; %?{Delete selected entries? } rm -r -f %i&;;;;y ^CZ = UNCOMPRESS; gzip -rd -- %i;;;;y ^CbfZ = BF-UNCOMPRESS; gzip -rdf -- %i&;;;;y ^CfZ = F-UNCOMPRESS; gzip -rdf -- %i;;;;y ^CbZ = B-UNCOMPRESS; gzip -rd -- %i&;;;;y ^Cbz = B-COMPRESS; gzip -r9 -- %i&;;;;y ^Cnd = name-downcase ^Cnu = name-upcase ^Cz = COMPRESS; gzip -r9 -- %i;;;;y ^C. = BZIP2-COMPRESS; bzip2 -9 --repetitive-best %i;;;;y ^Cb. = B-BZIP2-COMPRESS; bzip2 -9 --repetitive-best %i&;;;;y ^Co = BZIP2-UNCOMPRESS; bunzip2 %i;;;;y ^Cbo = B-BZIP2-UNCOMPRESS; bunzip2 %i&;;;;y ^C- = TAR-BZIP2; tar -cf - %d | bzip2 -9 --repetitive-best > %d.tar.bz2;;;;y ^Cb- = B-TAR-BZIP2; tar -cf - %d | bzip2 -9 --repetitive-best > %d.tar.bz2&;;;;y ^CE = UUDECODE; uudecode %f;;;;y ^CbE = B-UUDECODE; uudecode %f&;;;;y ^Cbe = B-UUENCODE; uuencode %f %f > %f.uu&;;;;y ^Ce = UUENCODE; uuencode %f %f > %f.uu;;;;y ^Ck = MIME-PACK; mpack -s %s{Subject (required): ,[%f]} -o %f.mime %f;;;;y ^Cbk = B-MIME-PACK; mpack -s %s{Subject (required): ,[%f]} -o %f.mime %f&;;;;y ^CbK = B-MIME-UNPACK; munpack %f&;;;;y ^CK = MIME-UNPACK; munpack %f;;;;y ^CI = RPM-INSTALL; rpm -ivh -- %i;;;y ^CbI = B-RPM-INSTALL; rpm -i -- %i&;;;;y ^Ci = RPM-UNINSTALL; rpm -e -- `echo %i | sed -e 's/.i386.rpm//g' -e 's/.i486.rpm//g' -e 's/.i586.rpm//g' -e 's/.i686.rpm//g' -e 's/.sparc.rpm//g' -e 's/.alpha.rpm//g' -e 's/.ppc.rpm//g' -e 's/.axp.rpm//g' -e 's/.mips.rpm//g' -e 's/.mipsel.rpm//g' -e 's/.noarch.rpm//g' -e 's/.src.rpm//g'`;;;;y ^Cbi = B-RPM-UNINSTALL; rpm -e -- `echo %i | sed -e 's/.i386.rpm//g' -e 's/.i486.rpm//g' -e 's/.i586.rpm//g' -e 's/.i686.rpm//g' -e 's/.sparc.rpm//g' -e 's/.alpha.rpm//g' -e 's/.ppc.rpm//g' -e 's/.axp.rpm//g' -e 's/.mips.rpm//g' -e 's/.mipsel.rpm//g' -e 's/.noarch.rpm//g' -e 's/.src.rpm//g'&;;;;y ^Cj = PRINTER-JOB; lpr %s{`lpr' options: ,} %i;;;;y ^CJ = PRINTER-JOB-LIST; lpq %s{`lpq' options: ,} | $GNUIT_PAGER;;;y ^Cq = RPM-QUERY; rpm %s{,-qil } | $GNUIT_PAGER;;;y ^CN = RPM-UPGRADE; rpm -Uvh -- %i;;;y ^CbN = B-RPM-UPGRADE; rpm -U -- %i&;;;;y ^Ca = TAR; tar -cf %b.tar %i;;;;y ^Cba = B-TAR; tar -cf %b.tar %i&;;;;y ^CX = GENERIC-UNPACK; gitunpack . %i;;;;y ^CbX = B-GENERIC-UNPACK; gitunpack . %i&;;;;y ^CV = GENERIC-UNPACK-INTO; gitunpack %s{Unpack into directory: ,.} %i;;;;y ^CbV = B-GENERIC-UNPACK-INTO; gitunpack %s{Unpack into directory: ,.} %i&;;;;y ^Cbx = B-TAR-COMPRESS; tar -cf - %d | gzip -9c > %d.tar.gz&;;;;y ^Cx = TAR-COMPRESS; tar -cf - %d | gzip -9c > %d.tar.gz;;;;y ^CC = copy ^CbC = B-COPY; cp -r -f %i %s{Copying %i to: ,%P/}&;;;;y ^CT = move ^CbT = B-MOVE; mv -f %i %s{Moving %i to: ,%P/}&;;;;y ^CH = LINK; ln %p/%a %s{Making a hard link from %a to: ,%P/};;;;y ^CbH = B-LINK; ln %p/%a %s{Making a hard link from %a to: ,%P/}&;;;;y ^CS = SYMLINK; ln -s %p/%a %s{Making a symbolic link from %a to: ,%P/};;;;y ^CbS = B-SYMLINK; ln -s %p/%a %s{Making a symbolic link from %a to: ,%P/}&;;;;y ^CR = RENAME; mv %a %s{New file name: ,%a};;;;y ^CbR = B-RENAME; mv %a %s{New file name: ,%a}&;;;;y ^Cmd = MTOOLS-CHDIR; mcd %s{New directory: ,a:};;;;y ^Cm^D = MTOOLS-CHDIR; mcd %s{New directory: ,a:};;;;y ^CmP = MTOOLS-PUT; mcopy -- %i %s{Destination: ,a:};;;;y ^CbmP = B-MTOOLS-PUT; mcopy -- %i %s{Destination: ,a:}&;;;;y ^CmG = MTOOLS-GET; mcopy -- %s{Source files: ,a:} %s{Destination: ,.};;;;y ^CbmG = B-MTOOLS-GET; mcopy -- %s{Source files: ,a:} %s{Destination: ,.}&;;;;y ^CmD = MTOOLS-DELETE; mdel %s{Files: ,a:};;;;y ^CbmD = B-MTOOLS-DELETE; mdel %s{Files: ,a:}&;;;;y ^CmL = MTOOLS-DIR; mdir %s{Directory: ,a:} | $GNUIT_PAGER;;;y ^CmF = MTOOLS-FORMAT; mformat %s{Floppy: ,a:} %?{Are you sure? };;;;y ^CbmF = B-MTOOLS-FORMAT; mformat %s{Floppy: ,a:} %?{Are you sure? }&;;;;y ^CmM = MTOOLS-MKDIR; mmd -- %s{Directory: ,a:};;;;y ^CbmM = B-MTOOLS-MKDIR; mmd -- %s{Directory: ,a:}&;;;;y ^CmK = MTOOLS-RMDIR; mdeltree %s{Directory: ,a:} %?{Are you sure? };;;;y ^CbmK = B-MTOOLS-RMDIR; mdeltree %s{Directory: ,a:} %?{Are you sure? }&;;;;y ^CmR = MTOOLS-RENAME; mmove -- %s{Source files: ,a:} %s{Destination: ,a:};;;;y ^CbmR = B-MTOOLS-RENAME; mmove -- %s{Source files: ,a:} %s{Destination: ,a:}&;;;;y ^CmT = MTOOLS-TYPE; mtype -- %s{File: ,a:} | $GNUIT_PAGER;;;y ^CM = CHMOD; chmod %s{New mode of %i: ,%m} %i;;;;y ^CbM = B-CHMOD; chmod %s{New mode of %i: ,%m} %i&;;;;y ^CbrM = B-R-CHMOD; chmod -R %s{New mode of %i: ,%m} %i&;;;;y ^CrM = R-CHMOD; chmod -R %s{New mode of %i: ,%m} %i;;;;y ^CO = CHOWN; chown %s{New owner of %i: ,} %i;;;;y ^CbO = B-CHOWN; chown %s{New owner of %i: ,} %i&;;;;y ^CbrO = B-R-CHOWN; chown -R %s{New owner of %i: ,} %i&;;;;y ^CrO = R-CHOWN; chown -R %s{New owner of %i: ,} %i;;;;y ^CG = CHGRP; chgrp %s{New group of %i: ,} %i;;;;y ^CbG = B-CHGRP; chgrp %s{New group of %i: ,} %i&;;;;y ^CbrG = B-R-CHGRP; chgrp -R %s{New group of %i: ,} %i&;;;;y ^CrG = R-CHGRP; chgrp -R %s{New group of %i: ,} %i;;;;y ^Cfd = FAST-DIFF; diff -r -q %a %P/%A | $GNUIT_PAGER;;;y ^C= = DIFF; diff -r %a %P/%A | $GNUIT_PAGER;;;y ^C^[= = LAST-BACKUP-DIFF; diff -u %f %f~ | $GNUIT_PAGER;;;y ^Cd = DIR-DIFF; diff -rc2P %d %P/%D > %s{Patch file: ,%d-%D.diff};;;;y ^Cbd = B-DIRR-DIFF; diff -rc2P %d %P/%D > %s{Patch file:, %d-%D.diff}&;;;y ^CB = compare ^Cs = select-files-matching-pattern ^Ct = FILE-TYPE; (file %a 1>&2 && exit 1);;;;y ^Cu = unselect-files-matching-pattern ^C2a = ASCII-MAIL; cat %i | mail %s{To: ,};;;;y ^Cb2a = B-ASCII-MAIL; cat %i | mail %s{To: ,}&;;;;y ^C2b = BINARY-MAIL; uuencode %f %f | mail %s{To: ,};;;;y ^Cb2b = B-BINARY-MAIL; uuencode %f %f | mail %s{To: ,}&;;;;y ^C2m = MIME-MAIL; mpack -s %s{Subject (required): ,[%f]} %f %s{To: ,};;;;y ^Cb2m = B-MIME-MAIL; mpack -s %s{Subject (required): ,[%f]} %f %s{To: ,}&;;;;y ^CP = DECRYPT; pgp -- %f;;;y ^Cp = ENCRYPT; pgp -esa -- %f;;;y ^CU = DIRECTORY-USAGE; (du -sk %d 1>&2 && exit 1);;;;y ^CW = WIPE; %?{Wiping selected files? } gitwipe %i;;;;y ^C~ = bin-packing ^C/ = SPLIT; split -b %s{Size of output files (n[bkm]): ,} %f %s{Prefix: ,x};;;;y ^Cb/ = B-SPLIT; split -b %s{Size of output files (n[bkm]): ,} %f %s{Prefix: ,x}&;;;;y ^C^DA = DPKG-RECORDAVAIL; dpkg -A %i;;;y ^C^DC = DPKG-CONFIGURE; dpkg --configure `gitdpkgname %i`;;;y ^C^DI = DPKG-INFO; dpkg -I %f | $GNUIT_PAGER ^C^DL = DPKG-LISTFILES; dpkg -L `gitdpkgname %i` | $GNUIT_PAGER ^C^DP = DPKG-PURGE; dpkg -P `gitdpkgname %i`;;;y ^C^DRA = R-DPKG-RECORDAVAIL; dpkg -R -A %i;;;y ^C^DRi = R-DPKG-INSTALL; dpkg -R -i %i;;;y ^C^DRu = R-DPKG-UNPACK; dpkg -R --unpack %i;;;y ^C^DS = DPKG-SEARCH; dpkg -S %p/%f;;;y ^C^Dc = DPKG-CONTENTS; dpkg -c %f | $GNUIT_PAGER ^C^Df = DPKG-FIELD; dpkg -f %f %s{Fields (Press Enter for all): ,} | $GNUIT_PAGER ^C^Dh = DPKG-HELP; $GNUIT_PAGER /usr/share/gnuit/dpkg-help.txt ^C^Di = DPKG-INSTALL; dpkg -i %i;;;y ^C^Dl = DPKG-LISTPKGS; dpkg -l `gitdpkgname %i` | $GNUIT_PAGER ^C^Dp = DPKG-PRINTAVAIL; dpkg -p `gitdpkgname %i` | $GNUIT_PAGER ^C^Dr = DPKG-REMOVE; dpkg -r `gitdpkgname %i`;;;y ^C^Ds = DPKG-STATUS; dpkg -s `gitdpkgname %i` | $GNUIT_PAGER ^C^Du = DPKG-UNPACK; dpkg --unpack %i;;;y ^X0 = enlarge-other-panel ^X1 = enlarge-panel ^X2 = two-panels ^X\ = select-entry ^X^A = apropos ^Xa = FILE-ACTION; gitaction %p %f ^X^C = exit ^Xc = exit ^X^D = change-directory ^Xd = change-directory ^XE = ENV; env | $GNUIT_PAGER;;;y ^Xe = MULTIPLE-EDIT; $GNUIT_EDITOR %i;;n ^X^F = FILE-CREATE; $GNUIT_EDITOR %s{File name: ,} ^X^I = selected-entries-to-input-line ^X^L = TTY-RESET; reset ^X^N = next-directory ^X^P = previous-directory ^X^R = reset-directory-history ^X^X = exchange-point-and-mark ^XG = RECURSIVE-GREP; gitrgrep %s{Search: ,} '%s{Files to be searched: ,*}' | $GNUIT_PAGER;;;y ^Xg = GREP; grep %s{Search: ,} %i | $GNUIT_PAGER;;;y ^Xh = HTML; "$GNUIT_BROWSER" @htmldir@/gnuit.html;;n ^XH = XHOST; xhost %s{Hosts: ,+ };;;;y ^XI = ISPELL; ispell %f;;n ^Xi = INFO; info %s{Info documentation: ,} ^Xk = KILL; kill %s{Signal number: ,-9} %s{Processes: ,};;;;y ^Xbm = MAKE; make %s{Options: ,-k }&;;;y ^XM = make-directory ^Xm = MAKE; make %s{Options: ,-k };;;y ^Xo = other-panel ^XP = set-scroll-step ^Xp = lock ^Xq = MAN; man %s{Manual page: ,} ^Xr = isearch-backward ^XS = SYNC; sync&;;;;y ^Xs = isearch-forward ^Xt = switch-panels ^XT = DATE; (date 1>&2 && exit 1);;;;y ^Xv = MULTIPLE-VIEW; $GNUIT_PAGER %i;;;y ^Xw = WHEREIS; (whereis %s{Program name: ,} 1>&2 && exit 1);;;;y ^Xz = SUB-SHELL; $GNUIT_SHELL ^XW = WHICH; (which %s{Program name: ,} 1>&2 && exit 1);;;;y ^X4a = CHANGE-LOG; $GNUIT_EDITOR ChangeLog;;n ^[xrm = READ-MAIL; $GNUIT_RMAIL;;n ^Y = yank ^[+ = select-extension ^[- = unselect-extension ^_ = backward-delete-char ^[^_ = backward-kill-word ^[^H = backward-kill-word ^] = panel-enable-next-mode ^[] = panel-enable-next-mode ^\ = select-entry ^[\ = delete-horizontal-space ^[^@ = just-one-space ^$ = set-mark ^[% = FIND; find . -name '%s{File pattern: ,}' -print | $GNUIT_PAGER;;;y ^[$ = FIND-ACTION; find . -name '%s{File pattern: ,}' %s{Action: ,-exec } | $GNUIT_PAGER;;;y ^[& = LOCATE; locate -- '%s{File pattern: ,}' | $GNUIT_PAGER;;;y ^[ac = adapt-current-directory ^[ao = adapt-other-directory ^[b = backward-word ^[c = capitalize-word ^[d = kill-word ^[f = forward-word ^[g = horizontal-scroll-left ^[h = HOME-DIR;;~;;;y ^[i = INCLUDE-DIR;;/usr/include;;;y ^[j = horizontal-scroll-right ^[k = kill-line ^[l = downcase-word ^[n = next-history-element ^[o = tty-mode ^[p = previous-history-element ^[/ = ROOT-DIR;;/;;;y ^[. = up-one-dir ^[v = scroll-down ^[w = kill-ring-save ^[< = beginning-of-panel ^[> = end-of-panel ^[^[1 = FIRST-FLOPPY-DIR;;/mnt/fd0;;;y ^[^[2 = SECOND-FLOPPY-DIR;;/mnt/fd1;;;y ^[^M = entry-to-input-line ^[^[^M = other-path-to-input-line ^[ma = MOUNT-A; gitmount fd0;/mnt/fd0;;;y ^[mb = MOUNT-B; gitmount fd1;/mnt/fd1;;;y ^[mc = MOUNT-CDROM; gitmount cdrom;/mnt/cdrom;;;y ^[mf = MOUNT-FLOPPY; gitmount fd0;/mnt/floppy;;;y ^[mz = MOUNT-ZIP; gitmount zip;/mnt/zip;;;y ^[mj = MOUNT-JAZ; gitmount jaz;/mnt/jaz;;;y ^[mt = MOUNT-THESE; gitmount %i;;;;y ^[ra = UMOUNT-A; umount /dev/fd0;;;;y ^[rb = UMOUNT-B; umount /dev/fd1;;;;y ^[rc = UMOUNT-CDROM; umount /dev/cdrom;;;;y ^[rf = UMOUNT-FLOPPY; umount /dev/floppy;;;;y ^[rz = UMOUNT-ZIP; umount /dev/zip;;;;y ^[rj = UMOUNT-JAZ; umount /dev/jaz;;;;y ^[rt = UMOUNT-THESE; umount %i;;;;y ^[u = upcase-word ^[ea = panel-enable-all ^[ed = panel-enable-date-time ^[ef = panel-enable-full-name ^[em = panel-enable-mode ^[eo = panel-enable-owner-group ^[es = panel-enable-size ^[eS = panel-enable-abbrevsize ^[sd = panel-sort-by-date ^[se = panel-sort-by-extension ^[sm = panel-sort-by-mode ^[sn = panel-sort-by-name ^[ss = panel-sort-by-size ^[su = panel-sort-next-method ^[sgi = panel-sort-by-group-id ^[sgn = panel-sort-by-group-name ^[soi = panel-sort-by-owner-id ^[son = panel-sort-by-owner-name ^[Sf = FINGER; finger 00 %s{Server name: ,@} | $GNUIT_PAGER;;;y ^[Sm = MOUNTED-FILE-SYSTEMS; mount | $GNUIT_PAGER;;;y ^[Sq = QUOTA; quota -v;;;y ^[Ss = DISK-FREE-SPACE; df | $GNUIT_PAGER;;;y ^[Su = USERS; (users 1>&2 && exit 1);;;;y ^[Sv = VIRTUAL-MEMORY-STATUS; $GNUIT_VMSTAT;;;y ^[Sw = WHO; w | $GNUIT_PAGER;;;y ^[PA = PS; ps -a | $GNUIT_PAGER;;;y ^[PB = PS; ps -f | $GNUIT_PAGER;;;y ^[PC = PS; ps -ef | $GNUIT_PAGER;;;y ^[PE = PS; ps -e | $GNUIT_PAGER;;;y ^[PL = PS; ps -aux | $GNUIT_PAGER;;;y ^[PU = PS; ps -ux | $GNUIT_PAGER;;;y ^[PX = PS; ps -x | $GNUIT_PAGER;;;y ^[PY = PS; ps -ax | $GNUIT_PAGER;;;y ^[PT = PSTREE; pstree | $GNUIT_PAGER;;;y ^[Pa = GITPS; gitps -p -a;;n ^[Pb = GITPS; gitps -p -f;;n ^[Pc = GITPS; gitps -p -ef;;n ^[Pe = GITPS; gitps -p -e;;n ^[Pl = GITPS; gitps -p -aux;;n ^[Pu = GITPS; gitps -p -ux;;n ^[Px = GITPS; gitps -p -x;;n ^[Py = GITPS; gitps -p -ax;;n ### ### Only key sequences starting with characters between ' ' and '~' are ### ALLOWED. ### [GITPS-Keys] UP = previous-line DOWN = next-line RIGHT = scroll-up LEFT = scroll-down PGUP = scroll-down PGDOWN = scroll-up HOME = beginning-of-list END = end-of-list ^H = scroll-down ^J = next-signal ^L = refresh ^M = next-signal ^N = next-line ^P = previous-line ^[< = beginning-of-list ^[> = end-of-list ^[v = scroll-down ^V = scroll-up ^@ = scroll-up ^[g = horizontal-scroll-left ^[j = horizontal-scroll-right A = SIGALRM B = SIGBUS C = SIGCHLD E = SIGEMT F = SIGFPE H = SIGHUP I = SIGILL K = SIGKILL P = SIGPIPE Q = SIGQUIT S = SIGSEGV T = SIGTERM U = SIGURG V = SIGVTALRM W = SIGWINCH X = SIGXCPU 1 = SIGHUP 2 = SIGINT 3 = SIGQUIT 4 = SIGILL 5 = SIGTRAP 6 = SIGABRT 7 = SIGBUS 8 = SIGFPE 9 = SIGKILL 0 = SIGUSR1 ^X1 = SIGSEGV ^X2 = SIGUSR2 ^X3 = SIGPIPE ^X4 = SIGALRM ^X5 = SIGTERM ^X6 = SIGSTKFLT ^X7 = SIGCHLD ^X8 = SIGCONT ^X9 = SIGSTOP ^X0 = SIGTSTP ^C1 = SIGTTIN ^C2 = SIGTTOU ^C3 = SIGURG ^C4 = SIGXCPU ^C5 = SIGXFSZ ^C6 = SIGVTALRM ^C7 = SIGPROF ^C8 = SIGWINCH ^C9 = SIGIO ^C0 = SIGPWR ^XK = kill-process ^Xk = kill-process ^X^K = kill-process ^X^C = exit F10 = exit q = exit ### ### Key sequences starting with characters between ' ' and '~' are IGNORED! ### [GITVIEW-Keys] UP = previous-line DOWN = next-line RIGHT = scroll-up LEFT = scroll-down PGUP = scroll-down PGDOWN = scroll-up HOME = beginning-of-file END = end-of-file ^H = backspace ^J = action ^L = refresh ^M = action ^N = next-line ^P = previous-line ^[< = beginning-of-file ^[> = end-of-file ^[v = scroll-down ^V = scroll-up ^X^C = exit ^_ = backspace F10 = exit gnuit-4.9.5/term/gnuitrc.hpterm.in0000644000175000017500000002214011146671376014063 00000000000000############################################################################### ### ### ### GNU Interactive Tools @VERSION@ configuration file ### ### Copyright (c) 1993-2000, 2006-2007 Free Software Foundation, Inc. ### ### ### ### This file is part of gnuit. ### ### ### ### gnuit 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 3 of the ### ### License, or (at your option) any later version. ### ### ### ### gnuit 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, see ### ### http://www.gnu.org/licenses/. ### ### ### ############################################################################### ### ### hpterm configuration file (HP-UX X window system terminal emulator). ### ### ### If your terminal supports the standard ANSI color sequences, set ### AnsiColors to ON ([GITxxx-Color] descriptions will be used). If it ### doesn't, AnsiColors should be OFF ([GITxxx-Monochrome] descriptions ### will be used instead). ### [Setup] AnsiColors = OFF # empty means OFF UseLastScreenChar = OFF # don't use the last character on the screen StartupScrollStep = # empty means half the number of lines ### ### WARNING: empty lines are considered to be end of sections! ### [GITFM-Setup] StartupFileDisplayMode = Size # OwnerGroup, DateTime, Size, AbbrevSize, Mode or FullName StartupFileSortMethod = Name # Name, Extension, Size, Date, Mode, OwnerId, GroupId, OwnerName or GroupName MaxUnscaledDigits = 9 GroupDigits = ON ConfirmOnExit = # empty means OFF HistoryFile = ~/.githistory InfoDisplay = ON LeadingDotMatch = ON # OFF means that leading '.' is matched only explicitly TypeSensitivity = ON # Automatically set to OFF when AnsiColors is OFF NormalModeHelp = F3 View F4 Edit F5 Copy F6 Move F7 MkDir F8 Del F10 Exit ^CH Ln ^CS SymLn CommandLineModeHelp = ^G-STOP ^B/^F-MOVE ^P/^N-HISTORY ^A-BOL ^E-EOL ^O-RESTORE ^X^C-EXIT ^Z-SUSPEND #NormalModeHelp = System: \s Host: \h Machine: \m Date: \d #CommandLineModeHelp = System: \s Host: \h Machine: \m Date: \d [GITPS-Setup] Help = Arrows-MOVE Enter-SIGNALS ^L-REFRESH ^X^C/F10-QUIT ^Xk-KILL RefreshAfterKill = ON # Refresh process list after killing processes [GITVIEW-Setup] Help = Arrows/PgUp/PgDown/Home/End-MOVE ^L-REFRESH ^X^C/F10-QUIT 0-9/a-f/A-F-OFFSET ### ### To ignore a section just comment its name ### [GITFM-FTI] ############################### #### Color hpterm (if any) #### ############################### [GITFM-Color] TitleForeground = CYAN TitleBackground = BLACK TitleBrightness = OFF UserName = RED TtyName = RED ClockForeground = BLACK ClockBackground = CYAN ClockBrightness = OFF PanelFrame = WHITE PanelBackground = BLACK PanelThumbForeground = BLACK PanelThumbBackground = WHITE PanelThumbBrightness = OFF PanelSelectedFile = YELLOW PanelSelectedFileBrightness = OFF PanelNotSelectedFile = WHITE PanelNotSelectedFileBrightness = OFF PanelCurrentSelectedFile = YELLOW PanelCurrentNotSelectedFile = WHITE PanelCurrentFile = BLUE PanelPath = RED PanelPathBrightness = OFF PanelDeviceFreeSpace = RED PanelDeviceFreeSpaceBrightness = OFF PanelFileInfo = RED PanelFileInfoBrightness = OFF PanelFilesInfo = BLACK PanelFilesInfoBrightness = OFF InputLineForeground = WHITE InputLineBackground = BLACK InputLineBrightness = OFF InputLineErrorForeground = WHITE InputLineErrorBackground = RED InputLineErrorBrightness = OFF StatusBarForeground = BLACK StatusBarBackground = CYAN StatusBarBrightness = OFF StatusBarWarningForeground = BLACK StatusBarWarningBackground = WHITE StatusBarWarningBrightness = OFF StatusBarErrorForeground = WHITE StatusBarErrorBackground = RED StatusBarErrorBrightness = OFF [GITPS-Color] TitleForeground = CYAN TitleBackground = BLUE TitleBrightness = OFF HeaderForeground = CYAN HeaderBackground = RED HeaderBrightness = OFF ScreenForeground = BLACK ScreenBackground = CYAN ScreenBrightness = OFF StatusForeground = CYAN StatusBackground = BLUE StatusBrightness = OFF [GITVIEW-Color] TitleForeground = CYAN TitleBackground = BLUE TitleBrightness = ON HeaderForeground = CYAN HeaderBackground = RED HeaderBrightness = ON ScreenForeground = BLACK ScreenBackground = CYAN ScreenBrightness = OFF StatusForeground = CYAN StatusBackground = BLUE StatusBrightness = ON ######################### ### monochrome hpterm ### ######################### [GITFM-Monochrome] TitleForeground = WHITE TitleBackground = BLACK TitleBrightness = ON UserName = WHITE TtyName = WHITE ClockForeground = BLACK ClockBackground = WHITE ClockBrightness = OFF PanelFrame = WHITE PanelBackground = BLACK PanelThumbForeground = BLACK PanelThumbBackground = WHITE PanelThumbBrightness = OFF PanelSelectedFile = WHITE PanelSelectedFileBrightness = ON PanelNotSelectedFile = WHITE PanelNotSelectedFileBrightness = OFF PanelCurrentSelectedFile = WHITE PanelCurrentNotSelectedFile = BLACK PanelCurrentFile = WHITE PanelPath = BLACK PanelPathBrightness = OFF PanelDeviceFreeSpace = BLACK PanelDeviceFreeSpaceBrightness = OFF PanelFileInfo = BLACK PanelFileInfoBrightness = OFF PanelFilesInfo = BLACK PanelFilesInfoBrightness = OFF InputLineForeground = WHITE InputLineBackground = BLACK InputLineBrightness = ON InputLineErrorForeground = WHITE InputLineErrorBackground = BLACK InputLineErrorBrightness = ON StatusBarForeground = BLACK StatusBarBackground = WHITE StatusBarBrightness = OFF StatusBarWarningForeground = BLACK StatusBarWarningBackground = WHITE StatusBarWarningBrightness = OFF StatusBarErrorForeground = BLACK StatusBarErrorBackground = WHITE StatusBarErrorBrightness = OFF [GITPS-Monochrome] TitleForeground = BLACK TitleBackground = WHITE TitleBrightness = OFF HeaderForeground = WHITE HeaderBackground = BLACK HeaderBrightness = ON ScreenForeground = WHITE ScreenBackground = BLACK ScreenBrightness = OFF StatusForeground = BLACK StatusBackground = WHITE StatusBrightness = OFF [GITVIEW-Monochrome] TitleForeground = BLACK TitleBackground = WHITE TitleBrightness = OFF HeaderForeground = WHITE HeaderBackground = BLACK HeaderBrightness = ON ScreenForeground = WHITE ScreenBackground = BLACK ScreenBrightness = OFF StatusForeground = BLACK StatusBackground = WHITE StatusBrightness = OFF ### ### COMMAND FORMAT: ### key = command name; formatted command; new dir; save screen; pause; hide ### ### DEFAULTS: ### save screen = y ### pause = n ### hide = n ### ### PLEASE READ THE INFO DOCUMENTATION FOR DETAILS ### BRIEF: ### ### FORMAT SPECIFIERS: ### - %s{question,default_answer} ### - %?{confirmation} ### ### - %f file (not directory) ### - %d directory (not file) ### - %l symbolic link ### - %t fifo ### - %z socket ### - %a any type of directory entry (file, directory, link, fifo, socket) ### - %m current entry mode ### - %g current entry group ### - %o current entry owner ### - %p current panel path ### - %b current panel directory name ### - %i current panel selected or current entry ### ### **** For the other panel: ***** ### ### - %F file (not directory) ### - %D directory (not file) ### - %L symbolic link ### - %T fifo ### - %Z socket ### - %A any type of directory entry (file, directory, link, fifo, socket) ### - %M current entry mode ### - %G current entry group ### - %O current entry owner ### - %P the other panel path ### - %B the other panel directory name ### - %I the other panel selected or current entry ### ### For faster startup, try to keep this entries sorted alphabetically, ### at least locally. The order is given by the key sequence. ### ### ### Key sequences starting with characters between ' ' and '~' are IGNORED! ### ### ### Most of these will never work since they contain prefixes denoting ### other (in use) key sequences. Sorry. ### [GITFM-Keys] ^[p^M = INFO; info %s{Info documentation: ,} ^[q^M = FILE-ACTION; gitaction %p %f ^[r^M = VIEW; gitview %f;;n ^[s^M = EDIT; $GNUIT_EDITOR %f;;n ^[t^M = copy ^[u^M = move ^[v^M = make-directory ^[w^M = delete ### ### Only key sequences starting with characters between ' ' and '~' are ### ALLOWED. ### [GITPS-Keys] ### ### Key sequences starting with characters between ' ' and '~' are IGNORED! ### [GITVIEW-Keys] gnuit-4.9.5/term/gnuitrc.aixterm.in0000644000175000017500000004764211146671376014253 00000000000000############################################################################### ### ### ### GNU Interactive Tools @VERSION@ configuration file ### ### Copyright (c) 1993-2000, 2006-2007 Free Software Foundation, Inc. ### ### ### ### This file is part of gnuit. ### ### ### ### gnuit 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 3 of the ### ### License, or (at your option) any later version. ### ### ### ### gnuit 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, see ### ### http://www.gnu.org/licenses/. ### ### ### ############################################################################### ### ### aixterm configuration file. ### ### ### aixterm terminal emulators usually support color sequences so ### AnsiColors is ON here. ### [Setup] AnsiColors = ON # empty means OFF UseLastScreenChar = OFF # use the last character on the screen StartupScrollStep = # empty means half the number of lines ### ### WARNING: empty lines are considered to be end of sections! ### [GITFM-Setup] StartupFileDisplayMode = Size # OwnerGroup, DateTime, Size, AbbrevSize, Mode or FullName StartupFileSortMethod = Name # Name, Extension, Size, Date, Mode, OwnerId, GroupId, OwnerName or GroupName MaxUnscaledDigits = 9 GroupDigits = ON ConfirmOnExit = # empty means OFF HistoryFile = ~/.githistory InfoDisplay = ON LeadingDotMatch = ON # OFF means that leading '.' is matched only explicitly TypeSensitivity = ON # Automatically set to OFF when AnsiColors is OFF NormalModeHelp = F3 View F4 Edit F5 Copy F6 Move F7 MkDir F8 Del F10 Exit ^CH Ln ^CS SymLn CommandLineModeHelp = ^G-STOP ^B/^F-MOVE ^P/^N-HISTORY ^A-BOL ^E-EOL ^O-RESTORE ^X^C-EXIT ^Z-SUSPEND #NormalModeHelp = System: \s Host: \h Machine: \m Date: \d #CommandLineModeHelp = System: \s Host: \h Machine: \m Date: \d [GITPS-Setup] Help = Arrows-MOVE Enter-SIGNALS ^L-REFRESH ^X^C/F10-QUIT ^Xk-KILL RefreshAfterKill = ON # Refresh process list after killing processes [GITVIEW-Setup] Help = Arrows/PgUp/PgDown/Home/End-MOVE ^L-REFRESH ^X^C/F10-QUIT 0-9/a-f/A-F-OFFSET ### ### To ignore a section just comment its name ### ### ### shell-pattern = [foreground]; [background]; [brightness] ### [GITFM-FTI] *.[chlysp] = GREEN;; ON *.[chlysp].[bg]z = GREEN;; ON *.[chlysp].bz2 = GREEN;; ON *.[chlysp].Z = GREEN;; ON *.cc = GREEN;; ON *.cc.[bg]z = GREEN;; ON *.cc.bz2 = GREEN;; ON *.cc.Z = GREEN;; ON *.cpp = GREEN;; ON *.cpp.[bg]z = GREEN;; ON *.cpp.bz2 = GREEN;; ON *.cpp.Z = GREEN;; ON *.c++ = GREEN;; ON *.c++.[bg]z = GREEN;; ON *.c++.bz2 = GREEN;; ON *.c++.Z = GREEN;; ON *.java = GREEN;; ON *.java.[bg]z = GREEN;; ON *.java.bz2 = GREEN;; ON *.java.Z = GREEN;; ON *.pov = GREEN;; ON *.pov.[bg]z = GREEN;; ON *.pov.bz2 = GREEN;; ON *.pov.Z = GREEN;; ON *.m4 = GREEN;; ON *.m4.[bg]z = GREEN;; ON *.m4.bz2 = GREEN;; ON *.m4.Z = GREEN;; ON *.pl = GREEN;; ON *.pl.[bg]z = GREEN;; ON *.pl.bz2 = GREEN;; ON *.pl.Z = GREEN;; ON *.inc = GREEN;; ON *.inc.[bg]z = GREEN;; ON *.inc.bz2 = GREEN;; ON *.inc.Z = GREEN;; ON *.el = GREEN;; ON *.el.[bg]z = GREEN;; ON *.el.bz2 = GREEN;; ON *.el.Z = GREEN;; ON *.elc = GREEN;; ON *.elc.[bg]z = GREEN;; ON *.elc.bz2 = GREEN;; ON *.elc.Z = GREEN;; ON *.py.[bg]z = GREEN;; ON *.py.bz2 = GREEN;; ON *.py.Z = GREEN;; ON *.idl = GREEN;; ON *.idl.[bg]z = GREEN;; ON *.idl.bz2 = GREEN;; ON *.idl.Z = GREEN;; ON *.in = GREEN;; ON *.in.[bg]z = GREEN;; ON *.in.bz2 = GREEN;; ON *.in.Z = GREEN;; ON *.pas = GREEN;; ON *.pas.[bg]z = GREEN;; ON *.pas.bz2 = GREEN;; ON *.pas.Z = GREEN;; ON *.pm = GREEN;; ON *.pm.[bg]z = GREEN;; ON *.pm.bz2 = GREEN;; ON *.pm.Z = GREEN;; ON *,v = CYAN;; ON *,v.[bg]z = CYAN;; ON *,v.bz2 = CYAN;; ON *,v.Z = CYAN;; ON Makefile = CYAN;; ON Makefile.am = GREEN;; ON Makefile.* = CYAN;; ON *.o = BLUE;; ON *.o.[bg]z = BLUE;; ON *.o.bz2 = BLUE;; ON *.o.Z = BLUE;; ON *.lo = BLUE;; ON *.lo.[bg]z = BLUE;; ON *.lo.bz2 = BLUE;; ON *.lo.Z = BLUE;; ON *.la = BLUE;; ON *.la.[bg]z = BLUE;; ON *.la.bz2 = BLUE;; ON *.la.Z = BLUE;; ON *.class = BLUE;; ON *.class.[bg]z = BLUE;; ON *.class.bz2 = BLUE;; ON *.class.Z = BLUE;; ON *.a = BLUE;; ON *.a.[bg]z = BLUE;; ON *.a.bz2 = BLUE;; ON *.a.Z = BLUE;; ON *.sa = BLUE;; ON *.sa.* = BLUE;; ON *.so = BLUE;; ON *.so.[0-9]* = BLUE;; ON *.texi = WHITE;; *.texi.[bg]z = WHITE;; *.texi.bz2 = WHITE;; *.texi.Z = WHITE;; *.texinfo = WHITE;; *.texinfo.[bg]z = WHITE;; *.texinfo.bz2 = WHITE;; *.texinfo.Z = WHITE;; *.info* = WHITE;; *.dir = WHITE;; *.dir.[bg]z = WHITE;; *.dir.bz2 = WHITE;; *.dir.Z = WHITE;; *.man = WHITE;; *.man.[bg]z = WHITE;; *.man.bz2 = WHITE;; *.man.Z = WHITE;; *.ms = WHITE;; *.ms.[bg]z = WHITE;; *.ms.bz2 = WHITE;; *.ms.Z = WHITE;; *.[0-9n] = WHITE;; *.[0-9n].[bg]z = WHITE;; *.[0-9n].bz2 = WHITE;; *.[0-9n].Z = WHITE;; *.[0-9n][xm] = WHITE;; *.[0-9n][xm].[bg]z = WHITE;; *.[0-9n][xm].bz2 = WHITE;; *.[0-9n][xm].Z = WHITE;; *.[0-9n]tk = WHITE;; *.[0-9n]tk.[bg]z = WHITE;; *.[0-9n]tk.bz2 = WHITE;; *.[0-9n]tk.Z = WHITE;; *.[0-9n]tcl = WHITE;; *.[0-9n]tcl.[bg]z = WHITE;; *.[0-9n]tcl.bz2 = WHITE;; *.[0-9n]tcl.Z = WHITE;; *.[0-9n]tclx = WHITE;; *.[0-9n]tclx.[bg]z = WHITE;; *.[0-9n]tclx.bz2 = WHITE;; *.[0-9n]tclx.Z = WHITE;; *.[0-9n]itcl = WHITE;; *.[0-9n]itcl.[bg]z = WHITE;; *.[0-9n]itcl.bz2 = WHITE;; *.[0-9n]itcl.Z = WHITE;; *.[0-9n]blt = WHITE;; *.[0-9n]blt.[bg]z = WHITE;; *.[0-9n]blt.bz2 = WHITE;; *.[0-9n]blt.Z = WHITE;; *.doc = WHITE;; *.doc.[bg]z = WHITE;; *.doc.bz2 = WHITE;; *.doc.Z = WHITE;; *.ppt = WHITE;; *.ppt.[bg]z = WHITE;; *.ppt.bz2 = WHITE;; *.ppt.Z = WHITE;; *.aw = WHITE;; *.aw.[bg]z = WHITE;; *.aw.bz2 = WHITE;; *.aw.Z = WHITE;; *.lyx = WHITE;; *.lyx.[bg]z = WHITE;; *.lyx.bz2 = WHITE;; *.lyx.Z = WHITE;; *.orig = WHITE;; *.orig.[bg]z = WHITE;; *.orig.bz2 = WHITE;; *.orig.Z = WHITE;; *.txt = WHITE;; *.txt.[bg]z = WHITE;; *.txt.bz2 = WHITE;; *.txt.Z = WHITE;; *.text = WHITE;; *.text.[bg]z = WHITE;; *.text.bz2 = WHITE;; *.text.Z = WHITE;; *.log = WHITE;; *.log.[bg]z = WHITE;; *.log.bz2 = WHITE;; *.log.Z = WHITE;; *.aux = WHITE;; *.aux.[bg]z = WHITE;; *.aux.bz2 = WHITE;; *.aux.Z = WHITE;; *.lsm = WHITE;; *.lsm.[bg]z = WHITE;; *.lsm.bz2 = WHITE;; *.lsm.Z = WHITE;; *.tex = WHITE;; *.tex.[bg]z = WHITE;; *.tex.bz2 = WHITE;; *.tex.Z = WHITE;; *.diff = WHITE;; *.diff.[bg]z = WHITE;; *.diff.bz2 = WHITE;; *.diff.Z = WHITE;; *.html = WHITE;; *.html.[bg]z = WHITE;; *.html.bz2 = WHITE;; *.html.Z = WHITE;; *.htm = WHITE;; *.htm.[bg]z = WHITE;; *.htm.bz2 = WHITE;; *.htm.Z = WHITE;; README* = WHITE;; *.README = WHITE;; *.README.[bg]z = WHITE;; *.README.bz2 = WHITE;; *.README.Z = WHITE;; ChangeLog = WHITE;; ChangeLog.[bg]z = WHITE;; ChangeLog.bz2 = WHITE;; ChangeLog.Z = WHITE;; INSTALL* = WHITE;; *NEWS = WHITE;; PLATFORMS = WHITE;; PROBLEMS = WHITE;; TODO* = WHITE;; LSM = WHITE;; TAGS = WHITE;; TAGS. = WHITE;; COPYING = WHITE;; COPYING.[bg]z = WHITE;; COPYING.bz2 = WHITE;; COPYING.Z = WHITE;; [SR]MAIL* = WHITE;; INBOX* = WHITE;; OUTBOX* = WHITE;; *.pgp = BLACK;; *.pgp.[bg]z = BLACK;; *.pgp.bz2 = BLACK;; *.pgp.Z = BLACK;; *.ps = MAGENTA;; ON *.ps.[bg]z = MAGENTA;; ON *.ps.bz2 = MAGENTA;; ON *.ps.Z = MAGENTA;; ON *.eps = MAGENTA;; ON *.eps.[bg]z = MAGENTA;; ON *.eps.bz2 = MAGENTA;; ON *.eps.Z = MAGENTA;; ON *.fig = MAGENTA;; ON *.fig.[bg]z = MAGENTA;; ON *.fig.bz2 = MAGENTA;; ON *.fig.Z = MAGENTA;; ON *.dvi = MAGENTA;; ON *.dvi.[bg]z = MAGENTA;; ON *.dvi.bz2 = MAGENTA;; ON *.dvi.Z = MAGENTA;; ON *.pdf = MAGENTA;; ON *.pdf.[bg]z = MAGENTA;; ON *.pdf.bz2 = MAGENTA;; ON *.pdf.Z = MAGENTA;; ON *.gif = MAGENTA;; ON *.gif.[bg]z = MAGENTA;; ON *.gif.bz2 = MAGENTA;; ON *.gif.Z = MAGENTA;; ON *.jpg = MAGENTA;; ON *.jpg.[bg]z = MAGENTA;; ON *.jpg.bz2 = MAGENTA;; ON *.jpg.Z = MAGENTA;; ON *.jpeg = MAGENTA;; ON *.jpeg.[bg]z = MAGENTA;; ON *.jpeg.bz2 = MAGENTA;; ON *.jpeg.Z = MAGENTA;; ON *.djv = MAGENTA;; ON *.djv.[bg]z = MAGENTA;; ON *.djv.bz2 = MAGENTA;; ON *.djv.Z = MAGENTA;; ON *.tif = MAGENTA;; ON *.tif.[bg]z = MAGENTA;; ON *.tif.bz2 = MAGENTA;; ON *.tif.Z = MAGENTA;; ON *.tiff = MAGENTA;; ON *.tiff.[bg]z = MAGENTA;; ON *.tiff.bz2 = MAGENTA;; ON *.tiff.Z = MAGENTA;; ON *.bmp = MAGENTA;; ON *.bmp.[bg]z = MAGENTA;; ON *.bmp.bz2 = MAGENTA;; ON *.bmp.Z = MAGENTA;; ON *.png = MAGENTA;; ON *.png.[bg]z = MAGENTA;; ON *.png.bz2 = MAGENTA;; ON *.png.Z = MAGENTA;; ON *.pnm = MAGENTA;; ON *.pnm.[bg]z = MAGENTA;; ON *.pnm.bz2 = MAGENTA;; ON *.pnm.Z = MAGENTA;; ON *.ppm = MAGENTA;; ON *.ppm.[bg]z = MAGENTA;; ON *.ppm.bz2 = MAGENTA;; ON *.ppm.Z = MAGENTA;; ON *.pgm = MAGENTA;; ON *.pgm.[bg]z = MAGENTA;; ON *.pgm.bz2 = MAGENTA;; ON *.pgm.Z = MAGENTA;; ON *.pbm = MAGENTA;; ON *.pbm.[bg]z = MAGENTA;; ON *.pbm.bz2 = MAGENTA;; ON *.pbm.Z = MAGENTA;; ON *.xbm = MAGENTA;; ON *.xbm.[bg]z = MAGENTA;; ON *.xbm.bz2 = MAGENTA;; ON *.xbm.Z = MAGENTA;; ON *.xpm = MAGENTA;; ON *.xpm.[bg]z = MAGENTA;; ON *.xpm.bz2 = MAGENTA;; ON *.xpm.Z = MAGENTA;; ON *.fit = MAGENTA;; ON *.fit.[bg]z = MAGENTA;; ON *.fit.bz2 = MAGENTA;; ON *.fit.Z = MAGENTA;; ON *.icon = MAGENTA;; ON *.icon.[bg]z = MAGENTA;; ON *.icon.bz2 = MAGENTA;; ON *.icon.Z = MAGENTA;; ON *.cursor = MAGENTA;; ON *.cursor.[bg]z = MAGENTA;; ON *.cursor.bz2 = MAGENTA;; ON *.cursor.Z = MAGENTA;; ON *.ras = MAGENTA;; ON *.ras.[bg]z = MAGENTA;; ON *.ras.bz2 = MAGENTA;; ON *.ras.Z = MAGENTA;; ON *.tga = MAGENTA;; ON *.tga.[bg]z = MAGENTA;; ON *.tga.bz2 = MAGENTA;; ON *.tga.Z = MAGENTA;; ON *.xcf = MAGENTA;; ON *.xcf.[bg]z = MAGENTA;; ON *.xcf.bz2 = MAGENTA;; ON *.xcf.Z = MAGENTA;; ON *.pr = MAGENTA;; ON *.pr.[bg]z = MAGENTA;; ON *.pr.bz2 = MAGENTA;; ON *.pr.Z = MAGENTA;; ON *.rgb = MAGENTA;; ON *.rgb.[bg]z = MAGENTA;; ON *.rgb.bz2 = MAGENTA;; ON *.rgb.Z = MAGENTA;; ON *.fts = MAGENTA;; ON *.fts.[bg]z = MAGENTA;; ON *.fts.bz2 = MAGENTA;; ON *.fts.Z = MAGENTA;; ON *.mov = BLACK;; *.mov.[bg]z = BLACK;; *.mov.bz2 = BLACK;; *.mov.Z = BLACK;; *.mpg = BLACK;; *.mpg.[bg]z = BLACK;; *.mpg.bz2 = BLACK;; *.mpg.Z = BLACK;; *.mpeg = BLACK;; *.mpeg.[bg]z = BLACK;; *.mpeg.bz2 = BLACK;; *.mpeg.Z = BLACK;; *.avi = BLACK;; *.avi.[bg]z = BLACK;; *.avi.bz2 = BLACK;; *.avi.Z = BLACK;; *.fli = BLACK;; *.fli.[bg]z = BLACK;; *.fli.bz2 = BLACK;; *.fli.Z = BLACK;; *.flc = BLACK;; *.flc.[bg]z = BLACK;; *.flc.bz2 = BLACK;; *.flc.Z = BLACK;; *.au = CYAN;; ON *.au.[bg]z = CYAN;; ON *.au.bz2 = CYAN;; ON *.au.Z = CYAN;; ON *.mp3 = CYAN;; ON *.mp3.[bg]z = CYAN;; ON *.mp3.bz2 = CYAN;; ON *.mp3.Z = CYAN;; ON *.ra = CYAN;; ON *.ra.[bg]z = CYAN;; ON *.ra.bz2 = CYAN;; ON *.ra.Z = CYAN;; ON *.ram = CYAN;; ON *.ram.[bg]z = CYAN;; ON *.ram.bz2 = CYAN;; ON *.ram.Z = CYAN;; ON *.mod = CYAN;; ON *.mod.[bg]z = CYAN;; ON *.mod.bz2 = CYAN;; ON *.mod.Z = CYAN;; ON *.mtm = CYAN;; ON *.mtm.[bg]z = CYAN;; ON *.mtm.bz2 = CYAN;; ON *.mtm.Z = CYAN;; ON *.xm = CYAN;; ON *.xm.[bg]z = CYAN;; ON *.xm.bz2 = CYAN;; ON *.xm.Z = CYAN;; ON *.mid = CYAN;; ON *.mid.[bg]z = CYAN;; ON *.mid.bz2 = CYAN;; ON *.mid.Z = CYAN;; ON *.midi = CYAN;; ON *.midi.[bg]z = CYAN;; ON *.midi.bz2 = CYAN;; ON *.midi.Z = CYAN;; ON *.s3m = CYAN;; ON *.s3m.[bg]z = CYAN;; ON *.s3m.bz2 = CYAN;; ON *.s3m.Z = CYAN;; ON *.voc = CYAN;; ON *.voc.[bg]z = CYAN;; ON *.voc.bz2 = CYAN;; ON *.voc.Z = CYAN;; ON *.aiff = CYAN;; ON *.aiff.[bg]z = CYAN;; ON *.aiff.bz2 = CYAN;; ON *.aiff.Z = CYAN;; ON *.aifc = CYAN;; ON *.aifc.[bg]z = CYAN;; ON *.aifc.bz2 = CYAN;; ON *.aifc.Z = CYAN;; ON *.wav = CYAN;; ON *.wav.[bg]z = CYAN;; ON *.wav.bz2 = CYAN;; ON *.wav.Z = CYAN;; ON *.rmd = CYAN;; ON *.rmd.[bg]z = CYAN;; ON *.rmd.bz2 = CYAN;; ON *.rmd.Z = CYAN;; ON *.pvf = CYAN;; ON *.pvf.[bg]z = CYAN;; ON *.pvf.bz2 = CYAN;; ON *.pvf.Z = CYAN;; ON *.tar.[bg]z = RED;; ON *.tar.bz2 = RED;; ON *.tar.Z = RED;; ON *.tgZ = RED;; ON *.ta[rZ] = RED;; ON *.trZ = RED;; ON *.[bg]z = RED;; ON *.bz2 = RED;; ON *.Z = RED;; ON *.zip = RED;; ON *.jar = RED;; ON *.arj = RED;; ON *.a[0-9][1-9] = RED;; ON *.rar = RED;; ON *.r[0-9][0-9] = RED;; ON *.shar = RED;; ON *.uu = RED;; ON *.rpm = RED;; ON *.deb = RED;; ON .* = CYAN;; ############################### ### ansi with color monitor ### ############################### [GITFM-Color] TitleForeground = CYAN TitleBackground = BLACK TitleBrightness = OFF UserName = RED TtyName = RED ClockForeground = BLACK ClockBackground = CYAN ClockBrightness = OFF PanelFrame = WHITE PanelBackground = BLACK PanelThumbForeground = BLACK PanelThumbBackground = WHITE PanelThumbBrightness = OFF PanelSelectedFile = YELLOW PanelSelectedFileBrightness = OFF PanelNotSelectedFile = WHITE PanelNotSelectedFileBrightness = OFF PanelCurrentSelectedFile = YELLOW PanelCurrentNotSelectedFile = WHITE PanelCurrentFile = BLUE PanelPath = RED PanelPathBrightness = OFF PanelDeviceFreeSpace = RED PanelDeviceFreeSpaceBrightness = OFF PanelFileInfo = RED PanelFileInfoBrightness = OFF PanelFilesInfo = BLACK PanelFilesInfoBrightness = OFF InputLineForeground = WHITE InputLineBackground = BLACK InputLineBrightness = OFF InputLineErrorForeground = WHITE InputLineErrorBackground = RED InputLineErrorBrightness = OFF StatusBarForeground = BLACK StatusBarBackground = CYAN StatusBarBrightness = OFF StatusBarWarningForeground = BLACK StatusBarWarningBackground = WHITE StatusBarWarningBrightness = OFF StatusBarErrorForeground = WHITE StatusBarErrorBackground = RED StatusBarErrorBrightness = OFF [GITPS-Color] TitleForeground = CYAN TitleBackground = BLUE TitleBrightness = OFF HeaderForeground = CYAN HeaderBackground = RED HeaderBrightness = OFF ScreenForeground = BLACK ScreenBackground = CYAN ScreenBrightness = OFF StatusForeground = CYAN StatusBackground = BLUE StatusBrightness = OFF [GITVIEW-Color] TitleForeground = CYAN TitleBackground = BLUE TitleBrightness = OFF HeaderForeground = CYAN HeaderBackground = RED HeaderBrightness = OFF ScreenForeground = BLACK ScreenBackground = CYAN ScreenBrightness = OFF StatusForeground = CYAN StatusBackground = BLUE StatusBrightness = OFF ############################################### ### ansi with monochrome monitor or b/w tty ### ############################################### [GITFM-Monochrome] TitleForeground = WHITE TitleBackground = BLACK TitleBrightness = ON UserName = WHITE TtyName = WHITE ClockForeground = BLACK ClockBackground = WHITE ClockBrightness = OFF PanelFrame = WHITE PanelBackground = BLACK PanelThumbForeground = BLACK PanelThumbBackground = WHITE PanelThumbBrightness = OFF PanelSelectedFile = WHITE PanelSelectedFileBrightness = ON PanelNotSelectedFile = WHITE PanelNotSelectedFileBrightness = OFF PanelCurrentSelectedFile = WHITE PanelCurrentNotSelectedFile = BLACK PanelCurrentFile = WHITE PanelPath = BLACK PanelPathBrightness = OFF PanelDeviceFreeSpace = BLACK PanelDeviceFreeSpaceBrightness = OFF PanelFileInfo = BLACK PanelFileInfoBrightness = OFF PanelFilesInfo = BLACK PanelFilesInfoBrightness = OFF InputLineForeground = WHITE InputLineBackground = BLACK InputLineBrightness = ON InputLineErrorForeground = WHITE InputLineErrorBackground = BLACK InputLineErrorBrightness = ON StatusBarForeground = BLACK StatusBarBackground = WHITE StatusBarBrightness = OFF StatusBarWarningForeground = BLACK StatusBarWarningBackground = WHITE StatusBarWarningBrightness = OFF StatusBarErrorForeground = BLACK StatusBarErrorBackground = WHITE StatusBarErrorBrightness = OFF [GITPS-Monochrome] TitleForeground = BLACK TitleBackground = WHITE TitleBrightness = OFF HeaderForeground = WHITE HeaderBackground = BLACK HeaderBrightness = ON ScreenForeground = WHITE ScreenBackground = BLACK ScreenBrightness = OFF StatusForeground = BLACK StatusBackground = WHITE StatusBrightness = OFF [GITVIEW-Monochrome] TitleForeground = BLACK TitleBackground = WHITE TitleBrightness = OFF HeaderForeground = WHITE HeaderBackground = BLACK HeaderBrightness = ON ScreenForeground = WHITE ScreenBackground = BLACK ScreenBrightness = OFF StatusForeground = BLACK StatusBackground = WHITE StatusBrightness = OFF ### ### COMMAND FORMAT: ### key = command name; formatted command; new dir; save screen; pause; hide ### ### DEFAULTS: ### save screen = y ### pause = n ### hide = n ### ### PLEASE READ THE INFO DOCUMENTATION FOR DETAILS ### BRIEF: ### ### FORMAT SPECIFIERS: ### - %s{question,default_answer} ### - %?{confirmation} ### ### - %f file (not directory) ### - %d directory (not file) ### - %l symbolic link ### - %t fifo ### - %z socket ### - %a any type of directory entry (file, directory, link, fifo, socket) ### - %m current entry mode ### - %g current entry group ### - %o current entry owner ### - %p current panel path ### - %b current panel directory name ### - %i current panel selected or current entry ### ### **** For the other panel: ***** ### ### - %F file (not directory) ### - %D directory (not file) ### - %L symbolic link ### - %T fifo ### - %Z socket ### - %A any type of directory entry (file, directory, link, fifo, socket) ### - %M current entry mode ### - %G current entry group ### - %O current entry owner ### - %P the other panel path ### - %B the other panel directory name ### - %I the other panel selected or current entry ### ### For faster startup, try to keep this entries sorted alphabetically, ### at least locally. The order is given by the key sequence. ### ### ### Key sequences starting with characters between ' ' and '~' are IGNORED! ### [GITFM-Keys] ^[[010q = exit # F10 ^[[011q = GITPS; gitps;;n # F11 ^[[012q = READ-MAIL; $GNUIT_RMAIL;;n # F12 ^[[139q = select-entry # INS ^[[P = delete-char # DEL ^[[146q = end-of-panel # END ### ### ONLY key sequences starting with characters between ' ' and '~' are ### ALLOWED. ### [GITPS-Keys] ^[[010q = exit # F10 ^[[146q = end-of-list # END ### ### Key sequences starting with characters between ' ' and '~' are IGNORED! ### [GITVIEW-Keys] ^[[010q = exit # F10 ^[[146q = end-of-file # END gnuit-4.9.5/term/gnuitrc.ansi.in0000644000175000017500000004634411146671376013532 00000000000000############################################################################### ### ### ### GNU Interactive Tools @VERSION@ configuration file ### ### Copyright (c) 1993-2000, 2006-2007 Free Software Foundation, Inc. ### ### ### ### This file is part of gnuit. ### ### ### ### gnuit 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 3 of the ### ### License, or (at your option) any later version. ### ### ### ### gnuit 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, see ### ### http://www.gnu.org/licenses/. ### ### ### ############################################################################### ### ### ansi configuration file. ### ### ### If your terminal supports the standard ANSI color sequences, set ### AnsiColors to ON ([GITxxx-Color] descriptions will be used). If it ### doesn't, AnsiColors should be OFF ([GITxxx-Monochrome] descriptions ### will be used instead). Ansi terminals usually support color ### sequences so AnsiColors is ON here. ### [Setup] AnsiColors = ON # empty means OFF UseLastScreenChar = OFF # use the last character on the screen StartupScrollStep = # empty means half the number of lines ### ### WARNING: empty lines are considered to be end of sections! ### [GITFM-Setup] StartupFileDisplayMode = Size # OwnerGroup, DateTime, Size, AbbrevSize, Mode or FullName StartupFileSortMethod = Name # Name, Extension, Size, Date, Mode, OwnerId, GroupId, OwnerName or GroupName MaxUnscaledDigits = 9 GroupDigits = ON ConfirmOnExit = # empty means OFF HistoryFile = ~/.githistory InfoDisplay = ON LeadingDotMatch = ON # OFF means that leading '.' is matched only explicitly TypeSensitivity = ON # Automatically set to OFF when AnsiColors is OFF NormalModeHelp = F3 View F4 Edit F5 Copy F6 Move F7 MkDir F8 Del F10 Exit ^CH Ln ^CS SymLn CommandLineModeHelp = ^G-STOP ^B/^F-MOVE ^P/^N-HISTORY ^A-BOL ^E-EOL ^O-RESTORE ^X^C-EXIT ^Z-SUSPEND #NormalModeHelp = System: \s Host: \h Machine: \m Date: \d #CommandLineModeHelp = System: \s Host: \h Machine: \m Date: \d [GITPS-Setup] Help = Arrows-MOVE Enter-SIGNALS ^L-REFRESH ^X^C/F10-QUIT ^Xk-KILL RefreshAfterKill = ON # Refresh process list after killing processes [GITVIEW-Setup] Help = Arrows/PgUp/PgDown/Home/End-MOVE ^L-REFRESH ^X^C/F10-QUIT 0-9/a-f/A-F-OFFSET ### ### To ignore a section just comment its name ### ### ### shell-pattern = [foreground]; [background]; [brightness] ### [GITFM-FTI] *.[chlysp] = GREEN;; *.[chlysp].[bg]z = GREEN;; *.[chlysp].bz2 = GREEN;; *.[chlysp].Z = GREEN;; *.cc = GREEN;; *.cc.[bg]z = GREEN;; *.cc.bz2 = GREEN;; *.cc.Z = GREEN;; *.cpp = GREEN;; *.cpp.[bg]z = GREEN;; *.cpp.bz2 = GREEN;; *.cpp.Z = GREEN;; *.c++ = GREEN;; *.c++.[bg]z = GREEN;; *.c++.bz2 = GREEN;; *.c++.Z = GREEN;; *.java = GREEN;; *.java.[bg]z = GREEN;; *.java.bz2 = GREEN;; *.java.Z = GREEN;; *.pov = GREEN;; *.pov.[bg]z = GREEN;; *.pov.bz2 = GREEN;; *.pov.Z = GREEN;; *.m4 = GREEN;; *.m4.[bg]z = GREEN;; *.m4.bz2 = GREEN;; *.m4.Z = GREEN;; *.pl = GREEN;; *.pl.[bg]z = GREEN;; *.pl.bz2 = GREEN;; *.pl.Z = GREEN;; *.inc = GREEN;; *.inc.[bg]z = GREEN;; *.inc.bz2 = GREEN;; *.inc.Z = GREEN;; *.el = GREEN;; *.el.[bg]z = GREEN;; *.el.bz2 = GREEN;; *.el.Z = GREEN;; *.elc = GREEN;; *.elc.[bg]z = GREEN;; *.elc.bz2 = GREEN;; *.elc.Z = GREEN;; *.py.[bg]z = GREEN;; *.py.bz2 = GREEN;; *.py.Z = GREEN;; *.idl = GREEN;; *.idl.[bg]z = GREEN;; *.idl.bz2 = GREEN;; *.idl.Z = GREEN;; *.in = GREEN;; *.in.[bg]z = GREEN;; *.in.bz2 = GREEN;; *.in.Z = GREEN;; *.pas = GREEN;; *.pas.[bg]z = GREEN;; *.pas.bz2 = GREEN;; *.pas.Z = GREEN;; *.pm = GREEN;; *.pm.[bg]z = GREEN;; *.pm.bz2 = GREEN;; *.pm.Z = GREEN;; *,v = CYAN;; *,v.[bg]z = CYAN;; *,v.bz2 = CYAN;; *,v.Z = CYAN;; Makefile = CYAN;; Makefile.am = GREEN;; Makefile.* = CYAN;; *.o = CYAN;; *.o.[bg]z = CYAN;; *.o.bz2 = CYAN;; *.o.Z = CYAN;; *.lo = CYAN;; *.lo.[bg]z = CYAN;; *.lo.bz2 = CYAN;; *.lo.Z = CYAN;; *.la = CYAN;; *.la.[bg]z = CYAN;; *.la.bz2 = CYAN;; *.la.Z = CYAN;; *.class = CYAN;; *.class.[bg]z = CYAN;; *.class.bz2 = CYAN;; *.class.Z = CYAN;; *.a = CYAN;; *.a.[bg]z = CYAN;; *.a.bz2 = CYAN;; *.a.Z = CYAN;; *.sa = CYAN;; *.sa.* = CYAN;; *.so = CYAN;; *.so.[0-9]* = CYAN;; *.texi = WHITE;; *.texi.[bg]z = WHITE;; *.texi.bz2 = WHITE;; *.texi.Z = WHITE;; *.texinfo = WHITE;; *.texinfo.[bg]z = WHITE;; *.texinfo.bz2 = WHITE;; *.texinfo.Z = WHITE;; *.info* = WHITE;; *.dir = WHITE;; *.dir.[bg]z = WHITE;; *.dir.bz2 = WHITE;; *.dir.Z = WHITE;; *.man = WHITE;; *.man.[bg]z = WHITE;; *.man.bz2 = WHITE;; *.man.Z = WHITE;; *.ms = WHITE;; *.ms.[bg]z = WHITE;; *.ms.bz2 = WHITE;; *.ms.Z = WHITE;; *.[0-9n] = WHITE;; *.[0-9n].[bg]z = WHITE;; *.[0-9n].bz2 = WHITE;; *.[0-9n].Z = WHITE;; *.[0-9n][xm] = WHITE;; *.[0-9n][xm].[bg]z = WHITE;; *.[0-9n][xm].bz2 = WHITE;; *.[0-9n][xm].Z = WHITE;; *.[0-9n]tk = WHITE;; *.[0-9n]tk.[bg]z = WHITE;; *.[0-9n]tk.bz2 = WHITE;; *.[0-9n]tk.Z = WHITE;; *.[0-9n]tcl = WHITE;; *.[0-9n]tcl.[bg]z = WHITE;; *.[0-9n]tcl.bz2 = WHITE;; *.[0-9n]tcl.Z = WHITE;; *.[0-9n]tclx = WHITE;; *.[0-9n]tclx.[bg]z = WHITE;; *.[0-9n]tclx.bz2 = WHITE;; *.[0-9n]tclx.Z = WHITE;; *.[0-9n]itcl = WHITE;; *.[0-9n]itcl.[bg]z = WHITE;; *.[0-9n]itcl.bz2 = WHITE;; *.[0-9n]itcl.Z = WHITE;; *.[0-9n]blt = WHITE;; *.[0-9n]blt.[bg]z = WHITE;; *.[0-9n]blt.bz2 = WHITE;; *.[0-9n]blt.Z = WHITE;; *.doc = WHITE;; *.doc.[bg]z = WHITE;; *.doc.bz2 = WHITE;; *.doc.Z = WHITE;; *.ppt = WHITE;; *.ppt.[bg]z = WHITE;; *.ppt.bz2 = WHITE;; *.ppt.Z = WHITE;; *.aw = WHITE;; *.aw.[bg]z = WHITE;; *.aw.bz2 = WHITE;; *.aw.Z = WHITE;; *.lyx = WHITE;; *.lyx.[bg]z = WHITE;; *.lyx.bz2 = WHITE;; *.lyx.Z = WHITE;; *.orig = WHITE;; *.orig.[bg]z = WHITE;; *.orig.bz2 = WHITE;; *.orig.Z = WHITE;; *.txt = WHITE;; *.txt.[bg]z = WHITE;; *.txt.bz2 = WHITE;; *.txt.Z = WHITE;; *.text = WHITE;; *.text.[bg]z = WHITE;; *.text.bz2 = WHITE;; *.text.Z = WHITE;; *.log = WHITE;; *.log.[bg]z = WHITE;; *.log.bz2 = WHITE;; *.log.Z = WHITE;; *.aux = WHITE;; *.aux.[bg]z = WHITE;; *.aux.bz2 = WHITE;; *.aux.Z = WHITE;; *.lsm = WHITE;; *.lsm.[bg]z = WHITE;; *.lsm.bz2 = WHITE;; *.lsm.Z = WHITE;; *.tex = WHITE;; *.tex.[bg]z = WHITE;; *.tex.bz2 = WHITE;; *.tex.Z = WHITE;; *.diff = WHITE;; *.diff.[bg]z = WHITE;; *.diff.bz2 = WHITE;; *.diff.Z = WHITE;; *.html = WHITE;; *.html.[bg]z = WHITE;; *.html.bz2 = WHITE;; *.html.Z = WHITE;; *.htm = WHITE;; *.htm.[bg]z = WHITE;; *.htm.bz2 = WHITE;; *.htm.Z = WHITE;; README* = WHITE;; *.README = WHITE;; *.README.[bg]z = WHITE;; *.README.bz2 = WHITE;; *.README.Z = WHITE;; ChangeLog = WHITE;; ChangeLog.[bg]z = WHITE;; ChangeLog.bz2 = WHITE;; ChangeLog.Z = WHITE;; INSTALL* = WHITE;; *NEWS = WHITE;; PLATFORMS = WHITE;; PROBLEMS = WHITE;; TODO* = WHITE;; LSM = WHITE;; TAGS = WHITE;; TAGS. = WHITE;; COPYING = WHITE;; COPYING.[bg]z = WHITE;; COPYING.bz2 = WHITE;; COPYING.Z = WHITE;; [SR]MAIL* = WHITE;; INBOX* = WHITE;; OUTBOX* = WHITE;; *.pgp = CYAN;; *.pgp.[bg]z = CYAN;; *.pgp.bz2 = CYAN;; *.pgp.Z = CYAN;; *.ps = MAGENTA;; *.ps.[bg]z = MAGENTA;; *.ps.bz2 = MAGENTA;; *.ps.Z = MAGENTA;; *.eps = MAGENTA;; *.eps.[bg]z = MAGENTA;; *.eps.bz2 = MAGENTA;; *.eps.Z = MAGENTA;; *.fig = MAGENTA;; *.fig.[bg]z = MAGENTA;; *.fig.bz2 = MAGENTA;; *.fig.Z = MAGENTA;; *.dvi = MAGENTA;; *.dvi.[bg]z = MAGENTA;; *.dvi.bz2 = MAGENTA;; *.dvi.Z = MAGENTA;; *.pdf = MAGENTA;; *.pdf.[bg]z = MAGENTA;; *.pdf.bz2 = MAGENTA;; *.pdf.Z = MAGENTA;; *.gif = MAGENTA;; *.gif.[bg]z = MAGENTA;; *.gif.bz2 = MAGENTA;; *.gif.Z = MAGENTA;; *.jpg = MAGENTA;; *.jpg.[bg]z = MAGENTA;; *.jpg.bz2 = MAGENTA;; *.jpg.Z = MAGENTA;; *.jpeg = MAGENTA;; *.jpeg.[bg]z = MAGENTA;; *.jpeg.bz2 = MAGENTA;; *.jpeg.Z = MAGENTA;; *.djv = MAGENTA;; *.djv.[bg]z = MAGENTA;; *.djv.bz2 = MAGENTA;; *.djv.Z = MAGENTA;; *.tif = MAGENTA;; *.tif.[bg]z = MAGENTA;; *.tif.bz2 = MAGENTA;; *.tif.Z = MAGENTA;; *.tiff = MAGENTA;; *.tiff.[bg]z = MAGENTA;; *.tiff.bz2 = MAGENTA;; *.tiff.Z = MAGENTA;; *.bmp = MAGENTA;; *.bmp.[bg]z = MAGENTA;; *.bmp.bz2 = MAGENTA;; *.bmp.Z = MAGENTA;; *.png = MAGENTA;; *.png.[bg]z = MAGENTA;; *.png.bz2 = MAGENTA;; *.png.Z = MAGENTA;; *.pnm = MAGENTA;; *.pnm.[bg]z = MAGENTA;; *.pnm.bz2 = MAGENTA;; *.pnm.Z = MAGENTA;; *.ppm = MAGENTA;; *.ppm.[bg]z = MAGENTA;; *.ppm.bz2 = MAGENTA;; *.ppm.Z = MAGENTA;; *.pgm = MAGENTA;; *.pgm.[bg]z = MAGENTA;; *.pgm.bz2 = MAGENTA;; *.pgm.Z = MAGENTA;; *.pbm = MAGENTA;; *.pbm.[bg]z = MAGENTA;; *.pbm.bz2 = MAGENTA;; *.pbm.Z = MAGENTA;; *.xbm = MAGENTA;; *.xbm.[bg]z = MAGENTA;; *.xbm.bz2 = MAGENTA;; *.xbm.Z = MAGENTA;; *.xpm = MAGENTA;; *.xpm.[bg]z = MAGENTA;; *.xpm.bz2 = MAGENTA;; *.xpm.Z = MAGENTA;; *.fit = MAGENTA;; *.fit.[bg]z = MAGENTA;; *.fit.bz2 = MAGENTA;; *.fit.Z = MAGENTA;; *.icon = MAGENTA;; *.icon.[bg]z = MAGENTA;; *.icon.bz2 = MAGENTA;; *.icon.Z = MAGENTA;; *.cursor = MAGENTA;; *.cursor.[bg]z = MAGENTA;; *.cursor.bz2 = MAGENTA;; *.cursor.Z = MAGENTA;; *.ras = MAGENTA;; *.ras.[bg]z = MAGENTA;; *.ras.bz2 = MAGENTA;; *.ras.Z = MAGENTA;; *.tga = MAGENTA;; *.tga.[bg]z = MAGENTA;; *.tga.bz2 = MAGENTA;; *.tga.Z = MAGENTA;; *.xcf = MAGENTA;; *.xcf.[bg]z = MAGENTA;; *.xcf.bz2 = MAGENTA;; *.xcf.Z = MAGENTA;; *.pr = MAGENTA;; *.pr.[bg]z = MAGENTA;; *.pr.bz2 = MAGENTA;; *.pr.Z = MAGENTA;; *.rgb = MAGENTA;; *.rgb.[bg]z = MAGENTA;; *.rgb.bz2 = MAGENTA;; *.rgb.Z = MAGENTA;; *.fts = MAGENTA;; *.fts.[bg]z = MAGENTA;; *.fts.bz2 = MAGENTA;; *.fts.Z = MAGENTA;; *.mov = CYAN;; *.mov.[bg]z = CYAN;; *.mov.bz2 = CYAN;; *.mov.Z = CYAN;; *.mpg = CYAN;; *.mpg.[bg]z = CYAN;; *.mpg.bz2 = CYAN;; *.mpg.Z = CYAN;; *.mpeg = CYAN;; *.mpeg.[bg]z = CYAN;; *.mpeg.bz2 = CYAN;; *.mpeg.Z = CYAN;; *.avi = CYAN;; *.avi.[bg]z = CYAN;; *.avi.bz2 = CYAN;; *.avi.Z = CYAN;; *.fli = CYAN;; *.fli.[bg]z = CYAN;; *.fli.bz2 = CYAN;; *.fli.Z = CYAN;; *.flc = CYAN;; *.flc.[bg]z = CYAN;; *.flc.bz2 = CYAN;; *.flc.Z = CYAN;; *.au = CYAN;; *.au.[bg]z = CYAN;; *.au.bz2 = CYAN;; *.au.Z = CYAN;; *.mp3 = CYAN;; *.mp3.[bg]z = CYAN;; *.mp3.bz2 = CYAN;; *.mp3.Z = CYAN;; *.ra = CYAN;; *.ra.[bg]z = CYAN;; *.ra.bz2 = CYAN;; *.ra.Z = CYAN;; *.ram = CYAN;; *.ram.[bg]z = CYAN;; *.ram.bz2 = CYAN;; *.ram.Z = CYAN;; *.mod = CYAN;; *.mod.[bg]z = CYAN;; *.mod.bz2 = CYAN;; *.mod.Z = CYAN;; *.mtm = CYAN;; *.mtm.[bg]z = CYAN;; *.mtm.bz2 = CYAN;; *.mtm.Z = CYAN;; *.xm = CYAN;; *.xm.[bg]z = CYAN;; *.xm.bz2 = CYAN;; *.xm.Z = CYAN;; *.mid = CYAN;; *.mid.[bg]z = CYAN;; *.mid.bz2 = CYAN;; *.mid.Z = CYAN;; *.midi = CYAN;; *.midi.[bg]z = CYAN;; *.midi.bz2 = CYAN;; *.midi.Z = CYAN;; *.s3m = CYAN;; *.s3m.[bg]z = CYAN;; *.s3m.bz2 = CYAN;; *.s3m.Z = CYAN;; *.voc = CYAN;; *.voc.[bg]z = CYAN;; *.voc.bz2 = CYAN;; *.voc.Z = CYAN;; *.aiff = CYAN;; *.aiff.[bg]z = CYAN;; *.aiff.bz2 = CYAN;; *.aiff.Z = CYAN;; *.aifc = CYAN;; *.aifc.[bg]z = CYAN;; *.aifc.bz2 = CYAN;; *.aifc.Z = CYAN;; *.wav = CYAN;; *.wav.[bg]z = CYAN;; *.wav.bz2 = CYAN;; *.wav.Z = CYAN;; *.rmd = CYAN;; *.rmd.[bg]z = CYAN;; *.rmd.bz2 = CYAN;; *.rmd.Z = CYAN;; *.pvf = CYAN;; *.pvf.[bg]z = CYAN;; *.pvf.bz2 = CYAN;; *.pvf.Z = CYAN;; *.tar.[bg]z = RED;; *.tar.bz2 = RED;; *.tar.Z = RED;; *.tgZ = RED;; *.ta[rZ] = RED;; *.trZ = RED;; *.[bg]z = RED;; *.bz2 = RED;; *.Z = RED;; *.zip = RED;; *.jar = RED;; *.arj = RED;; *.a[0-9][1-9] = RED;; *.rar = RED;; *.r[0-9][0-9] = RED;; *.shar = RED;; *.uu = RED;; *.rpm = RED;; *.deb = RED;; .* = CYAN;; ############################### ### ansi with color monitor ### ############################### [GITFM-Color] TitleForeground = CYAN TitleBackground = BLACK TitleBrightness = OFF UserName = RED TtyName = RED ClockForeground = BLACK ClockBackground = CYAN ClockBrightness = OFF PanelFrame = WHITE PanelBackground = BLACK PanelThumbForeground = BLACK PanelThumbBackground = WHITE PanelThumbBrightness = OFF PanelSelectedFile = YELLOW PanelSelectedFileBrightness = OFF PanelNotSelectedFile = WHITE PanelNotSelectedFileBrightness = OFF PanelCurrentSelectedFile = YELLOW PanelCurrentNotSelectedFile = WHITE PanelCurrentFile = BLUE PanelPath = RED PanelPathBrightness = OFF PanelDeviceFreeSpace = RED PanelDeviceFreeSpaceBrightness = OFF PanelFileInfo = RED PanelFileInfoBrightness = OFF PanelFilesInfo = BLACK PanelFilesInfoBrightness = OFF InputLineForeground = WHITE InputLineBackground = BLACK InputLineBrightness = OFF InputLineErrorForeground = WHITE InputLineErrorBackground = RED InputLineErrorBrightness = OFF StatusBarForeground = BLACK StatusBarBackground = CYAN StatusBarBrightness = OFF StatusBarWarningForeground = BLACK StatusBarWarningBackground = WHITE StatusBarWarningBrightness = OFF StatusBarErrorForeground = WHITE StatusBarErrorBackground = RED StatusBarErrorBrightness = OFF [GITPS-Color] TitleForeground = CYAN TitleBackground = BLUE TitleBrightness = OFF HeaderForeground = CYAN HeaderBackground = RED HeaderBrightness = OFF ScreenForeground = BLACK ScreenBackground = CYAN ScreenBrightness = OFF StatusForeground = CYAN StatusBackground = BLUE StatusBrightness = OFF [GITVIEW-Color] TitleForeground = CYAN TitleBackground = BLUE TitleBrightness = OFF HeaderForeground = CYAN HeaderBackground = RED HeaderBrightness = OFF ScreenForeground = BLACK ScreenBackground = CYAN ScreenBrightness = OFF StatusForeground = CYAN StatusBackground = BLUE StatusBrightness = OFF ############################################### ### ansi with monochrome monitor or b/w tty ### ############################################### [GITFM-Monochrome] TitleForeground = WHITE TitleBackground = BLACK TitleBrightness = ON UserName = WHITE TtyName = WHITE ClockForeground = BLACK ClockBackground = WHITE ClockBrightness = OFF PanelFrame = WHITE PanelBackground = BLACK PanelThumbForeground = BLACK PanelThumbBackground = WHITE PanelThumbBrightness = OFF PanelSelectedFile = WHITE PanelSelectedFileBrightness = ON PanelNotSelectedFile = WHITE PanelNotSelectedFileBrightness = OFF PanelCurrentSelectedFile = WHITE PanelCurrentNotSelectedFile = BLACK PanelCurrentFile = WHITE PanelPath = BLACK PanelPathBrightness = OFF PanelDeviceFreeSpace = BLACK PanelDeviceFreeSpaceBrightness = OFF PanelFileInfo = BLACK PanelFileInfoBrightness = OFF PanelFilesInfo = BLACK PanelFilesInfoBrightness = OFF InputLineForeground = WHITE InputLineBackground = BLACK InputLineBrightness = ON InputLineErrorForeground = WHITE InputLineErrorBackground = BLACK InputLineErrorBrightness = ON StatusBarForeground = BLACK StatusBarBackground = WHITE StatusBarBrightness = OFF StatusBarWarningForeground = BLACK StatusBarWarningBackground = WHITE StatusBarWarningBrightness = OFF StatusBarErrorForeground = BLACK StatusBarErrorBackground = WHITE StatusBarErrorBrightness = OFF [GITPS-Monochrome] TitleForeground = BLACK TitleBackground = WHITE TitleBrightness = OFF HeaderForeground = WHITE HeaderBackground = BLACK HeaderBrightness = ON ScreenForeground = WHITE ScreenBackground = BLACK ScreenBrightness = OFF StatusForeground = BLACK StatusBackground = WHITE StatusBrightness = OFF [GITVIEW-Monochrome] TitleForeground = BLACK TitleBackground = WHITE TitleBrightness = OFF HeaderForeground = WHITE HeaderBackground = BLACK HeaderBrightness = ON ScreenForeground = WHITE ScreenBackground = BLACK ScreenBrightness = OFF StatusForeground = BLACK StatusBackground = WHITE StatusBrightness = OFF ### ### COMMAND FORMAT: ### key = command name; formatted command; new dir; save screen; pause; hide ### ### DEFAULTS: ### save screen = y ### pause = n ### hide = n ### ### PLEASE READ THE INFO DOCUMENTATION FOR DETAILS ### BRIEF: ### ### FORMAT SPECIFIERS: ### - %s{question,default_answer} ### - %?{confirmation} ### ### - %f file (not directory) ### - %d directory (not file) ### - %l symbolic link ### - %t fifo ### - %z socket ### - %a any type of directory entry (file, directory, link, fifo, socket) ### - %m current entry mode ### - %g current entry group ### - %o current entry owner ### - %p current panel path ### - %b current panel directory name ### - %i current panel selected or current entry ### ### **** For the other panel: ***** ### ### - %F file (not directory) ### - %D directory (not file) ### - %L symbolic link ### - %T fifo ### - %Z socket ### - %A any type of directory entry (file, directory, link, fifo, socket) ### - %M current entry mode ### - %G current entry group ### - %O current entry owner ### - %P the other panel path ### - %B the other panel directory name ### - %I the other panel selected or current entry ### ### For faster startup, try to keep this entries sorted alphabetically, ### at least locally. The order is given by the key sequence. ### ### ### Key sequences starting with characters between ' ' and '~' are IGNORED! ### [GITFM-Keys] ^[[009q = MAKE; make %s{Options: ,-k };;;y # F9 ^[[010q = exit # F10 ^[[011q = GITPS; gitps;;n # F11 ^[[012q = READ-MAIL; $GNUIT_RMAIL;;n # F12 ### ### Only key sequences starting with characters between ' ' and '~' are ### ALLOWED. ### [GITPS-Keys] ^[[010q = exit # F10 ### ### Key sequences starting with characters between ' ' and '~' are IGNORED! ### [GITVIEW-Keys] ^[[010q = exit # F10 gnuit-4.9.5/term/gnuitrc.xterm-color.in0000644000175000017500000005203011146671376015040 00000000000000############################################################################### ### ### ### GNU Interactive Tools @VERSION@ configuration file ### ### Copyright (c) 1993-2000, 2006-2007 Free Software Foundation, Inc. ### ### ### ### This file is part of gnuit. ### ### ### ### gnuit 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 3 of the ### ### License, or (at your option) any later version. ### ### ### ### gnuit 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, see ### ### http://www.gnu.org/licenses/. ### ### ### ############################################################################### ### ### xterm configuration file (X window system terminal emulator). ### If you are using color_xterm or you are using the Ultrix xterm, consider ### changing AnsiColors to ON. ### ### ### If your terminal supports the standard ANSI color sequences, set ### AnsiColors to ON ([GITxxx-Color] descriptions will be used). If it ### doesn't, AnsiColors should be OFF ([GITxxx-Monochrome] descriptions ### will be used instead). ### [Setup] AnsiColors = ON # empty means OFF UseLastScreenChar = ON # use the last character on the screen StartupScrollStep = # empty means half the number of lines ### ### WARNING: empty lines are considered to be end of sections! ### [GITFM-Setup] StartupFileDisplayMode = Size # OwnerGroup, DateTime, Size, AbbrevSize, Mode or FullName StartupFileSortMethod = Name # Name, Extension, Size, Date, Mode, OwnerId, GroupId, OwnerName or GroupName MaxUnscaledDigits = 9 GroupDigits = ON ConfirmOnExit = # empty means OFF HistoryFile = ~/.githistory InfoDisplay = ON LeadingDotMatch = ON # OFF means that leading '.' is matched only explicitly TypeSensitivity = ON # Automatically set to OFF when AnsiColors is OFF NormalModeHelp = F3 View F4 Edit F5 Copy F6 Move F7 MkDir F8 Del F10 Exit ^CH Ln ^CS SymLn CommandLineModeHelp = ^G-STOP ^B/^F-MOVE ^P/^N-HISTORY ^A-BOL ^E-EOL ^O-RESTORE ^X^C-EXIT ^Z-SUSPEND #NormalModeHelp = System: \s Host: \h Machine: \m Date: \d #CommandLineModeHelp = System: \s Host: \h Machine: \m Date: \d [GITPS-Setup] Help = Arrows-MOVE Enter-SIGNALS ^L-REFRESH ^X^C/F10-QUIT ^Xk-KILL RefreshAfterKill = ON # Refresh process list after killing processes [GITVIEW-Setup] Help = Arrows/PgUp/PgDown/Home/End-MOVE ^L-REFRESH ^X^C/F10-QUIT 0-9/a-f/A-F-OFFSET ### ### To ignore a section just comment its name ### ### ### shell-pattern = [foreground]; [background]; [brightness] ### [GITFM-FTI] *.[chlysp] = GREEN;; *.[chlysp].[bg]z = GREEN;; *.[chlysp].bz2 = GREEN;; *.[chlysp].Z = GREEN;; *.cc = GREEN;; *.cc.[bg]z = GREEN;; *.cc.bz2 = GREEN;; *.cc.Z = GREEN;; *.cpp = GREEN;; *.cpp.[bg]z = GREEN;; *.cpp.bz2 = GREEN;; *.cpp.Z = GREEN;; *.c++ = GREEN;; *.c++.[bg]z = GREEN;; *.c++.bz2 = GREEN;; *.c++.Z = GREEN;; *.java = GREEN;; *.java.[bg]z = GREEN;; *.java.bz2 = GREEN;; *.java.Z = GREEN;; *.pov = GREEN;; *.pov.[bg]z = GREEN;; *.pov.bz2 = GREEN;; *.pov.Z = GREEN;; *.m4 = GREEN;; *.m4.[bg]z = GREEN;; *.m4.bz2 = GREEN;; *.m4.Z = GREEN;; *.pl = GREEN;; *.pl.[bg]z = GREEN;; *.pl.bz2 = GREEN;; *.pl.Z = GREEN;; *.inc = GREEN;; *.inc.[bg]z = GREEN;; *.inc.bz2 = GREEN;; *.inc.Z = GREEN;; *.el = GREEN;; *.el.[bg]z = GREEN;; *.el.bz2 = GREEN;; *.el.Z = GREEN;; *.elc = GREEN;; *.elc.[bg]z = GREEN;; *.elc.bz2 = GREEN;; *.elc.Z = GREEN;; *.py.[bg]z = GREEN;; *.py.bz2 = GREEN;; *.py.Z = GREEN;; *.idl = GREEN;; *.idl.[bg]z = GREEN;; *.idl.bz2 = GREEN;; *.idl.Z = GREEN;; *.in = GREEN;; *.in.[bg]z = GREEN;; *.in.bz2 = GREEN;; *.in.Z = GREEN;; *.pas = GREEN;; *.pas.[bg]z = GREEN;; *.pas.bz2 = GREEN;; *.pas.Z = GREEN;; *.pm = GREEN;; *.pm.[bg]z = GREEN;; *.pm.bz2 = GREEN;; *.pm.Z = GREEN;; *,v = CYAN;; *,v.[bg]z = CYAN;; *,v.bz2 = CYAN;; *,v.Z = CYAN;; Makefile = CYAN;; Makefile.am = GREEN;; Makefile.* = CYAN;; *.o = CYAN;; *.o.[bg]z = CYAN;; *.o.bz2 = CYAN;; *.o.Z = CYAN;; *.lo = CYAN;; *.lo.[bg]z = CYAN;; *.lo.bz2 = CYAN;; *.lo.Z = CYAN;; *.la = CYAN;; *.la.[bg]z = CYAN;; *.la.bz2 = CYAN;; *.la.Z = CYAN;; *.class = CYAN;; *.class.[bg]z = CYAN;; *.class.bz2 = CYAN;; *.class.Z = CYAN;; *.a = CYAN;; *.a.[bg]z = CYAN;; *.a.bz2 = CYAN;; *.a.Z = CYAN;; *.sa = CYAN;; *.sa.* = CYAN;; *.so = CYAN;; *.so.[0-9]* = CYAN;; *.texi = WHITE;; *.texi.[bg]z = WHITE;; *.texi.bz2 = WHITE;; *.texi.Z = WHITE;; *.texinfo = WHITE;; *.texinfo.[bg]z = WHITE;; *.texinfo.bz2 = WHITE;; *.texinfo.Z = WHITE;; *.info* = WHITE;; *.dir = WHITE;; *.dir.[bg]z = WHITE;; *.dir.bz2 = WHITE;; *.dir.Z = WHITE;; *.man = WHITE;; *.man.[bg]z = WHITE;; *.man.bz2 = WHITE;; *.man.Z = WHITE;; *.ms = WHITE;; *.ms.[bg]z = WHITE;; *.ms.bz2 = WHITE;; *.ms.Z = WHITE;; *.[0-9n] = WHITE;; *.[0-9n].[bg]z = WHITE;; *.[0-9n].bz2 = WHITE;; *.[0-9n].Z = WHITE;; *.[0-9n][xm] = WHITE;; *.[0-9n][xm].[bg]z = WHITE;; *.[0-9n][xm].bz2 = WHITE;; *.[0-9n][xm].Z = WHITE;; *.[0-9n]tk = WHITE;; *.[0-9n]tk.[bg]z = WHITE;; *.[0-9n]tk.bz2 = WHITE;; *.[0-9n]tk.Z = WHITE;; *.[0-9n]tcl = WHITE;; *.[0-9n]tcl.[bg]z = WHITE;; *.[0-9n]tcl.bz2 = WHITE;; *.[0-9n]tcl.Z = WHITE;; *.[0-9n]tclx = WHITE;; *.[0-9n]tclx.[bg]z = WHITE;; *.[0-9n]tclx.bz2 = WHITE;; *.[0-9n]tclx.Z = WHITE;; *.[0-9n]itcl = WHITE;; *.[0-9n]itcl.[bg]z = WHITE;; *.[0-9n]itcl.bz2 = WHITE;; *.[0-9n]itcl.Z = WHITE;; *.[0-9n]blt = WHITE;; *.[0-9n]blt.[bg]z = WHITE;; *.[0-9n]blt.bz2 = WHITE;; *.[0-9n]blt.Z = WHITE;; *.doc = WHITE;; *.doc.[bg]z = WHITE;; *.doc.bz2 = WHITE;; *.doc.Z = WHITE;; *.ppt = WHITE;; *.ppt.[bg]z = WHITE;; *.ppt.bz2 = WHITE;; *.ppt.Z = WHITE;; *.aw = WHITE;; *.aw.[bg]z = WHITE;; *.aw.bz2 = WHITE;; *.aw.Z = WHITE;; *.lyx = WHITE;; *.lyx.[bg]z = WHITE;; *.lyx.bz2 = WHITE;; *.lyx.Z = WHITE;; *.orig = WHITE;; *.orig.[bg]z = WHITE;; *.orig.bz2 = WHITE;; *.orig.Z = WHITE;; *.txt = WHITE;; *.txt.[bg]z = WHITE;; *.txt.bz2 = WHITE;; *.txt.Z = WHITE;; *.text = WHITE;; *.text.[bg]z = WHITE;; *.text.bz2 = WHITE;; *.text.Z = WHITE;; *.log = WHITE;; *.log.[bg]z = WHITE;; *.log.bz2 = WHITE;; *.log.Z = WHITE;; *.aux = WHITE;; *.aux.[bg]z = WHITE;; *.aux.bz2 = WHITE;; *.aux.Z = WHITE;; *.lsm = WHITE;; *.lsm.[bg]z = WHITE;; *.lsm.bz2 = WHITE;; *.lsm.Z = WHITE;; *.tex = WHITE;; *.tex.[bg]z = WHITE;; *.tex.bz2 = WHITE;; *.tex.Z = WHITE;; *.diff = WHITE;; *.diff.[bg]z = WHITE;; *.diff.bz2 = WHITE;; *.diff.Z = WHITE;; *.html = WHITE;; *.html.[bg]z = WHITE;; *.html.bz2 = WHITE;; *.html.Z = WHITE;; *.htm = WHITE;; *.htm.[bg]z = WHITE;; *.htm.bz2 = WHITE;; *.htm.Z = WHITE;; README* = WHITE;; *.README = WHITE;; *.README.[bg]z = WHITE;; *.README.bz2 = WHITE;; *.README.Z = WHITE;; ChangeLog = WHITE;; ChangeLog.[bg]z = WHITE;; ChangeLog.bz2 = WHITE;; ChangeLog.Z = WHITE;; INSTALL* = WHITE;; *NEWS = WHITE;; PLATFORMS = WHITE;; PROBLEMS = WHITE;; TODO* = WHITE;; LSM = WHITE;; TAGS = WHITE;; TAGS. = WHITE;; COPYING = WHITE;; COPYING.[bg]z = WHITE;; COPYING.bz2 = WHITE;; COPYING.Z = WHITE;; [SR]MAIL* = WHITE;; INBOX* = WHITE;; OUTBOX* = WHITE;; *.pgp = CYAN;; *.pgp.[bg]z = CYAN;; *.pgp.bz2 = CYAN;; *.pgp.Z = CYAN;; *.ps = MAGENTA;; *.ps.[bg]z = MAGENTA;; *.ps.bz2 = MAGENTA;; *.ps.Z = MAGENTA;; *.eps = MAGENTA;; *.eps.[bg]z = MAGENTA;; *.eps.bz2 = MAGENTA;; *.eps.Z = MAGENTA;; *.fig = MAGENTA;; *.fig.[bg]z = MAGENTA;; *.fig.bz2 = MAGENTA;; *.fig.Z = MAGENTA;; *.dvi = MAGENTA;; *.dvi.[bg]z = MAGENTA;; *.dvi.bz2 = MAGENTA;; *.dvi.Z = MAGENTA;; *.pdf = MAGENTA;; *.pdf.[bg]z = MAGENTA;; *.pdf.bz2 = MAGENTA;; *.pdf.Z = MAGENTA;; *.gif = MAGENTA;; *.gif.[bg]z = MAGENTA;; *.gif.bz2 = MAGENTA;; *.gif.Z = MAGENTA;; *.jpg = MAGENTA;; *.jpg.[bg]z = MAGENTA;; *.jpg.bz2 = MAGENTA;; *.jpg.Z = MAGENTA;; *.jpeg = MAGENTA;; *.jpeg.[bg]z = MAGENTA;; *.jpeg.bz2 = MAGENTA;; *.jpeg.Z = MAGENTA;; *.djv = MAGENTA;; *.djv.[bg]z = MAGENTA;; *.djv.bz2 = MAGENTA;; *.djv.Z = MAGENTA;; *.tif = MAGENTA;; *.tif.[bg]z = MAGENTA;; *.tif.bz2 = MAGENTA;; *.tif.Z = MAGENTA;; *.tiff = MAGENTA;; *.tiff.[bg]z = MAGENTA;; *.tiff.bz2 = MAGENTA;; *.tiff.Z = MAGENTA;; *.bmp = MAGENTA;; *.bmp.[bg]z = MAGENTA;; *.bmp.bz2 = MAGENTA;; *.bmp.Z = MAGENTA;; *.png = MAGENTA;; *.png.[bg]z = MAGENTA;; *.png.bz2 = MAGENTA;; *.png.Z = MAGENTA;; *.pnm = MAGENTA;; *.pnm.[bg]z = MAGENTA;; *.pnm.bz2 = MAGENTA;; *.pnm.Z = MAGENTA;; *.ppm = MAGENTA;; *.ppm.[bg]z = MAGENTA;; *.ppm.bz2 = MAGENTA;; *.ppm.Z = MAGENTA;; *.pgm = MAGENTA;; *.pgm.[bg]z = MAGENTA;; *.pgm.bz2 = MAGENTA;; *.pgm.Z = MAGENTA;; *.pbm = MAGENTA;; *.pbm.[bg]z = MAGENTA;; *.pbm.bz2 = MAGENTA;; *.pbm.Z = MAGENTA;; *.xbm = MAGENTA;; *.xbm.[bg]z = MAGENTA;; *.xbm.bz2 = MAGENTA;; *.xbm.Z = MAGENTA;; *.xpm = MAGENTA;; *.xpm.[bg]z = MAGENTA;; *.xpm.bz2 = MAGENTA;; *.xpm.Z = MAGENTA;; *.fit = MAGENTA;; *.fit.[bg]z = MAGENTA;; *.fit.bz2 = MAGENTA;; *.fit.Z = MAGENTA;; *.icon = MAGENTA;; *.icon.[bg]z = MAGENTA;; *.icon.bz2 = MAGENTA;; *.icon.Z = MAGENTA;; *.cursor = MAGENTA;; *.cursor.[bg]z = MAGENTA;; *.cursor.bz2 = MAGENTA;; *.cursor.Z = MAGENTA;; *.ras = MAGENTA;; *.ras.[bg]z = MAGENTA;; *.ras.bz2 = MAGENTA;; *.ras.Z = MAGENTA;; *.tga = MAGENTA;; *.tga.[bg]z = MAGENTA;; *.tga.bz2 = MAGENTA;; *.tga.Z = MAGENTA;; *.xcf = MAGENTA;; *.xcf.[bg]z = MAGENTA;; *.xcf.bz2 = MAGENTA;; *.xcf.Z = MAGENTA;; *.pr = MAGENTA;; *.pr.[bg]z = MAGENTA;; *.pr.bz2 = MAGENTA;; *.pr.Z = MAGENTA;; *.rgb = MAGENTA;; *.rgb.[bg]z = MAGENTA;; *.rgb.bz2 = MAGENTA;; *.rgb.Z = MAGENTA;; *.fts = MAGENTA;; *.fts.[bg]z = MAGENTA;; *.fts.bz2 = MAGENTA;; *.fts.Z = MAGENTA;; *.mov = CYAN;; *.mov.[bg]z = CYAN;; *.mov.bz2 = CYAN;; *.mov.Z = CYAN;; *.mpg = CYAN;; *.mpg.[bg]z = CYAN;; *.mpg.bz2 = CYAN;; *.mpg.Z = CYAN;; *.mpeg = CYAN;; *.mpeg.[bg]z = CYAN;; *.mpeg.bz2 = CYAN;; *.mpeg.Z = CYAN;; *.avi = CYAN;; *.avi.[bg]z = CYAN;; *.avi.bz2 = CYAN;; *.avi.Z = CYAN;; *.fli = CYAN;; *.fli.[bg]z = CYAN;; *.fli.bz2 = CYAN;; *.fli.Z = CYAN;; *.flc = CYAN;; *.flc.[bg]z = CYAN;; *.flc.bz2 = CYAN;; *.flc.Z = CYAN;; *.au = CYAN;; *.au.[bg]z = CYAN;; *.au.bz2 = CYAN;; *.au.Z = CYAN;; *.mp3 = CYAN;; *.mp3.[bg]z = CYAN;; *.mp3.bz2 = CYAN;; *.mp3.Z = CYAN;; *.ra = CYAN;; *.ra.[bg]z = CYAN;; *.ra.bz2 = CYAN;; *.ra.Z = CYAN;; *.ram = CYAN;; *.ram.[bg]z = CYAN;; *.ram.bz2 = CYAN;; *.ram.Z = CYAN;; *.mod = CYAN;; *.mod.[bg]z = CYAN;; *.mod.bz2 = CYAN;; *.mod.Z = CYAN;; *.mtm = CYAN;; *.mtm.[bg]z = CYAN;; *.mtm.bz2 = CYAN;; *.mtm.Z = CYAN;; *.xm = CYAN;; *.xm.[bg]z = CYAN;; *.xm.bz2 = CYAN;; *.xm.Z = CYAN;; *.mid = CYAN;; *.mid.[bg]z = CYAN;; *.mid.bz2 = CYAN;; *.mid.Z = CYAN;; *.midi = CYAN;; *.midi.[bg]z = CYAN;; *.midi.bz2 = CYAN;; *.midi.Z = CYAN;; *.s3m = CYAN;; *.s3m.[bg]z = CYAN;; *.s3m.bz2 = CYAN;; *.s3m.Z = CYAN;; *.voc = CYAN;; *.voc.[bg]z = CYAN;; *.voc.bz2 = CYAN;; *.voc.Z = CYAN;; *.aiff = CYAN;; *.aiff.[bg]z = CYAN;; *.aiff.bz2 = CYAN;; *.aiff.Z = CYAN;; *.aifc = CYAN;; *.aifc.[bg]z = CYAN;; *.aifc.bz2 = CYAN;; *.aifc.Z = CYAN;; *.wav = CYAN;; *.wav.[bg]z = CYAN;; *.wav.bz2 = CYAN;; *.wav.Z = CYAN;; *.rmd = CYAN;; *.rmd.[bg]z = CYAN;; *.rmd.bz2 = CYAN;; *.rmd.Z = CYAN;; *.pvf = CYAN;; *.pvf.[bg]z = CYAN;; *.pvf.bz2 = CYAN;; *.pvf.Z = CYAN;; *.tar.[bg]z = RED;; *.tar.bz2 = RED;; *.tar.Z = RED;; *.tgZ = RED;; *.ta[rZ] = RED;; *.trZ = RED;; *.[bg]z = RED;; *.bz2 = RED;; *.Z = RED;; *.zip = RED;; *.jar = RED;; *.arj = RED;; *.a[0-9][1-9] = RED;; *.rar = RED;; *.r[0-9][0-9] = RED;; *.shar = RED;; *.uu = RED;; *.rpm = RED;; *.deb = RED;; .* = CYAN;; ################### ### Color xterm ### ################### [GITFM-Color] TitleForeground = CYAN TitleBackground = BLACK TitleBrightness = OFF UserName = RED TtyName = RED ClockForeground = BLACK ClockBackground = CYAN ClockBrightness = OFF PanelFrame = WHITE PanelBackground = BLACK PanelThumbForeground = BLACK PanelThumbBackground = WHITE PanelThumbBrightness = OFF PanelSelectedFile = YELLOW PanelSelectedFileBrightness = OFF PanelNotSelectedFile = WHITE PanelNotSelectedFileBrightness = OFF PanelCurrentSelectedFile = YELLOW PanelCurrentNotSelectedFile = WHITE PanelCurrentFile = BLUE PanelPath = RED PanelPathBrightness = OFF PanelDeviceFreeSpace = RED PanelDeviceFreeSpaceBrightness = OFF PanelFileInfo = RED PanelFileInfoBrightness = OFF PanelFilesInfo = BLACK PanelFilesInfoBrightness = OFF InputLineForeground = WHITE InputLineBackground = BLACK InputLineBrightness = OFF InputLineErrorForeground = WHITE InputLineErrorBackground = RED InputLineErrorBrightness = OFF StatusBarForeground = BLACK StatusBarBackground = CYAN StatusBarBrightness = OFF StatusBarWarningForeground = BLACK StatusBarWarningBackground = WHITE StatusBarWarningBrightness = OFF StatusBarErrorForeground = WHITE StatusBarErrorBackground = RED StatusBarErrorBrightness = OFF [GITPS-Color] TitleForeground = CYAN TitleBackground = BLUE TitleBrightness = OFF HeaderForeground = CYAN HeaderBackground = RED HeaderBrightness = OFF ScreenForeground = BLACK ScreenBackground = CYAN ScreenBrightness = OFF StatusForeground = CYAN StatusBackground = BLUE StatusBrightness = OFF [GITVIEW-Color] TitleForeground = CYAN TitleBackground = BLUE TitleBrightness = OFF HeaderForeground = CYAN HeaderBackground = RED HeaderBrightness = OFF ScreenForeground = BLACK ScreenBackground = CYAN ScreenBrightness = OFF StatusForeground = CYAN StatusBackground = BLUE StatusBrightness = OFF ######################## ### monochrome xterm ### ######################## [GITFM-Monochrome] TitleForeground = WHITE TitleBackground = BLACK TitleBrightness = ON UserName = WHITE TtyName = WHITE ClockForeground = BLACK ClockBackground = WHITE ClockBrightness = OFF PanelFrame = WHITE PanelBackground = BLACK PanelThumbForeground = BLACK PanelThumbBackground = WHITE PanelThumbBrightness = OFF PanelSelectedFile = WHITE PanelSelectedFileBrightness = ON PanelNotSelectedFile = WHITE PanelNotSelectedFileBrightness = OFF PanelCurrentSelectedFile = WHITE PanelCurrentNotSelectedFile = BLACK PanelCurrentFile = WHITE PanelPath = BLACK PanelPathBrightness = OFF PanelDeviceFreeSpace = BLACK PanelDeviceFreeSpaceBrightness = OFF PanelFileInfo = BLACK PanelFileInfoBrightness = OFF PanelFilesInfo = BLACK PanelFilesInfoBrightness = OFF InputLineForeground = WHITE InputLineBackground = BLACK InputLineBrightness = ON InputLineErrorForeground = WHITE InputLineErrorBackground = BLACK InputLineErrorBrightness = ON StatusBarForeground = BLACK StatusBarBackground = WHITE StatusBarBrightness = OFF StatusBarWarningForeground = BLACK StatusBarWarningBackground = WHITE StatusBarWarningBrightness = OFF StatusBarErrorForeground = BLACK StatusBarErrorBackground = WHITE StatusBarErrorBrightness = OFF [GITPS-Monochrome] TitleForeground = BLACK TitleBackground = WHITE TitleBrightness = OFF HeaderForeground = WHITE HeaderBackground = BLACK HeaderBrightness = ON ScreenForeground = WHITE ScreenBackground = BLACK ScreenBrightness = OFF StatusForeground = BLACK StatusBackground = WHITE StatusBrightness = OFF [GITVIEW-Monochrome] TitleForeground = BLACK TitleBackground = WHITE TitleBrightness = OFF HeaderForeground = WHITE HeaderBackground = BLACK HeaderBrightness = ON ScreenForeground = WHITE ScreenBackground = BLACK ScreenBrightness = OFF StatusForeground = BLACK StatusBackground = WHITE StatusBrightness = OFF ### ### COMMAND FORMAT: ### key = command name; formatted command; new dir; save screen; pause; hide ### ### DEFAULTS: ### save screen = y ### pause = n ### hide = n ### ### PLEASE READ THE INFO DOCUMENTATION FOR DETAILS ### BRIEF: ### ### FORMAT SPECIFIERS: ### - %s{question,default_answer} ### - %?{confirmation} ### ### - %f file (not directory) ### - %d directory (not file) ### - %l symbolic link ### - %t fifo ### - %z socket ### - %a any type of directory entry (file, directory, link, fifo, socket) ### - %m current entry mode ### - %g current entry group ### - %o current entry owner ### - %p current panel path ### - %b current panel directory name ### - %i current panel selected or current entry ### ### **** For the other panel: ***** ### ### - %F file (not directory) ### - %D directory (not file) ### - %L symbolic link ### - %T fifo ### - %Z socket ### - %A any type of directory entry (file, directory, link, fifo, socket) ### - %M current entry mode ### - %G current entry group ### - %O current entry owner ### - %P the other panel path ### - %B the other panel directory name ### - %I the other panel selected or current entry ### ### For faster startup, try to keep this entries sorted alphabetically, ### at least locally. The order is given by the key sequence. ### ### ### Key sequences starting with characters between ' ' and '~' are IGNORED! ### [GITFM-Keys] ^[[A = previous-line ^[[B = next-line ^[[C = forward-char ^[[D = backward-char ^[OB = next-line ^[OC = forward-char ^[OD = backward-char ^[[2~ = select-entry ^[[5~ = scroll-down # PGUP ^[[6~ = scroll-up # PGDOWN ^[[7~ = beginning-of-panel # HOME ^[[8~ = end-of-panel # END ^[[H = beginning-of-panel # HOME ^[[F = end-of-panel # END ^[Ow = end-of-panel # END ^[[11~ = INFO; info %s{Info documentation: ,} # F1 (HP-UX xterm) ^[[12~ = FILE-ACTION; gitaction %p %f # F2 (HP-UX xterm) ^[[13~ = VIEW; gitview %f;;n # F3 (HP-UX xterm) ^[[14~ = EDIT; $GNUIT_EDITOR %f;;n # F4 (HP-UX xterm) ^[[15~ = copy # F5 (HP-UX xterm) ^[OP = INFO; info %s{Info documentation: ,} # F1 ^[OQ = FILE-ACTION; gitaction %p %f # F2 ^[OR = VIEW; gitview %f;;n # F3 ^[OS = EDIT; $GNUIT_EDITOR %f;;n # F4 ^[[28~ = INFO; info %s{Info documentation: ,} # F1 ^[[33~ = FILE-ACTION; gitaction %p %f # F2 ^[[34~ = VIEW; gitview %f;;n # F3 ^[[29~ = EDIT; $GNUIT_EDITOR %f;;n # F4 ^[[32~ = copy # F5 ^[[17~ = move # F6 ^[[18~ = make-directory # F7 ^[[19~ = delete # F8 ^[[20~ = MAKE; make %s{Options: ,-k };;;y # F9 ^[[21~ = exit # F10 ^[[23~ = GITPS; gitps;;n # F11 ^[[24~ = READ-MAIL; $GNUIT_RMAIL;;n # F12 ### ### Only key sequences starting with characters between ' ' and '~' are ### ALLOWED. ### [GITPS-Keys] ^[[A = previous-line ^[[B = next-line ^[[5~ = scroll-down # PGUP ^[[D = scroll-down # PGUP ^[[6~ = scroll-up # PGDOWN ^[[C = scroll-up # PGDOWN ^[[H = beginning-of-list # HOME ^[[F = end-of-list # END ^[OA = previous-line ^[OB = next-line ^[OC = scroll-up ^[OD = scroll-down ^[[21~ = exit # F10 ### ### Key sequences starting with characters between ' ' and '~' are IGNORED! ### [GITVIEW-Keys] ^[[A = previous-line ^[[B = next-line ^[[H = beginning-of-file # HOME ^[[F = end-of-file # END ^[[5~ = scroll-down # PGUP ^[[D = scroll-down # PGUP ^[[6~ = scroll-up # PGDOWN ^[[C = scroll-up # PGDOWN ^[OA = previous-line ^[OB = next-line ^[OC = scroll-up ^[OD = scroll-down ^[[21~ = exit # F10 gnuit-4.9.5/missing0000755000175000017500000002540611146671376011222 00000000000000#! /bin/sh # Common stub for a few missing GNU programs while installing. scriptversion=2005-06-08.21 # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005 # 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=: # 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' 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 's/.*--output[ =]*\([^ ]*\).*/\1/p'` test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'` 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 [ $# -ne 1 ]; then eval LASTARG="\${$#}" case "$LASTARG" in *.y) SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" y.tab.c fi SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" y.tab.h fi ;; esac fi if [ ! -f y.tab.h ]; then echo >y.tab.h fi if [ ! -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 [ $# -ne 1 ]; then eval LASTARG="\${$#}" case "$LASTARG" in *.l) SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" lex.yy.c fi ;; esac fi if [ ! -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 's/.*-o \([^ ]*\).*/\1/p'` if test -z "$file"; then file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'` fi if [ -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 's/.*-o \([^ ]*\).*/\1/p'` 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: gnuit-4.9.5/.gitignore0000644000175000017500000000170011146671375011601 00000000000000*~ *.o TAGS LSM Makefile build-stamp config.h config.log config.status gnuit.spec stamp-h1 version.h debian/files debian/git.substvars debian/gnuit.substvars debian/git debian/gnuit debian/git.debhelper.log debian/gnuit.debhelper.log doc/gnuit.html lib/Makefile lib/alloca.h lib/fcntl.h lib/inttypes.h lib/libgnu.a lib/signal.h lib/.deps lib/uniwidth/.deps src/.deps src/gitfm src/gitkeys src/gitps src/gitview src/gitwhich src/gitwipe term/gnuitrc.aixterm term/gnuitrc.ansi term/gnuitrc.common term/gnuitrc.generic term/gnuitrc.hft term/gnuitrc.hpterm term/gnuitrc.linux term/gnuitrc.linux-m term/gnuitrc.mach term/gnuitrc.minix term/gnuitrc.thix term/gnuitrc.vt100 term/gnuitrc.vt102 term/gnuitrc.xterm term/gnuitrc.xterm-color debian/gnuit.postinst.debhelper debian/gnuit.prerm.debhelper lib/charset.alias lib/configmake.h lib/ref-add.sed lib/ref-del.sed lib/stdlib.h lib/string.h lib/strings.h lib/sys/stat.h lib/unistd.h lib/uniwidth/.dirstamp lib/time.h gnuit-4.9.5/config.guess0000755000175000017500000012753411146671375012147 00000000000000#! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 # Free Software Foundation, Inc. timestamp='2008-01-23' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # 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 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 Per Bothner . # Please send patches to . Submit a context # diff and a properly formatted ChangeLog entry. # # This script attempts to guess a canonical system name similar to # config.sub. If it succeeds, it prints the system name on stdout, and # exits with 0. Otherwise, it exits with 1. # # The plan is that this can be called by configure scripts if you # don't specify an explicit build system type. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] Output the configuration name of the system \`$me' is run on. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" >&2 exit 1 ;; * ) break ;; esac done if test $# != 0; then echo "$me: too many arguments$help" >&2 exit 1 fi trap 'exit 1' 1 2 15 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a # headache to deal with in a portable fashion. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still # use `HOST_CC' if defined, but it is deprecated. # Portable tmp directory creation inspired by the Autoconf team. set_cc_for_build=' trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; : ${TMPDIR=/tmp} ; { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; dummy=$tmp/dummy ; tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; case $CC_FOR_BUILD,$HOST_CC,$CC in ,,) echo "int x;" > $dummy.c ; for c in cc gcc c89 c99 ; do if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then CC_FOR_BUILD="$c"; break ; fi ; done ; if test x"$CC_FOR_BUILD" = x ; then CC_FOR_BUILD=no_compiler_found ; fi ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; esac ; set_cc_for_build= ;' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) if (test -f /.attbin/uname) >/dev/null 2>&1 ; then PATH=$PATH:/.attbin ; export PATH fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward # compatibility and a consistent mechanism for selecting the # object file format. # # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". sysctl="sysctl -n hw.machine_arch" UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ /usr/sbin/$sysctl 2>/dev/null || echo unknown)` case "${UNAME_MACHINE_ARCH}" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; sh5el) machine=sh5le-unknown ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently, or will in the future. case "${UNAME_MACHINE_ARCH}" in arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep __ELF__ >/dev/null then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? os=netbsd else os=netbsdelf fi ;; *) os=netbsd ;; esac # The OS release # Debian GNU/NetBSD machines have a different userland, and # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. case "${UNAME_VERSION}" in Debian*) release='-gnu' ;; *) release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" exit ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} exit ;; *:ekkoBSD:*:*) echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} exit ;; *:SolidBSD:*:*) echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} exit ;; macppc:MirBSD:*:*) echo powerpc-unknown-mirbsd${UNAME_RELEASE} exit ;; *:MirBSD:*:*) echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` ;; *5.*) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ;; esac # According to Compaq, /usr/sbin/psrinfo has been available on # OSF/1 and Tru64 systems produced since 1995. I hope that # covers most systems running today. This code pipes the CPU # types through head -n 1, so we only detect the type of CPU 0. ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` case "$ALPHA_CPU_TYPE" in "EV4 (21064)") UNAME_MACHINE="alpha" ;; "EV4.5 (21064)") UNAME_MACHINE="alpha" ;; "LCA4 (21066/21068)") UNAME_MACHINE="alpha" ;; "EV5 (21164)") UNAME_MACHINE="alphaev5" ;; "EV5.6 (21164A)") UNAME_MACHINE="alphaev56" ;; "EV5.6 (21164PC)") UNAME_MACHINE="alphapca56" ;; "EV5.7 (21164PC)") UNAME_MACHINE="alphapca57" ;; "EV6 (21264)") UNAME_MACHINE="alphaev6" ;; "EV6.7 (21264A)") UNAME_MACHINE="alphaev67" ;; "EV6.8CB (21264C)") UNAME_MACHINE="alphaev68" ;; "EV6.8AL (21264B)") UNAME_MACHINE="alphaev68" ;; "EV6.8CX (21264D)") UNAME_MACHINE="alphaev68" ;; "EV6.9A (21264/EV69A)") UNAME_MACHINE="alphaev69" ;; "EV7 (21364)") UNAME_MACHINE="alphaev7" ;; "EV7.9 (21364A)") UNAME_MACHINE="alphaev79" ;; esac # A Pn.n version is a patched version. # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` exit ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead # of the specific Alpha model? echo alpha-pc-interix exit ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit ;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit ;; *:[Mm]orph[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-morphos exit ;; *:OS/390:*:*) echo i370-ibm-openedition exit ;; *:z/VM:*:*) echo s390-ibm-zvmoe exit ;; *:OS400:*:*) echo powerpc-ibm-os400 exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit ;; arm:riscos:*:*|arm:RISCOS:*:*) echo arm-unknown-riscos exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit ;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then echo pyramid-pyramid-sysv3 else echo pyramid-pyramid-bsd fi exit ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit ;; DRS?6000:unix:4.0:6*) echo sparc-icl-nx6 exit ;; DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) case `/usr/bin/uname -p` in sparc) echo sparc-icl-nx7; exit ;; esac ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in Series*|S4*) UNAME_RELEASE=`uname -v` ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` exit ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} exit ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) echo m68k-sun-sunos${UNAME_RELEASE} ;; sun4) echo sparc-sun-sunos${UNAME_RELEASE} ;; esac exit ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor # > m68000). The system name ranges from "MiNT" over "FreeMiNT" # to the lowercase version "mint" (or "freemint"). Finally # the system name "TOS" denotes a system which is actually not # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint${UNAME_RELEASE} exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} exit ;; m68k:machten:*:*) echo m68k-apple-machten${UNAME_RELEASE} exit ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} exit ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} exit ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} exit ;; mips:*:*:UMIPS | mips:*:*:RISCos) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); #endif #endif exit (-1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && SYSTEM_NAME=`$dummy $dummyarg` && { echo "$SYSTEM_NAME"; exit; } echo mips-mips-riscos${UNAME_RELEASE} exit ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax exit ;; Motorola:*:4.3:PL8-*) echo powerpc-harris-powermax exit ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) echo powerpc-harris-powermax exit ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 exit ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 exit ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 exit ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ [ ${TARGET_BINARY_INTERFACE}x = x ] then echo m88k-dg-dgux${UNAME_RELEASE} else echo m88k-dg-dguxbcs${UNAME_RELEASE} fi else echo i586-dg-dgux${UNAME_RELEASE} fi exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 exit ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 exit ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd exit ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` exit ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix exit ;; ia64:AIX:*:*) if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} exit ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include main() { if (!__power_pc()) exit(1); puts("powerpc-ibm-aix3.2.5"); exit(0); } EOF if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` then echo "$SYSTEM_NAME" else echo rs6000-ibm-aix3.2.5 fi elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 else echo rs6000-ibm-aix3.2 fi exit ;; *:AIX:*:[456]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} exit ;; *:AIX:*:*) echo rs6000-ibm-aix exit ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 exit ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx exit ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 exit ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd exit ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 exit ;; 9000/[34678]??:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` case "${UNAME_MACHINE}" in 9000/31? ) HP_ARCH=m68000 ;; 9000/[34]?? ) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` case "${sc_cpu_version}" in 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 case "${sc_kernel_bits}" in 32) HP_ARCH="hppa2.0n" ;; 64) HP_ARCH="hppa2.0w" ;; '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 esac ;; esac fi if [ "${HP_ARCH}" = "" ]; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #define _HPUX_SOURCE #include #include int main () { #if defined(_SC_KERNEL_BITS) long bits = sysconf(_SC_KERNEL_BITS); #endif long cpu = sysconf (_SC_CPU_VERSION); switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0"); break; case CPU_PA_RISC1_1: puts ("hppa1.1"); break; case CPU_PA_RISC2_0: #if defined(_SC_KERNEL_BITS) switch (bits) { case 64: puts ("hppa2.0w"); break; case 32: puts ("hppa2.0n"); break; default: puts ("hppa2.0"); break; } break; #else /* !defined(_SC_KERNEL_BITS) */ puts ("hppa2.0"); break; #endif default: puts ("hppa1.0"); break; } exit (0); } EOF (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac if [ ${HP_ARCH} = "hppa2.0w" ] then eval $set_cc_for_build # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler # generating 64-bit code. GNU and HP use different nomenclature: # # $ CC_FOR_BUILD=cc ./config.guess # => hppa2.0w-hp-hpux11.23 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess # => hppa64-hp-hpux11.23 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | grep __LP64__ >/dev/null then HP_ARCH="hppa2.0w" else HP_ARCH="hppa64" fi fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit ;; ia64:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux${HPUX_REV} exit ;; 3050*:HI-UX:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include int main () { long cpu = sysconf (_SC_CPU_VERSION); /* The order matters, because CPU_IS_HP_MC68K erroneously returns true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct results, however. */ if (CPU_IS_PA_RISC (cpu)) { switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; default: puts ("hppa-hitachi-hiuxwe2"); break; } } else if (CPU_IS_HP_MC68K (cpu)) puts ("m68k-hitachi-hiuxwe2"); else puts ("unknown-hitachi-hiuxwe2"); exit (0); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } echo unknown-hitachi-hiuxwe2 exit ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd exit ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf exit ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi exit ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd exit ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd exit ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*[A-Z]90:*:*:*) echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' exit ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; *:UNICOS/mp:*:*) echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; 5000:UNIX_System_V:4.*:*) FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} exit ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit ;; *:FreeBSD:*:*) case ${UNAME_MACHINE} in pc98) echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; amd64) echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; *) echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; esac exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; i*:windows32*:*) # uname -m includes "-pc" on this system. echo ${UNAME_MACHINE}-mingw32 exit ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; *:Interix*:[3456]*) case ${UNAME_MACHINE} in x86) echo i586-pc-interix${UNAME_RELEASE} exit ;; EM64T | authenticamd) echo x86_64-unknown-interix${UNAME_RELEASE} exit ;; IA64) echo ia64-unknown-interix${UNAME_RELEASE} exit ;; esac ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we # UNAME_MACHINE based on the output of uname instead of i386? echo i586-pc-interix exit ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin exit ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) echo x86_64-unknown-cygwin exit ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin exit ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; *:GNU:*:*) # the GNU system echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; arm*:Linux:*:*) eval $set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then echo ${UNAME_MACHINE}-unknown-linux-gnu else echo ${UNAME_MACHINE}-unknown-linux-gnueabi fi exit ;; avr32*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; cris:Linux:*:*) echo cris-axis-linux-gnu exit ;; crisv32:Linux:*:*) echo crisv32-axis-linux-gnu exit ;; frv:Linux:*:*) echo frv-unknown-linux-gnu exit ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; m32r*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; mips:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef mips #undef mipsel #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=mipsel #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=mips #else CPU= #endif #endif EOF eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' /^CPU/{ s: ::g p }'`" test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; mips64:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef mips64 #undef mips64el #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=mips64el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=mips64 #else CPU= #endif #endif EOF eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' /^CPU/{ s: ::g p }'`" test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; or32:Linux:*:*) echo or32-unknown-linux-gnu exit ;; ppc:Linux:*:*) echo powerpc-unknown-linux-gnu exit ;; ppc64:Linux:*:*) echo powerpc64-unknown-linux-gnu exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; EV56) UNAME_MACHINE=alphaev56 ;; PCA56) UNAME_MACHINE=alphapca56 ;; PCA57) UNAME_MACHINE=alphapca56 ;; EV6) UNAME_MACHINE=alphaev6 ;; EV67) UNAME_MACHINE=alphaev67 ;; EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in PA7*) echo hppa1.1-unknown-linux-gnu ;; PA8*) echo hppa2.0-unknown-linux-gnu ;; *) echo hppa-unknown-linux-gnu ;; esac exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-gnu exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux exit ;; sh64*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; vax:Linux:*:*) echo ${UNAME_MACHINE}-dec-linux-gnu exit ;; x86_64:Linux:*:*) echo x86_64-unknown-linux-gnu exit ;; xtensa*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; i*86:Linux:*:*) # The BFD linker knows what the default object file format is, so # first see if it will tell us. cd to the root directory to prevent # problems with other programs or directories called `ld' in the path. # Set LC_ALL=C to ensure ld outputs messages in English. ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ | sed -ne '/supported targets:/!d s/[ ][ ]*/ /g s/.*supported targets: *// s/ .*// p'` case "$ld_supported_targets" in elf32-i386) TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" ;; a.out-i386-linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" exit ;; coff-i386) echo "${UNAME_MACHINE}-pc-linux-gnucoff" exit ;; "") # Either a pre-BFD a.out linker (linux-gnuoldld) or # one that does not give us useful --help. echo "${UNAME_MACHINE}-pc-linux-gnuoldld" exit ;; esac # Determine whether the default compiler is a.out or elf eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include #ifdef __ELF__ # ifdef __GLIBC__ # if __GLIBC__ >= 2 LIBC=gnu # else LIBC=gnulibc1 # endif # else LIBC=gnulibc1 # endif #else #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) LIBC=gnu #else LIBC=gnuaout #endif #endif #ifdef __dietlibc__ LIBC=dietlibc #endif EOF eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' /^LIBC/{ s: ::g p }'`" test x"${LIBC}" != x && { echo "${UNAME_MACHINE}-pc-linux-${LIBC}" exit } test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; } ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. echo i386-sequent-sysv4 exit ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. echo ${UNAME_MACHINE}-pc-os2-emx exit ;; i*86:XTS-300:*:STOP) echo ${UNAME_MACHINE}-unknown-stop exit ;; i*86:atheos:*:*) echo ${UNAME_MACHINE}-unknown-atheos exit ;; i*86:syllable:*:*) echo ${UNAME_MACHINE}-pc-syllable exit ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit ;; i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp exit ;; i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} else echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi exit ;; i*86:*:5:[678]*) # UnixWare 7.x, OpenUNIX and OpenServer 6. case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} exit ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else echo ${UNAME_MACHINE}-pc-sysv32 fi exit ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i386. echo i386-pc-msdosdjgpp exit ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit ;; paragon:*:*:*) echo i860-intel-osf1 exit ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 fi exit ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv exit ;; mc68k:UNIX:SYSTEM5:3.51m) echo m68k-convergent-sysv exit ;; M680?0:D-NIX:5.3:*) echo m68k-diab-dnix exit ;; M68*:*:R3V[5678]*:*) test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} exit ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 exit ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` echo ${UNAME_MACHINE}-sni-sysv4 else echo ns32k-sni-sysv fi exit ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says echo i586-unisys-sysv4 exit ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 exit ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. echo ${UNAME_MACHINE}-stratus-vos exit ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos exit ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then echo mips-nec-sysv${UNAME_RELEASE} else echo mips-unknown-sysv${UNAME_RELEASE} fi exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos exit ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} exit ;; SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} exit ;; SX-7:SUPER-UX:*:*) echo sx7-nec-superux${UNAME_RELEASE} exit ;; SX-8:SUPER-UX:*:*) echo sx8-nec-superux${UNAME_RELEASE} exit ;; SX-8R:SUPER-UX:*:*) echo sx8r-nec-superux${UNAME_RELEASE} exit ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown case $UNAME_PROCESSOR in unknown) UNAME_PROCESSOR=powerpc ;; esac echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = "x86"; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} exit ;; *:QNX:*:4*) echo i386-pc-qnx exit ;; NSE-?:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit ;; NSR-?:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux exit ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv exit ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} exit ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. if test "$cputype" = "386"; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" fi echo ${UNAME_MACHINE}-unknown-plan9 exit ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 exit ;; *:TENEX:*:*) echo pdp10-unknown-tenex exit ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 exit ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 exit ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 exit ;; *:ITS:*:*) echo pdp10-unknown-its exit ;; SEI:*:*:SEIUX) echo mips-sei-seiux${UNAME_RELEASE} exit ;; *:DragonFly:*:*) echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` case "${UNAME_MACHINE}" in A*) echo alpha-dec-vms ; exit ;; I*) echo ia64-dec-vms ; exit ;; V*) echo vax-dec-vms ; exit ;; esac ;; *:XENIX:*:SysV) echo i386-pc-xenix exit ;; i*86:skyos:*:*) echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' exit ;; i*86:rdos:*:*) echo ${UNAME_MACHINE}-pc-rdos exit ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 eval $set_cc_for_build cat >$dummy.c < # include #endif main () { #if defined (sony) #if defined (MIPSEB) /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, I don't know.... */ printf ("mips-sony-bsd\n"); exit (0); #else #include printf ("m68k-sony-newsos%s\n", #ifdef NEWSOS4 "4" #else "" #endif ); exit (0); #endif #endif #if defined (__arm) && defined (__acorn) && defined (__unix) printf ("arm-acorn-riscix\n"); exit (0); #endif #if defined (hp300) && !defined (hpux) printf ("m68k-hp-bsd\n"); exit (0); #endif #if defined (NeXT) #if !defined (__ARCHITECTURE__) #define __ARCHITECTURE__ "m68k" #endif int version; version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; if (version < 4) printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); else printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); exit (0); #endif #if defined (MULTIMAX) || defined (n16) #if defined (UMAXV) printf ("ns32k-encore-sysv\n"); exit (0); #else #if defined (CMU) printf ("ns32k-encore-mach\n"); exit (0); #else printf ("ns32k-encore-bsd\n"); exit (0); #endif #endif #endif #if defined (__386BSD__) printf ("i386-pc-bsd\n"); exit (0); #endif #if defined (sequent) #if defined (i386) printf ("i386-sequent-dynix\n"); exit (0); #endif #if defined (ns32000) printf ("ns32k-sequent-dynix\n"); exit (0); #endif #endif #if defined (_SEQUENT_) struct utsname un; uname(&un); if (strncmp(un.version, "V2", 2) == 0) { printf ("i386-sequent-ptx2\n"); exit (0); } if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ printf ("i386-sequent-ptx1\n"); exit (0); } printf ("i386-sequent-ptx\n"); exit (0); #endif #if defined (vax) # if !defined (ultrix) # include # if defined (BSD) # if BSD == 43 printf ("vax-dec-bsd4.3\n"); exit (0); # else # if BSD == 199006 printf ("vax-dec-bsd4.3reno\n"); exit (0); # else printf ("vax-dec-bsd\n"); exit (0); # endif # endif # else printf ("vax-dec-bsd\n"); exit (0); # endif # else printf ("vax-dec-ultrix\n"); exit (0); # endif #endif #if defined (alliant) && defined (i860) printf ("i860-alliant-bsd\n"); exit (0); #endif exit (1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } # Apollos put the system type in the environment. test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } # Convex versions that predate uname can use getsysinfo(1) if [ -x /usr/convex/getsysinfo ] then case `getsysinfo -f cpu_type` in c1*) echo c1-convex-bsd exit ;; c2*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; c34*) echo c34-convex-bsd exit ;; c38*) echo c38-convex-bsd exit ;; c4*) echo c4-convex-bsd exit ;; esac fi cat >&2 < in order to provide the needed information to handle your system. config.guess timestamp = $timestamp 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` /bin/uname -X = `(/bin/uname -X) 2>/dev/null` hostinfo = `(hostinfo) 2>/dev/null` /bin/universe = `(/bin/universe) 2>/dev/null` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` /bin/arch = `(/bin/arch) 2>/dev/null` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` UNAME_MACHINE = ${UNAME_MACHINE} UNAME_RELEASE = ${UNAME_RELEASE} UNAME_SYSTEM = ${UNAME_SYSTEM} UNAME_VERSION = ${UNAME_VERSION} EOF exit 1 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: gnuit-4.9.5/doc/0000777000175000017500000000000011146672053010436 500000000000000gnuit-4.9.5/doc/gnuit.html0000644000175000017500000205117611146672053012402 00000000000000 GNU Interactive Tools
[Top] [Contents] [Index] [ ? ]

GNU Interactive Tools

 
START-INFO-DIR-ENTRY
* gnuit: (gnuit).         GNU Interactive Tools
END-INFO-DIR-ENTRY

GNUIT is a package containing a file system browser, a process viewer/killer and an ASCII/HEX file viewer. This is edition 2.9.4, for GNU Interactive Tools version 4.9.5.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

1. Introduction

GNUIT is a set of interactive tools. It contains an extensible file system browser, an ascii/hex file viewer, a process viewer/killer and some other related utilities and shell scripts. It can be used to increase the speed and efficiency of most of the daily tasks such as copying and moving files and directories, invoking editors, compressing and uncompressing files, creating and expanding archives, compiling programs, sending mail, etc. It looks nice, has colors (if the standard ANSI color sequences are supported) and is user-friendly.

GNUIT runs on a wide variety of UNIX systems because it uses the GNU Autoconf package to get system specific information. Please refer to the PLATFORMS file included in the standard distribution for a detailed list of systems on which GNUIT has been tested.

One of the main advantages of GNUIT is its flexibility. It is not limited to a given set of commands. The configuration file can be easily enhanced, allowing the user to add new commands or file operations, depending on its needs or preferences.

GNUIT also provides a shell like command prompt, just to make sure that the entire power of the UNIX shell commands is still there.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

2. Distributing GNU Interactive Tools

GNUIT is "free software"; this means that everyone is free to use it and free to redistribute it on certain conditions. GNUIT is not in the public domain; it is copyrighted and there are restrictions on its distribution, but these restrictions are designed to permit everything that a good cooperating citizen would want to do. What is not allowed is to try to prevent others from further sharing any version of GNUIT that they might get from you. The precise conditions are found in the GNU General Public License that comes with GNUIT and also appears following this section.

The easiest way to get a copy of GNUIT is from someone else who has it. You need not ask for our permission to do so, or tell any one else; just copy it. If you have access to the Internet, you can get the latest distribution version of GNUIT from host ‘ftp.gnu.org’ using anonymous login. See the file `/pub/gnu/GETTING.GNU.SOFTWARE' on that host to find out about your options for copying and which files to use.

You may also receive GNU Interactive Tools when you buy a computer. Computer manufacturers are free to distribute copies on the same terms that apply to everyone else. These terms require them to give you the full sources, including whatever changes they may have made, and to permit you to redistribute the GNU Interactive Tools received from them under the usual terms of the General Public License. In other words, the program must be free for you when you get it, not just free for the manufacturer.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3. Using GNU Interactive Tools

The GNUIT package contains three interactive programs and a few additional utilities. Here there is a description of each of them.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.1 The GIT file system browser

gitfm is a file system browser with some shell like features designed to make your work much easier and much efficient. It displays one or two panels, each one containing a file system directory. You can browse the directory tree with the usual cursor keys, pressing ENTER when you want to enter or leave a directory and TAB when you want to change the panels.

Under the two panels there is a shell like input line which you can use to type normal shell commands. The input line can handle an unlimited number of characters and keeps a history of typed commands (using the GNU history library).

Under the input line there is a status bar. You can see there the status of the currently executed command, the warnings and errors and you will be prompted if a decision has to be taken.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.1.1 Key binding conventions

gitfm now follows a new, easy to remember, scheme to bind commands on keys. This is only a convention, if you define new key bindings you may, or may not follow it.

All the file commands start with ^C. This prefix can be followed by some modifiers, in order to affect the default behavior of the given command. These modifiers are b and r.

b - this modifier specifies that the command will run in background:

 
	^CM = CHMOD; chmod %s{New mode of %i: ,%m} %i;;;;y

defines a command that changes the current selected files mode in foreground, while

 
	^CbM = B-CHMOD; chmod %s{New mode of %i: ,%m} %i&;;;;y

defines a background command that does the same thing.

r - this modifier specifies that the command will be run recursively:

 
	^CrM = R-CHMOD; chmod -R %s{New mode of %i: ,} %i;;;;y

defines a command that recursively changes the mode of the selected entries.

The b and r modifiers can be combined, the resulting command running recursively and in background:

 
	^CbrM = B-R-CHMOD; chmod -R %s{New mode of %i: ,} %i&;;;;y

You should also note that for some commands (like gzip) there is no need for a non-recursive version. Running gzip recursively on files is harmless. If there is a directory between these files, gzip will recursively compress that directory, so you can use the same key binding for recursively and non-recursively compressing. In fact, it is a matter of selecting files or directories.

Unfortunately, we can't run chmod recursively trying to change the mode of all the files in a directory to 0644 because that directory might contain subdirectories and removing the execution permission from them is a bad idea. So, in this case, we need separate commands.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.1.2 Command line

This is a brief description of the command line arguments.

-h print this help message

-v print the version number

-c use ANSI colors

-b don't use ANSI colors

-l don't use the last screen character

-p output final path at exit

The -p option can be used to make gitfm force bash (assuming that you're using it as your shell) chdir to the last directory gitfm was in before quitting. In order to do this, you need to invoke gitfm using this function (put it into your .profile):

 
function g
{
    gitfm -p $ 3> /tmp/gitfm.p.$$

    if test -s /tmp/gitfm.p.$$; then
	if test -d "`cat /tmp/gitfm.p.$$`"; then
	    cd "`cat /tmp/gitfm.p.$$`"
	else
	    cd
	fi
    fi

    rm -f /tmp/gitfm.p.$$
}

This will not work if you suspend gitfm. Nothing bad will happen, just the chdir will not be performed.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.1.3 Panel modes

gitfm has three major modes of displaying the panels. In the first (default) mode, two panels are displayed, each one using half of the screen. In the second mode, only one panel uses the entire screen. In the third mode, only the status bar and the input line are displayed, both panels being hidden.

Briefly, a panel can use the entire screen or just half of it. Even when a panel is hidden, it still exists.

Users can switch between these three major modes as needed:

^X 0

 
Enlarges the other panel to use the entire screen.  It also changes the
minor mode to ‘Enable all’.  The current panel will become
invisible (‘enlarge-other-panel’).

^X 1

 
Enlarges the current panel to use the entire screen.  It also changes
the minor mode to ‘Enable all’.  The other panel will become
invisible (‘enlarge-panel’).

^X 2

 
Switches back to the two panel mode (‘two-panel-mode’).

^O, ESC o

 
Switches to the tty mode (no panels on the screen) (‘tty-mode’).

A panel displays the files and subdirectories in a directory. You can optionally specify some additional information about each entry (file, directory, …) to be displayed (a minor mode).

When using the full screen mode, all the minor modes here can be used. In half screen mode, the ‘panel-enable-all’ mode is not available.

These are the panel minor modes:

ESC e o

 
Display the entry owner and group (‘panel-enable-owner-group’).

ESC e d

 
Display the entry date and time (‘panel-enable-date-time’).

ESC e s

 
Display the entry size (‘panel-enable-size’).

ESC e S

 
Display the entry size, scaled (e.g. ‘123M’) (‘panel-enable-abbrevsize’).

ESC e m

 
Display the entry mode (‘panel-enable-mode’).

ESC e f

 
Display the entry full name (‘panel-enable-full-name’).

ESC e a

 
Display the entire information about file (‘panel-enable-all’).
This mode is only available if the panel has been enlarged to use the
entire screen with ‘enlarge-panel’ or ‘enlarge-other-panel’
(‘panel-enable-all’).

There is another way of changing the panel minor modes:

^], ^[]

 
Switches to the next panel minor mode (‘panel-enable-next-mode’).

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.1.4 Sorting methods

Entries in a panel can be sorted in different ways. These are the available options:

ESC s n

 
Display the panel entries sorted by their names
(‘panel-sort-by-name’).

ESC s e

 
Display the panel entries sorted by their extensions
(‘panel-sort-by-extension’).

ESC s s

 
Display the panel entries sorted by their sizes
(‘panel-sort-by-size’).

ESC s d

 
Display the panel entries sorted by their ‘last modified’ stamps
(‘panel-sort-by-date’).

ESC s m

 
Display the panel entries sorted by their modes
(‘panel-sort-by-mode’).

ESC s o i

 
Display the panel entries sorted by their owner ids
(‘panel-sort-by-owner-id’).

ESC s g i

 
Display the panel entries sorted by their group ids
(‘panel-sort-by-group-id’).

ESC s o n

 
Display the panel entries sorted by their owner names
(‘panel-sort-by-owner-name’).

ESC s g n

 
Display the panel entries sorted by their group names
(‘panel-sort-by-group-name’).

There is also another way to change the sort method:

ESC s u

 
Switch to the next panel sort method (‘panel-sort-next-method’).

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.1.5 Moving the cursor in the panel

Moving the cursor in the panel is very easy. If your keyboard has arrows, use them. If the arrow keys don't work (it might be due to a badly configured TERM environment variable), you can use the Emacs commands bindings as well.

UP, ^P

 
Move the cursor vertically up one entry (‘previous-line’).

DOWN, ^N

 
Move the cursor vertically down one entry (‘next-line’).

HOME, ESC <

 
Move the cursor on the first entry in the panel
(‘beginning-of-panel’).

END, ESC >

 
Move the cursor on the last entry in the panel (‘end-of-panel’).

PGUP, ESC v

 
Move the cursor vertically down one page (‘scroll-down’).

PGDOWN, ^V

 
Move the cursor vertically down one page (‘scroll-up’).

ESC g

 
Scroll the panel entries to the left (‘horizontal-scroll-left’).

ESC j

 
Scroll the panel entries to the right (‘horizontal-scroll-right’).

^X P

 
In order to optimize the screen output, you can modify the scroll step
(‘set-scroll-step’).  This is the number of lines to try scrolling
a panel when the cursor moves out.  The ‘StartupScrollStep’
specifies the initial scroll step, but using ‘set-scroll-step’ you
can dynamically change it.

TAB, ^I, ^X o

 
Move the cursor in the other panel (‘other-panel’).

^X P

 
Switch the two panels.  This command works even when gitfm is not
in the ‘two panels’ mode (‘switch-panels’).

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.1.6 Selecting files

INS, ^T, ^X \, ^\

 
Toggle the ‘selected’ flag of the current entry
(‘select-entry’).

^C s

 
Select (marks) all the files matching at least one pattern from a space
separated list of shell patterns.  Spaces and \s are allowed in the
patterns but they have to be escaped with a \.  The user will be
prompted for a pattern to match against
(‘select-files-matching-pattern’).

^C u

 
Unselect (unmarks) all the files matching at least one pattern from a
space separated list of shell patterns.  Spaces and \s are allowed in
the patterns but they have to be escaped with a \.  The user will be
prompted for a pattern to match against
(‘unselect-files-matching-pattern’).

ESC +

 
Select (marks) all the files having the same extension as the current
file.  If the current file name doesn't have an extension or starts with
a dot, no files are selected (‘select-extension’).

ESC -

 
Unselect (unmarks) all the files having the same extension as the
current file.  If the current file name doesn't have an extension or
starts with a dot, no files are unselected (‘unselect-extension’).

See section Selecting files matching patterns, for additional ways of selecting and unselecting files.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.1.7 Incremental searching files in a panel

Users sometime need to search a file in a panel, especially when the panel contains a big number of entries. For that reason gitfm provides an incremental search feature. Using forward and backward incremental search, files can be very easy located. Wrapped incremental search is also provided.

^S, ^Xs

 
Incremental search forward a file name in the current panel
(‘isearch-forward’).  Pressing ^S or ^Xs again will
force gitfm to go to the next entry that matches the current
isearched string.  When the end of the panel is reached, the isearch is
restarted from its beginning.

^R, ^Xr

 
Incremental search backward a file name in the current panel
(‘isearch-backward’).  Pressing ^R or ^Xr again will
force gitfm to go to the next entry that matches the current
isearched string.  When the beginning of the panel is reached, the
isearch is restarted from its end.

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.1.8 Using the input line

The input line is one of the main methods used by gitfm to interact with the user. All the answers the user should give in order to perform some operation and all the shell like commands are built using it. So here is a description of all the basic editing operations that the ‘input line’ provides. They are very much inspired from Emacs, so Emacs users should have no problem using them.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.1.8.1 Inserting Text

Typing characters is the most usual way of inserting text into the input line. Key sequences starting with printable ascii characters are not allowed in gitfm so typing a for example results in inserting a at the current point position. Of course, there are some other ways of inserting text into the command line and here there is a description of most of them.

ESC RET

 
Copy the current entry name into the input line at the current point
position (‘entry-to-input-line’).

ESC ESC RET

 
Copy the other panel path into the input line at the current point
position (‘other-path-to-input-line’).

^X ^I

 
Copy the names of all the selected entries into the input line at the
current point position (‘selected-entries-to-input-line’).

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.1.8.2 Moving Point

^B, LEFT

 
Move the point backward one character (‘backward-char’).

^F, RIGHT

 
Move the point forward one character (‘forward-char’).

ESC b

 
Move the point one word backward (‘backward-word’).

ESC f

 
Move the point one word forward (‘forward-word’).

^A

 
Move the cursor at the beginning of the input line (‘beginning-of-line’).

^E

 
Move the cursor at the end of the input line (‘end-of-line’).

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.1.8.3 Deleting and killing text

DEL, ^D

 
Delete the character under the cursor (‘delete-char’).

^H, BKSPC

 
Delete the character before the cursor (‘backward-delete-char’).

ESC BKSPC

 
Delete backward one word (‘backward-kill-word’).

ESC d

 
Delete forward one word (‘kill-word’).

ESC k

 
Delete the entire line (‘kill-line’).

^U

 
Delete all the characters between the beginning of the input line and
the point (‘kill-to-beginning-of-line’).

^K

 
Delete all the characters between the point and the end of the input
line (‘kill-to-end-of-line’).

ESC SPC

 
Delete all the spaces around the point, leaving only one space
(‘just-one-space’).

ESC \

 
Delete all the spaces around the point
(‘delete-horizontal-space’).

^W

 
Save the region between the point and the mark into the kill "ring" and
then kills it (‘kill-region’).  Note that there is no real
kill-ring here.  The so-called kill-ring has only one entry.

ESC w

 
Save the region between the point and the mark without killing it
(‘kill-ring-save’).

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.1.8.4 Case conversion of words.

ESC l

 
Convert the following word to lower case, moving over.
(‘downcase-word’).

ESC u

 
Convert the following word to upper case, moving over.
(‘upcase-word’).

ESC c

 
Capitalize the following word, moving over.
(‘capitalize-word’).

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.1.8.5 Reusing recent input line arguments

A separate history is kept for both built-in and user-defined commands. If you call a command that you have used before, you can re-edit a previously entered string in order to minimize the amount of characters needed to be typed for the new one. There is no limit on the number of strings that can be kept in the history.

ESC p

 
Walk backward through the history of previously entered strings
(‘previous-history-element’).

ESC n

 
Walk forward through the history of previously entered strings
(‘next-history-element’).

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.1.8.6 Commands to set the mark

^SPC

 
Set the mark at the current point position (‘set-mark’).

^X ^X

 
Exchange the current point position with the mark one
(‘exchange-point-and-mark’).

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.1.8.7 Reinserting recently killed text

^Y

 
Reinsert a previously killed text at the current point position
(‘yank’).

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.1.8.8 Selecting files matching patterns

If the very first character in the input line is a `+', what comes after it is considered a (space separated) list of shell patterns, and all the files that match at least one pattern from that list will be marked as selected. An empty list of shell patterns (i.e. the `+' by itself) will cause all the files to be selected.

If the very first character in the input line is a `-', the space separated list of shell patterns that follows is used to unselect files. An empty list of shell patterns (i.e. the `-' by itself) will cause all the selected files to be unselected.

Finally, if the first and only character in the input line is a `*', then all the selected files will become unselected, and all the unselected files will become selected.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.1.9 File operations


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.1.9.1 Copying Files

F5, ESC 5, ^C C

 
Copy the currently selected entries to the user supplied path
(‘copy’).

^C b C

 
Copy the currently selected entries to the user supplied path.  The
operation is performed in background (‘B-COPY’).

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.1.9.2 Moving Files

F6, ESC 6, ^C T

 
Move the currently selected entries to the user supplied path
(‘move’).

^C b T

 
Move the currently selected entries to the user supplied path.  The
operation is performed in background (‘B-MOVE’).

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.1.9.3 Creating Files

The easiest way to create a new file is to start an editor passing the file name as an argument. Most editors will try to create the file if the file doesn't exist. See section Editing Files, for more information.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.1.9.4 Deleting Files

F8, ESC 8, ^C D

 
Delete the currently selected entries (‘delete’).

^C b D

 
Delete the currently selected entries.  The operation is performed in
background (‘B-DELETE’).

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.1.9.5 Linking Files

^C H

 
Create a hard link from the current files to a user supplied file
name (‘LINK’).

^C b H

 
Create a hard link from the current files to a user supplied file name
(‘B-LINK’).  The action is performed in background.

^C S

 
Create a symbolic link from the current files to a user supplied file
name (‘SYMLINK’).

^C b S

 
Create a symbolic link from the current files to a user supplied file
name (‘B-SYMLINK’).  The action is performed in background.

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.1.9.6 Renaming Files

^C R

 
Rename the current file or directory with the user supplied name
(‘RENAME’).

^C b R

 
Rename the current file or directory with the user supplied name.  The
operation is performed in background (‘B-RENAME’).

^C n d

 
Change the name of all the selected entries to lowercase.
(‘name-downcase’).

^C n u

 
Change the name of all the selected entries to uppercase.
(‘name-upcase’).

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.1.9.7 Splitting files into smaller parts

^C /

 
Split the current file into several smaller files of a given size and
named based on a given prefix (‘SPLIT’).

^C b /

 
Split the current file into several smaller files of a given size and
named based on a given prefix.  The operation is performed in background
(‘B-SPLIT’).

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.1.9.8 Packing files into the minimum number of bins

^C ~

 
Pack the files into the smallest number of bins.  This is an
approximation - the problem is NP-complete and no known algorithm can
guarantee a solution better than ‘(11/9) * OPTIMAL + 4’.

To make things even worse, for large files, there is no portable way
to predict how many blocks the file system implementation will require
for indirect blocks, directories, etc.  So keep in mind that this is
only an approximation.

Bin packing can be useful when you want to put a bunch of files on
floppies or zip disks and you want to optimize things a little bit
(‘bin-packing’).

‘gitfm’ assumes that you want to pack all the files in the current
directory - if there is any selected file in that directory it will be
unselected first.  Then ‘gitfm’ will ask for a bin size, and select
the files that should go in the first bin.  You are supposed to place
those files in the first bin (e.g. a tar archive), remove them from the
current directory, then run ‘bin-packing’ again, to obtain the list
of the files that should go into the second bin, etc.

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.1.9.9 Changing a file's mode, owner and group

^C M

 
Change the mode of the currently selected entries (‘CHMOD’).

^C b M

 
Change the mode of the currently selected entries.  The operation is
performed in background (‘B-CHMOD’).

^C r M

 
Recursively change the modes of the selected entries if one of them is a
directory (‘R-CHMOD’).

^C b r M

 
Recursively change the modes of the selected entries if one of them is a
directory.  The operation is performed in background (‘B-R-CHMOD’).

^C O

 
Change the owner of the currently selected entries (‘CHOWN’).

^C b O

 
Change the owner of the currently selected entries.  The operation is
performed in background (‘B-CHOWN’).

^C r O

 
Recursively change the owners of the selected entries if one of them is
a directory (‘R-CHOWN’).

^C b r O

 
Recursively change the owners of the selected entries if one of them is
a directory.  The operation is performed in background
(‘B-R-CHOWN’).

^C G

 
Change the group of the currently selected entries (‘CHGRP’).

^C b G

 
Change the group of the currently selected entries.  The operation is
performed in background (‘B-CHGRP’).

^C r G

 
Recursively change the groups of the selected entries if one of them is
a directory (‘R-CHGRP’).

^C b r G

 
Recursively change the groups of the selected entries if one of them is
a directory.  The operation is performed in background
(‘B-R-CHGRP’).

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.1.9.10 Editing Files

F4, ESC 4

 
Call the default editor with the current file name as an argument
(‘EDIT’).

^X e

 
Call the default editor with the selected entry names as arguments
(‘MULTIPLE-EDIT’).

^X ^F

 
Create a new file by calling the default editor with the user supplied
file name as an argument (‘FILE-CREATE’).

^X 4 a

 
Call the default editor in order to edit the ‘ChangeLog’ file
(‘CHANGE-LOG’).

The default editor can be specified using the EDITOR or GNUIT_EDITOR environment variables. See section Environment Variables, for more information.

$GNUIT_EDITOR used to be called $GIT_EDITOR. The old name is still accepted for backwards-compatibility.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.1.9.11 Viewing Files

F3, ESC 3

 
Call the default viewer (gitview) with the current file name as
argument (‘VIEW’).

^X v

 
Call the default pager (more) with the currently selected entry
names as arguments (‘MULTIPLE-VIEW’).

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.1.9.12 Compressing Files

^C z

 
Compress the currently selected entries with gzip
(‘COMPRESS’).

^C b z

 
Compress the currently selected entries with gzip.  The operation
is performed in background (‘B-COMPRESS’).

^C Z

 
Uncompress the currently selected entries with gunzip
(‘UNCOMPRESS’).

^C b Z

 
Uncompress the currently selected entries with gunzip.  The
operation is performed in background (‘B-UNCOMPRESS’).

^C f Z

 
Uncompress the currently selected entries with gunzip
(‘F-UNCOMPRESS’).  Force uncompression of links.

^C b f Z

 
Uncompress the currently selected entries with gunzip.  Force
uncompression of links.  The operation is performed in background
(‘BF-UNCOMPRESS’).

^C .

 
Compress the currently selected entries with bzip2
(‘BZIP2-COMPRESS’).

^C b .

 
Compress the currently selected entries with bzip2.  The
operation is performed in background (‘B-BZIP2-COMPRESS’).

^C o

 
Uncompress the currently selected entries with bunzip2
(‘BZIP2-UNCOMPRESS’).

^C b o

 
Uncompress the currently selected entries with bunzip2.  The
operation is performed in background (‘B-BZIP2-UNCOMPRESS’).

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.1.9.13 Encoding Files

^C e

 
Encode the currently selected file (‘UUENCODE’).

^C b e

 
Encode the currently selected file.  The operation is performed in
background (‘B-UUENCODE’).

^C E

 
Decode the currently selected file (‘UUDECODE’).

^C b E

 
Decode the currently selected file.  The operation is performed in
background (‘B-UUDECODE’).

^C k

 
Encode the currently selected file using mpack (‘MIME-PACK’).

^C b k

 
Encode the currently selected file using mpack.  The operation is
performed in background (‘B-MIME-PACK’).

^C K

 
Decode the currently selected file using munpack (‘MIME-UNPACK’).

^C b K

 
Decode the currently selected file using munpack.  The operation is
performed in background (‘B-MIME-UNPACK’).

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.1.9.14 Encrypting Files

^C p

 
Encrypt (using pgp) the current file (‘ENCRYPT’).

^C P

 
Decrypt (using pgp) the current file (‘DECRYPT’).

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.1.9.15 Comparing Files

^C =

 
Compare (using diff) the current ASCII file with the other
panel's current file (‘DIFF’).  If both entries are directories, a
recursive diff is performed.

^C ESC =

 
Compare (using diff) the current ASCII file with its latest
backup.  The latest backup is the file having the same name and a '~' at
the end (‘LAST-BACKUP-DIFF’).

^C B

 
Compare the current file with the other panel current file.  A binary
comparison is performed (‘compare’).

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.1.9.16 Spell Checking Files

^X I

 
Run the ispell command with the current file name as an
argument.

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.1.9.17 Printing Files

^C j

 
Print the selected files via lpr to the user specified printer or
to the default one if no lpr options are given (‘PRINT-JOB’).

^C J

 
Print the list of active printing jobs via lpq.  The default
printer is queried if no lpq options are given
(‘PRINT-JOB-LIST’).

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.1.9.18 Wiping Files

^C W

 
Call gitwipe to wipe the selected files.  Asks for confirmation
before actually wiping them in order to avoid errors (‘WIPE’).

See section The GNUIT wipe file utility, for more information.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.1.9.19 Searching Files

ESC %

 
Search files on the file system, starting from the current directory
(‘FIND’).

ESC &

 
Use 'locate' to search files on the file system, starting from the
current directory (‘LOCATE’).

^X w

 
Locate the binary, source, and manual page files for a command
(‘WHEREIS’).

^X W

 
Locate a command; display its pathname or alias (‘WHICH’).

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.1.9.20 Managing tar based archive files

^C a

 
Create a tar archive containing all the currently selected
entries (‘TAR’).

^C b a

 
Create a tar archive containing all the currently selected
entries.  The operation is performed in background (‘B-TAR’).

^C x

 
Create a compressed tar archive containing the current entry,
provided it is a directory (‘TAR-COMPRESS’).

^C b x

 
Create a compressed tar archive containing the current entry,
provided it is directory.  The operation is performed in background
(‘B-TAR-COMPRESS’).

^C -

 
Create a bzip2 compressed tar archive containing the current
entry, provided it is a directory (‘TAR-BZIP2’).

^C b -

 
Create a bzip2 compressed tar archive containing the current
entry, provided it is a directory.  The operation is performed in
background (‘B-TAR-BZIP2’).

^C X

 
Expand the selected archives into the current directory.  The utility
used is selected based on the extension of the file
(‘GENERIC-UNPACK’).

^C b X

 
Expand the selected archives into the current directory.  The utility
used is based on the extension of the file.  The operation is performed
in background (‘B-GENERIC-UNPACK’).

^C V

 
Expand the selected archives into an user supplied current directory.
The utility used is selected based on the extension of the file
(‘GENERIC-UNPACK-INTO’).

^C b V

 
Expand the selected archives into an user supplied directory.  The
utility used is based on the extension of the file.  The operation is
performed in background (‘B-GENERIC-UNPACK-INTO’).

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.1.9.21 Working with DPKG

dpkg provides commands for manipulating and querying the dpkg database, gitfm's DPKG commands allow quick access to most of those which operate on binary packages, files, or require package names as arguments. All commands expecting package names can also be given binary packages, the package names will be automatically extracted. Most commands use their single character dpkg option letter as the key command.

^C ^D i

 
Install the deb file(s) selected or pointed by the cursor
(‘DPKG-INSTALL’).

^C ^D R i

 
Recursively install the deb file(s) in the directories selected or
pointed by the cursor (‘R-DPKG-INSTALL’).

^C ^D u

 
Unpack the deb file(s) selected or pointed by the cursor, but
don't configure it (‘DPKG-UNPACK’).

^C ^D R u

 
Recursively unpack the deb file(s) in the directories selected or
pointed by the cursor, but don't configure them (‘R-DPKG-UNPACK’).

^C ^D C

 
Configure the unpacked package(s) selected or pointed by the cursor
(‘DPKG-CONFIGURE’).

^C ^D r

 
Remove the package(s) selected or pointed by the cursor
(‘DPKG-REMOVE’).

^C ^D P

 
Purge the package(s) selected or pointed by the cursor
(‘DPKG-PURGE’).

^C ^D A

 
Update dpkg and dselect's idea of which packages are available with
information from the deb file(s) selected or pointed by the
cursor (‘DPKG-RECORDAVAIL’).

^C ^D R A

 
Recursively update dpkg and dselect's idea of which packages are
available with information from the deb file(s) in the directories
selected or pointed by the cursor (‘R-DPKG-RECORDAVAIL’).

^C ^D h

 
Display quick help file for GITFM's DPKG commands.
(‘DPKG-HELP’).

^C ^D c

 
Lists the contents of the filesystem tree archive portion of the
deb file pointed by the cursor (‘DPKG-CONTENTS’).

^C ^D f

 
Extracts control file information from a deb file pointed by
the cursor (‘DPKG-FIELD’). You are presented with the file name and
can either hit ENTER to see all fields, or add control file field names
(space separated) to see only those fields.

^C ^D I

 
Provides information about a deb file pointed by the cursor
(‘DPKG-INFO’).

^C ^D l

 
List the package(s) selected or pointed by the cursor
(‘DPKG-LISTPKGS’).

^C ^D s

 
Display status details for the package(s) selected or pointed by the
cursor (‘DPKG-STATUS’).

^C ^D L

 
List files owned by the package(s) selected or pointed by the cursor
(‘DPKG-LISTFILES’).

^C ^D S

 
Find package owning file pointed to by the cursor
(‘DPKG-SEARCH’).

^C ^D p

 
Display available version details of package(s) selected or pointed by
the cursor (‘DPKG-PRINTAVAIL’).

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.1.9.22 Installing and Uninstalling RPM packages

Red Hat Linux Distributions use a very powerful package manager called rpm. It is used whenever you need to install/remove/upgrade/etc a software package. The packages used by rpm use the extension ‘.rpm’. gitfm provides default key bindings for some of the basic operations rpm can perform on packages: install, uninstall, upgrade and query.

^C I

 
Install the rpm package pointed by the cursor
(‘RPM-INSTALL’).

^C b I

 
Install the rpm package pointed by the cursor
(‘B-RPM-INSTALL’).  The operation is performed in background.

^C i

 
Uninstall the rpm package pointed by the cursor
(‘RPM-UNINSTALL’).

^C b i

 
Uninstall the rpm package pointed by the cursor
(‘B-RPM-UNINSTALL’).  The operation is performed in background.

^C N

 
Upgrade the rpm package pointed by the cursor
(‘RPM-UPGRADE’).

^C b N

 
Upgrade the rpm package pointed by the cursor
(‘B-RPM-UPGRADE’).  The operation is performed in background.

^C q

 
Query the rpm package manager (‘RPM-QUERY’).  The default
options used are ‘-qil’.  See the rpm manual page for
more details on using rpm.

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.1.9.23 File Types

^C t

 
Print the type of a file using the file utility
(‘FILE-TYPE’).

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.1.9.24 Accessing MSDOS Files

^C m d, ^C m ^D

 
Change the current MSDOS directory to a given directory
(‘MTOOLS-CHDIR’).

^C m P

 
Put the currently selected files on a MSDOS floppy
(‘MTOOLS-PUT’).

^C b m P

 
Put the currently selected files on a MSDOS floppy
(‘B-MTOOLS-PUT’).  The operation is performed in background.

^C m G

 
Get some files from a MSDOS floppy and put them in a given
directory (‘MTOOLS-GET’).

^C b m G

 
Get some files from a MSDOS floppy and put them in a given
directory (‘B-MTOOLS-GET’).  The operation is performed in
background.

^C m D

 
Delete files from a MSDOS floppy (‘MTOOLS-DELETE’).

^C b m D

 
Delete files from a MSDOS floppy (‘B-MTOOLS-DELETE’).  The
operation is performed in background.

^C m L

 
List files and directories on a MSDOS floppy (‘MTOOLS-DIR’).

^C m F

 
Format a MSDOS floppy (‘MTOOLS-FORMAT’).

^C b m F

 
Format a MSDOS floppy (‘B-MTOOLS-FORMAT’).  The operation is
performed in background.

^C m M

 
Create a directory on a MSDOS floppy (‘MTOOLS-MKDIR’).

^C b m M

 
Create a directory on a MSDOS floppy (‘B-MTOOLS-MKDIR’).
The operation is performed in background.

^C m K

 
Remove a directory from a MSDOS floppy (‘MTOOLS-RMDIR’).
All the files and subdirectories in that directory are removed as well.

^C b m K

 
Remove a directory from a MSDOS floppy (‘B-MTOOLS-RMDIR’).
All the files and subdirectories in that directory are removed as well.
The operation is performed in background.

^C m R

 
Rename a file or directory on a MSDOS floppy
(‘MTOOLS-RENAME’).

^C b m R

 
Rename a file or directory on a MSDOS floppy
(‘B-MTOOLS-RENAME’).  The operation is performed in background.

^C m T

 
Display the contents of a file located on a MSDOS floppy
(‘MTOOLS-TYPE’).

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.1.9.25 A different action for each file type

Many files on UNIX systems have one or more extensions specifying their types. For example, a file that ends in ‘.c’ is a file containing a C program, while a file ending in ‘.tar.gz’ is a tar archive compressed with the gzip utility. Having a default action for each file type, binded on the same key, seems to be a good idea because you can use that key to obtain type specific information about a file or to process it in some type specific way much easier. The GNUIT package contains a script called gitaction that is used to detect the current file type and perform a type specific action. See section The GNUIT per file type action script, for more information.

F2, ESC 2, ^X a

 
Perform an action on the current file, depending on its type
(‘FILE-ACTION’).

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.1.10 Directory operations


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.1.10.1 Creating directories

F7, ESC 7, ^X M

 
Create a new subdirectory in the current directory with the user
supplied name (‘make-directory’).

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.1.10.2 Copying directories

F5 (for directories), ESC 5 (for directories), ^C C (for directories)

 
Copy the currently selected entries to the user supplied path
(‘copy’).

^C b C (for directories)

 
Copy the currently selected entries to the user supplied path.  The
operation is performed in background (‘B-COPY’).

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.1.10.3 Deleting directories

F8 (for subdirectories), ESC 8 (for directories), ^C D (for subdirectories)

 
Delete the currently selected entries (‘delete’).

^C b D (for directories)

 
Delete the currently selected entries.  The operation is performed in
background (‘B-DELETE’).

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.1.10.4 Moving directories

F6 (for directories), ESC 6 (for directories), ^C T (for directories)

 
Move the currently selected entries to the user supplied path
(‘move’).

^C b T (for directories)

 
Move the currently selected entries to the user supplied path.  The
operation is performed in background (‘B-MOVE’).

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.1.10.5 Renaming directories

^C R (for directories)

 
Rename the current file or directory with the user supplied name
(‘RENAME’).

^C b R (for directories)

 
Rename the current file or directory with the user supplied name.  The
operation is performed in background (‘B-RENAME’).

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.1.10.6 Comparing Directories

^C c q

 
Quickly compare the files in the left panel with the files in the right
one.  Only the file names, sizes and time stamps are considered in the
comparison.

^C c t

 
Compare the files in the left panel with the files in the right one.
The contents of each file in the current panel will be compared against
the contents of its counterpart (if any) from the other panel.

^C f d

 
Recursively compare (using diff -r -q) the current directory with
the other panel's current directory (‘FAST-DIFF’).  Print on
standard output the names of the files that differ.

^C d

 
Compare (using diff) the current directory with the other panel
current directory.  For successful operation, both panels should contain
the same directory (‘DIR-DIFF’).

^C b d

 
Compare (using diff) the current directory with the other panel
current directory.  For successful operation, both panels should contain
the same directory.  The operation is performed in background
(‘DIR-DIFF’).

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.1.10.7 Summarize directory usage

^C U

 
Display the output of the du -s command on the status line
(‘DIRECTORY-USAGE’).

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.1.10.8 Changing directories

^X d, ^X ^D

 
Change the current working directory.  The user is asked for a new
directory name and the new directory is added to the directory history
(‘change-directory’).

See section Directory History, for more information.

ESC a c

 
Change the current directory of the current panel to the directory of
the other panel (‘adapt-current-directory’).

ESC a o

 
Change the current directory of the other panel to the directory of the
current panel (‘adapt-other-directory’).

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.1.10.9 Directory History

Users usually work on a limited set of subdirectories. Providing a fast method of switching between a number of intensively used directories is a good idea and gitfm has a set of builtin commands for doing it.

Usually new directories are added to the directory history when the ‘change-directory’ built-in command is used. gitfm also adds the current directory to the history list when started, when the directory history is reset and when a command having a non empty ‘new-dir’ field successfully completes its execution. See section The new-dir field, for more information.

^X ^N

 
Go to the next directory in the history (‘next-directory’).

^X ^P

 
Go to the previous directory in the history
(‘previous-directory’).

^X ^R

 
Reset the entire directory history.  As explained above, the current
directory becomes the only directory in the history
(‘reset-directory-history’).

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.1.10.10 Hot Keys

gitfm provides default key bindings for switching to a number of important directories as "/", "..", "$HOME", etc.

ESC /

 
Go to the ‘/’ directory (‘ROOT-DIR’).

ESC .

 
Go to the ‘..’ directory (‘up-one-dir’).

ESC h

 
Go to the ‘~’ ($HOME) directory (‘HOME-DIR’).

ESC i

 
Go to the ‘/usr/include’ directory (‘INCLUDE-DIR’).

ESC ESC 1

 
Go to the ‘/mnt/fd0’ directory (‘FIRST-FLOPPY-DIR’).

ESC ESC 2

 
Go to the ‘/mnt/fd1’ directory (‘SECOND-FLOPPY-DIR’).

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.1.11 Compiling programs

F9, ESC 9, ^X m

 
Run the make command in the current directory.  Use -k as the
default option (‘MAKE’).

^X b m

 
Run the make command in background in the current directory
(‘B-MAKE’).

See section The GNUIT per file type action script, for more information.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.1.12 Sending/receiving ascii/binary mail

^C 2 a

 
Send the current current ascii file by mail to an user supplied email
address (‘ASCII-MAIL’).

^C b 2 a

 
The same as ‘ASCII-MAIL’, the only difference being that the
command runs in background (‘B-ASCII-MAIL’).

^C 2 b

 
Send the current current binary file by mail to an user supplied list of
email addresses.  The file is uuencoded first (‘BINARY-MAIL’).

^C b 2 b

 
The same as ‘BINARY-MAIL’, the only difference being that the
command runs in background (‘B-BINARY-MAIL’).

^C 2 m

 
Send the current current binary file by mail to an user supplied list of
email addresses.  The file is encoded with mpack first
(‘MIME-MAIL’).

^C b 2 m

 
The same as ‘MIME-MAIL’, the only difference being that the command
runs in background (‘B-MIME-MAIL’).

ESC x r m

 
Run the emacs -f rmail command.  This will start the Emacs's
‘rmail’ function so that you can read your mail (‘READ-MAIL’).

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.1.13 Starting a sub-shell

^X z

 
Call a sub-shell as specified by the $GNUIT_SHELL environment
variable (‘SUB-SHELL’).

$GNUIT_SHELL used to be called $GIT_SHELL. The old
name is still accepted for backwards-compatibility.

See section Environment Variables, for more information.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.1.14 Using grep and recursive grep

^X g

 
Search using grep all the selected files for a given pattern
(‘GREP’).

^X g

 
Search recursively using gitrgrep all the user specified files
and directories for a given pattern (‘RECURSIVE-GREP’).

See section The GIT recursive grep script, for more information.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.1.15 Locking your console

Having a lock feature might be a good idea and, since not all the UNIX systems provide one, gitfm tries to get around the problem …

^X p

 
Prompt the user for a password and locks the console until the same
password is reinserted (‘lock’).

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.1.16 Refreshing the screen contents

Sometimes your screen needs to be refreshed. Just think about what happens when somebody wants to talk with you and the talk daemon writes something like this

 
Message from Talk_Daemon@galei.cs.vu.nl at 12:15 ...
talk: connection requested by andrei@galei.cs.vu.nl.
talk: respond with:  talk andrei@galei.cs.vu.nl

on your screen. And sometimes you might also want to re-read the current directories. gitfm provides a built-in command for refreshing the screen contents.

^L

 
Re-read the directories contents and refresh the screen (‘refresh’).

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.1.17 Resetting your terminal

^X ^L

 
Call reset in order to reset the terminal to its default
settings (‘TTY-RESET’).

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.1.18 Mounting/unmounting file systems

People dealing with lots of files usually need to save/restore/copy files from/to other file systems. In order to be more efficient, gitfm provides a set of key bindings for mounting and unmounting file systems. See section The GNUIT mount utility, for more information.

The default key bindings set has been designed to work under Linux, but it can be easily changed for other UNIX systems with different device names. Reading the configuration file ‘gnuitrc.common’ should be enough. See section Hot Keys, for more information.

As a convention, the ‘/mnt’ directory is used to store an empty subdirectory for each mountable file system. Each file system is actually mounted in its counterpart ‘/mnt’ subdirectory. Try to follow this convention since the gitmount script is heavily based on it. See section Customizing GNU Interactive Tools, for more information.

ESC m a

 
Call mount(1) in order to mount the first floppy
(‘/dev/fd0’) in the ‘/mnt/fd0’ directory (‘MOUNT-A’).

ESC m b

 
Call mount(1) in order to mount the second floppy
(‘/dev/fd1’) in the ‘/mnt/fd1’ directory (‘MOUNT-B’).

ESC m c

 
Call mount(1) in order to mount the cdrom
(‘/dev/cdrom’) in the ‘/mnt/cdrom’ directory (‘MOUNT-CDROM’).

ESC m f

 
Call mount(1) in order to mount the first floppy
(‘/dev/fd0’) in the ‘/mnt/floppy’ directory (‘MOUNT-FLOPPY’).

ESC m z

 
Call mount(1) in order to mount the zip drive
(‘/dev/zip’) in the ‘/mnt/zip’ directory (‘MOUNT-ZIP’).

ESC m j

 
Call mount(1) in order to mount the jaz drive
(‘/dev/jaz’) in the ‘/mnt/jaz’ directory (‘MOUNT-JAZ’).

ESC m t

 
Call mount(1) in order to mount the file systems corresponding to
the selected subdirectories.  For example, if you are in the ‘/mnt’
directory and the ‘cdrom’ and ‘zip’ subdirectories are
selected, the cdrom and the zip disk will be mounted (‘MOUNT-THESE’).

ESC r a

 
Call umount(1) in order to remove (unmount) the first floppy
(‘/dev/fd0’) (‘UMOUNT-A’).

ESC r b

 
Call umount(1) in order to remove (unmount) the second floppy
(‘/dev/fd1’) (‘UMOUNT-B’).

ESC r c

 
Call umount(1) in order to remove (unmount) the cdrom
(‘/dev/cdrom’) (‘UMOUNT-CDROM’).

findex UMOUNT-CDROM

ESC r f

 
Call umount(1) in order to remove (unmount) the first floppy
(‘/dev/fd0’) (‘UMOUNT-FLOPPY’).

ESC r z

 
Call umount(1) in order to remove (unmount) the zip drive
(‘/dev/zip’) (‘UMOUNT-ZIP’).

ESC r j

 
Call umount(1) in order to remove (unmount) the jaz drive
(‘/dev/jaz’) (‘UMOUNT-JAZ’).

ESC r t

 
Call umount(1) in order to remove (unmount) the file systems
mounted into the selected subdirectories.  For example, if the current
directory is ‘/mnt’ and the ‘cdrom’ and ‘zip’
subdirectories are selected, the cdrom and the zip disk will be
unmounted (‘UMOUNT-THESE’).

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.1.19 Getting some useful system information

^X T

 
Call date(1) in order to display the current time/date
(‘DATE’).

ESC S f

 
Call finger(1) in order to display information about local and
remote users  (‘FINGER’).

ESC S m

 
Call mount(1) in order to display a list of the currently
mounted file systems (‘MOUNTED-FILE-SYSTEMS’).

ESC S q

 
Call quota(1) in order to display a user file system disk quota
and quota (‘QUOTA’).

ESC S s

 
Call df(1) in order to get the status of the currently mounted
file systems (‘DISK-FREE-SPACE’).

ESC S u

 
Call users(1) in order to get the name of the currently logged in
users (‘USERS’).

ESC S v

 
Call $GNUIT_VMSTAT(1) in order to get the current virtual memory
status.  This is very system dependent, Linux uses free,
other systems use vmstat, so the $GNUIT_VMSTAT variable is
used to deal with this (‘VIRTUAL-MEMORY-STATUS’).

$GNUIT_VMSTAT used to be called $GIT_VMSTAT. The old
name is still accepted for backwards-compatibility.

See section Environment Variables, for more information.

ESC S w

 
Call who(1) in order to find out who is on the system
(‘WHO’).

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.1.20 How to look at the environment variables

^X E

 
Call env(1) in order to display the current environment
(‘ENV’).

^X H

 
Call xhost(1) in order to add/remove hosts names to the list
allowed to make connection to the X server (‘XHOST’).

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.1.21 Viewing/killing processes

There are at least two kinds of ps(1) utilities. One that accepts (more or less) combinations of the 'a', 'u', and 'x' flags and another that accepts combinations of 'e', 'f' and 'l' flags. Since is quite difficult to test which one works fine on a given UNIX system, gitfm provides key bindings for both of them. Anyway, if your ps(1) fails to accept the predefined combinations, please take a look in its manual and then modify the ‘.gnuitrc.TERM’ file as needed.

Since the number of possible combinations of flags in the ps command line is quite big and *very* system dependent, there is no real reason to display them all here. We are only interested in giving you a starting point in your search through the ‘.gnuitrc.TERM’ file.

Note also that you can display a list of processes using ps(1) or browse through a list of them (killing as needed) using gitps. As a convention, we have used the same key sequence for a given set of ps(1) flags for both ps(1) and gitps, the only difference being that ps(1) keys end in an uppercase letter. See section The GNUIT process viewer/killer, for more information.

Under Linux it is possible to see a tree of processes using pstree(1).

Here there are the default key bindings for the 'e', 'f' and 'l' ps(1) flags combinations:

ESC P b, ESC P c, ESC P e

 
Call gitps or ps(1) in order to browse through or display
a list of currently running processes (‘GITPS’, ‘PS’).

... and the default key bindings for the 'a', 'u' and 'x' ps(1) flags combinations:

ESC P a, ESC P l, ESC P u ESC P x, ESC P y

 
Call gitps or ps(1) in order to browse through or display
a list of currently running processes (‘GITPS’, ‘PS’).

ESC P T

 
Call pstree(1) in order to display the tree of currently running
processes (‘PSTREE’).

^X k

 
Call kill(1) in order to kill a user specified process with a
given signal (‘KILL’).

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.1.22 Synchronizing the file systems

^X S

 
Call sync(1) in order to synchronize all the file systems
(‘SYNC’).

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.1.23 Reading the documentation

^X q

 
Read a manual page.  The user is prompted for its name (‘MAN’).

F1, ESC 1, ^X i

 
Read an info documentation.  The user is prompted for the documentation
name (‘INFO’).

^X h

 
Read the html documentation using the viewer specified in
GNUIT_BROWSER, or with lynx if GNUIT_BROWSER is not set
(‘HTML’).

$GNUIT_BROWSER used to be called $GIT_BROWSER. The old
name is still accepted for backwards-compatibility.

^X ^A

 
Show the key-bindings for commands matching a specified string
(‘apropos’).

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.1.24 Exiting GNU Interactive Tools

F10, ESC 0, ^X ^C, ^X c

 
Exit GNU Interactive Tools (‘exit’).

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.2 The GNUIT process viewer/killer

gitps is an interactive process viewer/killer. It calls internally the ps(1) utility. This is a brief description of the command line arguments.

-h print this help message

-v print the version number

-i print the installation directory

-c use ANSI colors

-b don't use ANSI colors

-l don't use the last screen character

-p pass the remaining arguments to ps(1)

Running gitps is self explanatory. Use the arrows, PageUp, PageDown, Home, End, ^N, ^P, ^V, ESC v, Space and Backspace to move in the list, ^L to refresh it, Enter to change the default signal and F10, q or ^X ^C to leave.

You can change these keys, just read the GITPS-Setup, GITPS-Color, GITPS-Monochrome and GITPS-Keys sections in the configuration files ‘gnuitrc.TERM’.

The selected signal can also be changed by pressing its first letter (in uppercase), e.g. for ‘SIGTERM’ press T, or by pressing the key corresponding to the signal number. For signals > 10, prefix with ^X, and for signals greater than 20, prefix with ^C. For instance, to select signal 15 (‘SIGTERM’), press ^X5.

Keys for signal numbers are hard-coded to the versions in i386 Linux, however most correspond to POSIX. Compare signal(7) or signal(5) with http://linux.die.net/man/7/signal.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.3 The GNUIT ASCII/HEX file viewer

gitview is an ASCII/HEX file viewer. Use the arrows, PageUp, PageDown, Home, End, ^N, ^P, ^V, ESC v, Space and Backspace to move in the file, ^L to refresh the screen and F10, q or ^X ^C to leave.

You can change these keys, just read the GITVIEW-Setup, GITVIEW-Color, GITVIEW-Monochrome and GITVIEW-Keys sections in the configuration files ‘gnuitrc.TERM’.

Here is a brief description of the command line arguments:

-h print this help message

-v print the version number

-i print the installation directory

-c use ANSI colors

-b don't use ANSI colors

-l don't use the last screen character


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.4 The GNUIT key sequences display utility

gitkeys is a program that displays the key sequence sent by the pressed key. This is the key sequence received by GIT tools, so this program is useful when setting up the ‘.gnuitrc.TERM’ configuration files.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.5 The GNUIT wipe file utility

gitwipe is an utility for wiping files. It overwrites the file contents with a random sequence of numbers and then calls ‘sync’().

Note that gitwipe does *not* remove the wiped file since (under Linux at least) the ‘sync’() system call might return before actually writing the new file contents to disk. Removing the file might be dangerous because some file systems can detect that the blocks in the removed wiped file are no longer used and never write them back to disk in order to improve performance. It is up to you to remove the file(s) at a later moment.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.6 The GNUIT mount utility

gitmount is a script that allows you to mount a list of block devices (specified in the command line), without specifying the file system type. With a command like `gitmount fd0 cdrom' the first floppy will be mounted in ‘/mnt/fd0’ and the cdrom will be mounted in ‘/mnt/cdrom’. Make sure your ‘/etc/fstab’ settings are correct.

You don't need to know the file system type anymore. If you want to use gitmount with the block device ‘/dev/xxx’ then the directory ‘/mnt/xxx’ is created if it doesn't exist. gitmount will attempt to create the necessary directories, but root permissions might be required.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.7 The GNUIT per file type action script

gitaction is a script that executes a different action for each file type specified. It is called by the gitfm program when pressing F2, ESC 2 or ^Xa.

The first parameter is the current directory name and the second one is the file name to be matched against the default patterns. The matching is done using the shell 'case' statement.

If you press F2, ESC 2 or ^Xa on a ‘*.html’ file, gitfm will invoke a browser to view it, if you press F2, ESC 2 or ^Xa on a ‘*.tar.gz’ file, gitfm will list the tar archive contents, if you press the same keys on a ‘*.gz’ file, gitfm will display its uncompressed contents on the screen, etc …

If you press F2, ESC 2 or ^Xa on a ‘*.gif’ file or ‘*.jpg’ file and you have the xzgv utility installed, you will be able to see it. If you want to change the gif/jpeg viewer, all you need to do is to change its name in the gitaction script.

There are many more file types and viewers that gitaction knows about. In addition, if you are running under GNOME, gnome-open is used, and on MacOS, open(1) is used. see(1) and metamail(1) are also used as fallbacks. If all else fails, the file is displayed using $GNUIT_PAGER.

If you want to find out what the default action for each file type is (or if you want to modify it), just read/modify the gitaction script.

Also, you can add a .gitaction shell script in your home directory and/or in any other directory. Before trying to match a file name, gitaction will attempt to execute ./.gitaction. If that one fails to match the file name against its patterns, it backs up to $HOME/.gitaction. When this one fails too the patterns in gitaction are tried. For an example of how to write .gitaction scripts take a look at the .gitaction shell script provided as part of the distribution and installed in the ‘$(prefix)/bin’ directory. Debian users will find it in ‘/usr/share/doc/gnuit/examples/’.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.8 Unified archive unpacking

gitunpack is a shell script that accepts a directory and a set of archives as its command line parameters, and then attempts to unpack those archives in the given directory, selecting the utility used to unpack the archives based on the archive extensions.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.9 The GIT recursive grep script

gitrgrep is a very small script that calls grep recursively. It accepts grep like options / parameters, the only difference being that file specifications should be quoted:

 
	gitrgrep main '*.c'

or

	gitrgrep errno '*.c *.h'

gitregrep and gitrfgrep are recursive versions of the egrep and fgrep programs.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

4. Customizing GNU Interactive Tools


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

4.1 Environment Variables

The configuration files use shell environment variables to call the shell, editor, mail reader, html viewer, compress and virtual memory status utility. That means that if you set GNUIT_SHELL, GNUIT_EDITOR, GNUIT_RMAIL, GNUIT_BROWSER, or GNUIT_VMSTAT to some value, that value will be used instead of the default one. The defaults are:

 
	GNUIT_SHELL='/bin/sh'
	GNUIT_EDITOR='vi'
	GNUIT_RMAIL='emacs -f rmail'
	GNUIT_PAGER='more
	GNUIT_VMSTAT='free'
	GNUIT_BROWSER='lynx'

if the configure script is passed ‘--enable-debian’, some of the defaults are changed as follows:

 
	GNUIT_EDITOR='sensible-editor'
	GNUIT_PAGER='sensible-pager'
	GNUIT_BROWSER='sensible-browser'

If SHELL is defined, GNUIT_SHELL will be set to that value. If PAGER is defined, GNUIT_PAGER will be set to that value. If EDITOR is defined, GNUIT_EDITOR will be set to that value. If you want to change the default settings, put something like this into your ‘.profile’:

 
	export GNUIT_SHELL='/usr/local/bin/bash'
	export GNUIT_EDITOR='emacs'
	export GNUIT_RMAIL='elm'
	export GNUIT_PAGER='less'
	export GNUIT_VMSTAT='vmstat'
	export GNUIT_BROWSER='netscape'

These variables used to be prefixed with GIT_ (e.g. GIT_PAGER). The old names are still accepted for backwards compatibility.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

4.2 Configuration Files

There is one configuration file per terminal type in GNUIT. The configuration file(s) reside in the user's home directory or (the default versions) in the directory ‘/usr/share/gnuit/’). Files in the user's home directory start with a leading “.”

Their generic name is ‘gnuitrc.TERM’. GNUIT allows each terminal type to have its own configuration file (TERM is the value of the TERM environment variable (e.g ‘vt102’); for the Linux console the configuration file is ‘gnuitrc.console’).

Since most of the key bindings are common to all the terminal types, a configuration file called ‘gnuitrc.common’ is parsed before parsing the normal ‘.gnuitrc.TERM’ configuration file, the later one defining only those keys that are terminal specific. However, if a key binding is redefined in the ‘gnuitrc.TERM’ file, that binding will be used.

If the GNUIT package have been compiled without passing the ‘--enable-terminfo’ option to the configure script and your system has a huge ‘termcap’ database (‘/etc/termcap’), you can copy the termcap definition(s) of your terminal(s) in a file called, lets say ‘.termcap’ and put it in your home directory. After that, set your TERMCAP environment variable to point to it. You should add something like this to your ‘.profile’:

 
TERMCAP=‘/home/mike/.termcap

The interactive programs in the GNUIT package can run without such a file, but on systems with huge ‘termcap’ databases, copying the definitions of the most used terminals in a local ‘.termcap’ file will lead to a faster start.

The ‘.gnuitrc.TERM’ is first searched for in the home directory then, if not found, in the directory ‘/usr/share/gnuit/’). (without the leading “.”). The configuration file is structured in sections, each section containing variables in the following format:

 
variable-name’ = ‘first-field’;‘second-field’; ...

After the ‘variable-name’ at least one space or tab is required. All characters after a ‘#’ are ignored and if you comment a section name, the whole section is ignored.

Section names are enclosed in rectangular brackets (‘[’ and ‘]’). Note that this manual don't include them while refering to section names.

The GNUIT package contains three major programs: gitfm, gitps and gitview. Each one has its own sections in the configuration files. There is also a global setup section called ‘Setup’ that is used by all these programs.

Note that now git has been renamed to gitfm, the corresponding sections have been renamed to GITFM, however for backwards compatibility, the old name (GIT) is still checked if the GITFM section is not found.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

4.2.1 Writing key sequences

GNUIT contains three interactive programs. Their names are: gitfm (this is the file system browser), gitps (this is the process viewer/killer and gitview (this is the ASCII/HEX file viewer). Each one of these programs has its own set of key bindings.

The convention used in describing key bindings are very simple. Here there are some examples that will help you to understand them. The corresponding Emacs conventions will help you even more.

^A means keeping the Ctrl key down and pressing the a key (C-a).

The ESC character is represented as ^[ so that you can use the meta character (M- ) where available (or the ESC key):

^[a corresponds to M-a (pressing the ESC key and then a).

The ^ character is represented as ^^.

The backspace character is represented as ^_.

The Ctrl-SPACE character (C-SPC) is represented as ^$.

The space (SPC) character is represented as ^@.

Note that the key bindings notation described here is only used in the configuration files. For the sake of readability this manual uses ESC for the ESC key, SPC for the SPACE key and RET for the RETURN (ENTER) key.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

4.2.2 The global setup section

In this section the variables have only one field.

AnsiColors

This variable should be set to ‘ON’ if the terminal supports standard ‘ANSI’ color sequences. Otherwise it should be ‘OFF’. If ‘AnsiColors’ is ‘ON’, ‘GITxxx-Color’ sections will be used in the configuration files ‘gnuitrc.TERM’. Otherwise, GNUIT interactive programs will use the ‘GITxxx-Monochrome’ sections.

UseLastScreenChar

This variable is used for terminals that can't write on the last character of the screen without scrolling the entire screen. If your terminal has no problem writing there (Linux console, vt100, vt102, xterm, ...) set it to ‘ON’. Otherwise (hpterm), it should be ‘OFF’.

StartupScrollStep

This variable specifies the scroll step initial value for both panels.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

4.2.3 gitfm Sections


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

4.2.3.1 gitfm Setup

In this section the variables have only one field.

StartupFileDisplayMode

This variable specifies the file specific information displayed at startup. It can be any of ‘OwnerGroup’, ‘DateTime’, ‘Size’, ‘AbbrevSize’, ‘Mode’ or ‘FullName’. Its value initially affects both panels but it can be changed separately afterward.

StartupFileSortMethod

This variable specifies the startup sort method. It can be any of ‘Name’, ‘Extension’, ‘Size’, ‘Date’, ‘Mode’, ‘OwnerId’, ‘GroupId’, ‘OwnerName’ or ‘GroupName’. Its value initially affects both panels but it can be changed separately afterward.

MaxUnscaledDigits

Maximum number of digits a number may be before being scaled (e.g. to ‘123M’). If you want number to always be scaled, either set this to ‘0’, or set ‘StartupFileDisplayMode’ to ‘AbbrevSize’. Note that scaling may happen anyway if the number is too large for the display field.

GroupDigits

If this variable is ‘ON’, digits of file sizes will be grouped according to your locale, (e.g. ‘123,456,789’).

ConfirmOnExit

If this variable is ‘ON’, the user is prompted for confirmation at exit.

HistoryFile

This variable specifies the history file name. The default value is ‘~/.githistory’.

InfoDisplay

If this variable is ‘OFF’, auxiliary file informations are not displayed. This can be useful if you are using a very slow terminal.

LeadingDotMatch

If this variable is ‘OFF’ when matching files for select-files-matching-pattern / unselect-files-matching-pattern then the leading '.' in the file name is matched only explicitly.

TypeSensitivity

If this variable is ‘OFF’, colors are not used when displaying files. Normally, the information in the ‘GITFM-FTI’ section is used to display files with different colors, depending on their types. Note that ‘TypeSensitivity’ is automatically set to ‘OFF’ when ‘AnsiColors’ is ‘OFF’. See section Setting up colors for different file types, for mor information.

NormalModeHelp’ ‘CommandLineModeHelp

These variables describe the status bar contents for each gitfm mode when no errors occurred. gitfm can display on the status bar a help string and/or some system information (system type, hostname, machine type and the current date) using escape characters:

 
	\s      ->      the system type
	\h      ->      the host name
	\m      ->      the machine type
	\d      ->      the current date

See section Panel modes, for more information.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

4.2.3.2 Using gitfm on color displays

In this sections the variables have only one field.

These section allows you to customize the colors of gitfm. Reading the ‘gnuitrc.TERM’ configuration file is self explanatory.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

4.2.3.3 Using gitfm on monochrome displays

In this sections the variables have only one field.

These section allows you to customize the appearance of gitfm on monochrome displays. Reading the ‘gnuitrc.TERM’ configuration file is self explanatory.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

4.2.3.4 Defining keys

These section describes the actions gitfm takes when a specified key is pressed. A variable can have up to 6 fields separated by ';'. Each line in this section looks like:

 
key-sequence’ = ‘command-name’;‘formatted-command’;‘new-dir’;
	       ‘save-screen’;‘pause’;‘hide

Note that you can't continue the variable fields description on the next line.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

4.2.3.5 The key-sequence field

key-sequence’ is the key sequence associated with the given command. You can use any key sequence that doesn't start with an ascii character (0x20 to 0x7e).

Symbolic key names (F0, F1, F2, ... F10, UP, DOWN, RIGHT, LEFT, INS, DEL, HOME, END, PGUP and PGDOWN) can be used instead of the key sequence. If some keys don't have a ‘termcap’/ ‘terminfo’ description (like the F11/F12 keys on the Linux console) you can specify the key sequence in the usual way.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

4.2.3.6 The command-name field

command-name’ is a command generic name. Even if it is not always used, the ‘command-name’ must be present (if a command is associated with a ‘key-sequence’). If it is not, no action will be taken when pressing ‘key-sequence’.

There are two types of commands in gitfm: built-in commands and user defined commands. If the ‘command-name’ section contains a built-in command specification, the other fields are ignored.

Note that by convention built-in command names contain only lower case letters while user defined command names contain only upper case letters.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

4.2.3.7 The formatted-command field

formatted-command’ is a shell command which can contain some scanf(3)-like format specifiers. They are used to get the current entry name, owner, group, mode, etc.

Note that using uppercase ‘format specifiers’ you will be able to access the other panel path, file and directory names, etc.

These are the available ‘format specifiers’:


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

4.2.3.8 The %s format specifier

The format of %s is: %s{question,default_answer}.

When gitfm encounters a %s in the ‘formatted-command’ it asks the user the question ‘question’ whose default answer is ‘default_answer’ and replaces the ‘%s{ , }’ with the user's answer. Both ‘question’ and ‘default_answer’ can contain any other ‘format specifiers’ except %s.

Note that there should be no spaces between %s and '{'.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

4.2.3.9 The %f format specifier

gitfm will replace %f with the current directory entry name only if it is a file (not a directory).


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

4.2.3.10 The %d format specifier

gitfm will replace %d with the current directory entry name only if it is a directory (not a file).


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

4.2.3.11 The %l format specifier

gitfm will replace %l with the current directory entry name only if it is a symbolic link with no target.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

4.2.3.12 The %t format specifier

gitfm will replace %t with the current directory entry name only if it is a named pipe.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

4.2.3.13 The %z format specifier

gitfm will replace %z with the current directory entry name only if it is a socket.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

4.2.3.14 The %a format specifier

gitfm will always replace %a with the current directory entry name.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

4.2.3.15 The %m format specifier

gitfm will always replace %m with the current file mode.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

4.2.3.16 The %g format specifier

gitfm will always replace %g with the current file group.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

4.2.3.17 The %o format specifier

gitfm will always replace %o with the current file owner.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

4.2.3.18 The %p format specifier

gitfm will always replace %p with the current panel path.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

4.2.3.19 The %b format specifier

gitfm will always replace %b with the current panel directory name.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

4.2.3.20 The %i format specifier

gitfm will always replace %i with all the current panel selected entry names.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

4.2.3.21 The %? format specifier

The format of %? is: %?{confirmation}.

gitfm uses this format specifier only to ask for confirmation before expanding / executing the current command. The ‘confirmation’ string is displayed and, if the user doesn't confirm, the command is aborted. Otherwise, %?{confirmation} expands to a null string and the command is expanded / executed normally.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

4.2.3.22 The new-dir field

If the ‘formatted-command’ successfully exits (exit code = 0) or it has no body and this field is present then ‘new-dir’ will become the current panel directory.

The character '~' used at the beginning of the ‘new-dir’ field is replaced by the user's home directory.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

4.2.3.23 The save-screen field

This field is a character (usually 'y' or 'n') that tells gitfm to save ('y') or not to save ('n') the terminal's screen after executing the ‘formatted-command’. Saving the screen is not necessary while editing or viewing a file because the information left after the editor or the viewer exits is not important. Saving the screen means that that screen will be restored before the execution of the next command. Currently this field is used only if you are working as a super user under Linux on a virtual console. Its default value is 'y'.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

4.2.3.24 The pause field

Users may wish to read the result of some commands before repainting the panels. If this field is present gitfm will wait for a key to be pressed before restoring the panels. Its default value is 'n'.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

4.2.3.25 The hide field

Some commands that don't displaying any useful information if successfully complete their execution: mount, chmod, chown, chgrp, sync ... and, if an error occurs, a line or two are sent to stderr. If this option is 'y', the stdout and stderr will be redirected to some files (‘git.1.pid’ and ‘git.2.pid’, where pid is gitfm's pid) and only if the command's exit code is not 0, the ‘git.2.pid’ file will be displayed, line by line, onto the status bar. This way the panels will not be deleted and then repainted and the command appears to be built-in. ‘git.1.pid’ and ‘git.2.pid’ are created in the temporary directory specified in the TMPDIR environment variable (or "/tmp" if TMPDIR is not defined). The default value of the hide field is 'n'.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

4.2.4 Setting up colors for different file types

This sections contains entries of the form:

 
pattern’ = ‘foreground’; ‘background’; ‘brightness

where ‘pattern’ is a file name matching pattern, ‘foreground’, ‘background’ and ‘brightness’ are the color specification to be used when a file whose name match the given ‘pattern’ is displayed in a panel. Colors can be turned off using the ‘TypeSensitivity’ variable in the ‘GITFM-Setup’ section.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

4.2.5 gitps Sections


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

4.2.5.1 gitps Setup

In this section the variables have only one field.

Help

This variable describe gitps's status bar contents.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

4.2.5.2 Using gitps on color displays

In this sections the variables have only one field.

These section allows you to customize the colors of gitps. Reading the ‘gnuitrc.TERM’ configuration file is self explanatory.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

4.2.5.3 Using gitps on monochrome displays

In this sections the variables have only one field.

These section allows you to customize the appearance of gitps on monochrome displays. Reading the ‘gnuitrc.TERM’ configuration file is self explanatory.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

4.2.5.4 Defining keys


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

4.2.6 gitview Sections


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

4.2.6.1 gitview Setup

In this section the variables have only one field.

Help

This variable describe gitps's status bar contents.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

4.2.6.2 Using gitview on color displays

In this sections the variables have only one field.

These section allows you to customize the colors of gitview. Reading the ‘gnuitrc.TERM’ configuration file is self explanatory.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

4.2.6.3 Using gitview on monochrome displays

In this sections the variables have only one field.

These section allows you to customize the appearance of gitview on monochrome displays. Reading the ‘gnuitrc.TERM’ configuration file is self explanatory.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

4.2.6.4 Defining keys


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

5. GNU Interactive Tools limitations

Background commands (& terminated)can be specified in the configuration file but their result (stdout and stderr redirection), will be overwritten by the result of newer commands and, if an error occurs, it will not be seen.

When gitfm is compiled for Linux, the default built-in color descriptions are for color monitors, so you can't (decently) run gitfm on a b/w monitor without the ‘gnuitrc.TERM’ file correctly configured. ‘gnuitrc.TERM’ should be configured with ‘AnsiColors’ = OFF. However, if your system knows about the linux-m terminal type, using that may be a better solution.

Job support is implemented only in gitfm.

Due to the fact that the ';' character is used as a field separator in the configuration files, you can't write something like that in the ‘gnuitrc.TERM’ files:

^AAA = SHOW-USERS-AND-GROUPS; more /etc/passwd; more /etc/group

because 'more /etc/group' will be considered as a directory to switch to. You must write a small script instead:

#! /bin/sh

more /etc/passwd more /etc/group

Supposing the script name is show_ug, the ‘gnuitrc.TERM’ line will look like this:

^AAA = SHOW-USERS-AND-GROUPS; show_ug

There is no support for appearance modes on magic-cookie terminals.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

6. GNU Interactive Tools bugs

Any questions, comments, or bug reports, should be emailed to ‘gnuit-dev@gnu.org’. Please include the version number.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

A. Copying This Manual

Version 1.3, 3 November 2008

 
Copyright © 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc.
http://fsf.org/

Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
  1. PREAMBLE

    The purpose of this License is to make a manual, textbook, or other functional and useful document free in the sense of freedom: to assure everyone the effective freedom to copy and redistribute it, with or without modifying it, either commercially or noncommercially. Secondarily, this License preserves for the author and publisher a way to get credit for their work, while not being considered responsible for modifications made by others.

    This License is a kind of “copyleft”, which means that derivative works of the document must themselves be free in the same sense. It complements the GNU General Public License, which is a copyleft license designed for free software.

    We have designed this License in order to use it for manuals for free software, because free software needs free documentation: a free program should come with manuals providing the same freedoms that the software does. But this License is not limited to software manuals; it can be used for any textual work, regardless of subject matter or whether it is published as a printed book. We recommend this License principally for works whose purpose is instruction or reference.

  2. APPLICABILITY AND DEFINITIONS

    This License applies to any manual or other work, in any medium, that contains a notice placed by the copyright holder saying it can be distributed under the terms of this License. Such a notice grants a world-wide, royalty-free license, unlimited in duration, to use that work under the conditions stated herein. The “Document”, below, refers to any such manual or work. Any member of the public is a licensee, and is addressed as “you”. You accept the license if you copy, modify or distribute the work in a way requiring permission under copyright law.

    A “Modified Version” of the Document means any work containing the Document or a portion of it, either copied verbatim, or with modifications and/or translated into another language.

    A “Secondary Section” is a named appendix or a front-matter section of the Document that deals exclusively with the relationship of the publishers or authors of the Document to the Document's overall subject (or to related matters) and contains nothing that could fall directly within that overall subject. (Thus, if the Document is in part a textbook of mathematics, a Secondary Section may not explain any mathematics.) The relationship could be a matter of historical connection with the subject or with related matters, or of legal, commercial, philosophical, ethical or political position regarding them.

    The “Invariant Sections” are certain Secondary Sections whose titles are designated, as being those of Invariant Sections, in the notice that says that the Document is released under this License. If a section does not fit the above definition of Secondary then it is not allowed to be designated as Invariant. The Document may contain zero Invariant Sections. If the Document does not identify any Invariant Sections then there are none.

    The “Cover Texts” are certain short passages of text that are listed, as Front-Cover Texts or Back-Cover Texts, in the notice that says that the Document is released under this License. A Front-Cover Text may be at most 5 words, and a Back-Cover Text may be at most 25 words.

    A “Transparent” copy of the Document means a machine-readable copy, represented in a format whose specification is available to the general public, that is suitable for revising the document straightforwardly with generic text editors or (for images composed of pixels) generic paint programs or (for drawings) some widely available drawing editor, and that is suitable for input to text formatters or for automatic translation to a variety of formats suitable for input to text formatters. A copy made in an otherwise Transparent file format whose markup, or absence of markup, has been arranged to thwart or discourage subsequent modification by readers is not Transparent. An image format is not Transparent if used for any substantial amount of text. A copy that is not “Transparent” is called “Opaque”.

    Examples of suitable formats for Transparent copies include plain ASCII without markup, Texinfo input format, LaTeX input format, SGML or XML using a publicly available DTD, and standard-conforming simple HTML, PostScript or PDF designed for human modification. Examples of transparent image formats include PNG, XCF and JPG. Opaque formats include proprietary formats that can be read and edited only by proprietary word processors, SGML or XML for which the DTD and/or processing tools are not generally available, and the machine-generated HTML, PostScript or PDF produced by some word processors for output purposes only.

    The “Title Page” means, for a printed book, the title page itself, plus such following pages as are needed to hold, legibly, the material this License requires to appear in the title page. For works in formats which do not have any title page as such, “Title Page” means the text near the most prominent appearance of the work's title, preceding the beginning of the body of the text.

    The “publisher” means any person or entity that distributes copies of the Document to the public.

    A section “Entitled XYZ” means a named subunit of the Document whose title either is precisely XYZ or contains XYZ in parentheses following text that translates XYZ in another language. (Here XYZ stands for a specific section name mentioned below, such as “Acknowledgements”, “Dedications”, “Endorsements”, or “History”.) To “Preserve the Title” of such a section when you modify the Document means that it remains a section “Entitled XYZ” according to this definition.

    The Document may include Warranty Disclaimers next to the notice which states that this License applies to the Document. These Warranty Disclaimers are considered to be included by reference in this License, but only as regards disclaiming warranties: any other implication that these Warranty Disclaimers may have is void and has no effect on the meaning of this License.

  3. VERBATIM COPYING

    You may copy and distribute the Document in any medium, either commercially or noncommercially, provided that this License, the copyright notices, and the license notice saying this License applies to the Document are reproduced in all copies, and that you add no other conditions whatsoever to those of this License. You may not use technical measures to obstruct or control the reading or further copying of the copies you make or distribute. However, you may accept compensation in exchange for copies. If you distribute a large enough number of copies you must also follow the conditions in section 3.

    You may also lend copies, under the same conditions stated above, and you may publicly display copies.

  4. COPYING IN QUANTITY

    If you publish printed copies (or copies in media that commonly have printed covers) of the Document, numbering more than 100, and the Document's license notice requires Cover Texts, you must enclose the copies in covers that carry, clearly and legibly, all these Cover Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on the back cover. Both covers must also clearly and legibly identify you as the publisher of these copies. The front cover must present the full title with all words of the title equally prominent and visible. You may add other material on the covers in addition. Copying with changes limited to the covers, as long as they preserve the title of the Document and satisfy these conditions, can be treated as verbatim copying in other respects.

    If the required texts for either cover are too voluminous to fit legibly, you should put the first ones listed (as many as fit reasonably) on the actual cover, and continue the rest onto adjacent pages.

    If you publish or distribute Opaque copies of the Document numbering more than 100, you must either include a machine-readable Transparent copy along with each Opaque copy, or state in or with each Opaque copy a computer-network location from which the general network-using public has access to download using public-standard network protocols a complete Transparent copy of the Document, free of added material. If you use the latter option, you must take reasonably prudent steps, when you begin distribution of Opaque copies in quantity, to ensure that this Transparent copy will remain thus accessible at the stated location until at least one year after the last time you distribute an Opaque copy (directly or through your agents or retailers) of that edition to the public.

    It is requested, but not required, that you contact the authors of the Document well before redistributing any large number of copies, to give them a chance to provide you with an updated version of the Document.

  5. MODIFICATIONS

    You may copy and distribute a Modified Version of the Document under the conditions of sections 2 and 3 above, provided that you release the Modified Version under precisely this License, with the Modified Version filling the role of the Document, thus licensing distribution and modification of the Modified Version to whoever possesses a copy of it. In addition, you must do these things in the Modified Version:

    1. Use in the Title Page (and on the covers, if any) a title distinct from that of the Document, and from those of previous versions (which should, if there were any, be listed in the History section of the Document). You may use the same title as a previous version if the original publisher of that version gives permission.
    2. List on the Title Page, as authors, one or more persons or entities responsible for authorship of the modifications in the Modified Version, together with at least five of the principal authors of the Document (all of its principal authors, if it has fewer than five), unless they release you from this requirement.
    3. State on the Title page the name of the publisher of the Modified Version, as the publisher.
    4. Preserve all the copyright notices of the Document.
    5. Add an appropriate copyright notice for your modifications adjacent to the other copyright notices.
    6. Include, immediately after the copyright notices, a license notice giving the public permission to use the Modified Version under the terms of this License, in the form shown in the Addendum below.
    7. Preserve in that license notice the full lists of Invariant Sections and required Cover Texts given in the Document's license notice.
    8. Include an unaltered copy of this License.
    9. Preserve the section Entitled “History”, Preserve its Title, and add to it an item stating at least the title, year, new authors, and publisher of the Modified Version as given on the Title Page. If there is no section Entitled “History” in the Document, create one stating the title, year, authors, and publisher of the Document as given on its Title Page, then add an item describing the Modified Version as stated in the previous sentence.
    10. Preserve the network location, if any, given in the Document for public access to a Transparent copy of the Document, and likewise the network locations given in the Document for previous versions it was based on. These may be placed in the “History” section. You may omit a network location for a work that was published at least four years before the Document itself, or if the original publisher of the version it refers to gives permission.
    11. For any section Entitled “Acknowledgements” or “Dedications”, Preserve the Title of the section, and preserve in the section all the substance and tone of each of the contributor acknowledgements and/or dedications given therein.
    12. Preserve all the Invariant Sections of the Document, unaltered in their text and in their titles. Section numbers or the equivalent are not considered part of the section titles.
    13. Delete any section Entitled “Endorsements”. Such a section may not be included in the Modified Version.
    14. Do not retitle any existing section to be Entitled “Endorsements” or to conflict in title with any Invariant Section.
    15. Preserve any Warranty Disclaimers.

    If the Modified Version includes new front-matter sections or appendices that qualify as Secondary Sections and contain no material copied from the Document, you may at your option designate some or all of these sections as invariant. To do this, add their titles to the list of Invariant Sections in the Modified Version's license notice. These titles must be distinct from any other section titles.

    You may add a section Entitled “Endorsements”, provided it contains nothing but endorsements of your Modified Version by various parties—for example, statements of peer review or that the text has been approved by an organization as the authoritative definition of a standard.

    You may add a passage of up to five words as a Front-Cover Text, and a passage of up to 25 words as a Back-Cover Text, to the end of the list of Cover Texts in the Modified Version. Only one passage of Front-Cover Text and one of Back-Cover Text may be added by (or through arrangements made by) any one entity. If the Document already includes a cover text for the same cover, previously added by you or by arrangement made by the same entity you are acting on behalf of, you may not add another; but you may replace the old one, on explicit permission from the previous publisher that added the old one.

    The author(s) and publisher(s) of the Document do not by this License give permission to use their names for publicity for or to assert or imply endorsement of any Modified Version.

  6. COMBINING DOCUMENTS

    You may combine the Document with other documents released under this License, under the terms defined in section 4 above for modified versions, provided that you include in the combination all of the Invariant Sections of all of the original documents, unmodified, and list them all as Invariant Sections of your combined work in its license notice, and that you preserve all their Warranty Disclaimers.

    The combined work need only contain one copy of this License, and multiple identical Invariant Sections may be replaced with a single copy. If there are multiple Invariant Sections with the same name but different contents, make the title of each such section unique by adding at the end of it, in parentheses, the name of the original author or publisher of that section if known, or else a unique number. Make the same adjustment to the section titles in the list of Invariant Sections in the license notice of the combined work.

    In the combination, you must combine any sections Entitled “History” in the various original documents, forming one section Entitled “History”; likewise combine any sections Entitled “Acknowledgements”, and any sections Entitled “Dedications”. You must delete all sections Entitled “Endorsements.”

  7. COLLECTIONS OF DOCUMENTS

    You may make a collection consisting of the Document and other documents released under this License, and replace the individual copies of this License in the various documents with a single copy that is included in the collection, provided that you follow the rules of this License for verbatim copying of each of the documents in all other respects.

    You may extract a single document from such a collection, and distribute it individually under this License, provided you insert a copy of this License into the extracted document, and follow this License in all other respects regarding verbatim copying of that document.

  8. AGGREGATION WITH INDEPENDENT WORKS

    A compilation of the Document or its derivatives with other separate and independent documents or works, in or on a volume of a storage or distribution medium, is called an “aggregate” if the copyright resulting from the compilation is not used to limit the legal rights of the compilation's users beyond what the individual works permit. When the Document is included in an aggregate, this License does not apply to the other works in the aggregate which are not themselves derivative works of the Document.

    If the Cover Text requirement of section 3 is applicable to these copies of the Document, then if the Document is less than one half of the entire aggregate, the Document's Cover Texts may be placed on covers that bracket the Document within the aggregate, or the electronic equivalent of covers if the Document is in electronic form. Otherwise they must appear on printed covers that bracket the whole aggregate.

  9. TRANSLATION

    Translation is considered a kind of modification, so you may distribute translations of the Document under the terms of section 4. Replacing Invariant Sections with translations requires special permission from their copyright holders, but you may include translations of some or all Invariant Sections in addition to the original versions of these Invariant Sections. You may include a translation of this License, and all the license notices in the Document, and any Warranty Disclaimers, provided that you also include the original English version of this License and the original versions of those notices and disclaimers. In case of a disagreement between the translation and the original version of this License or a notice or disclaimer, the original version will prevail.

    If a section in the Document is Entitled “Acknowledgements”, “Dedications”, or “History”, the requirement (section 4) to Preserve its Title (section 1) will typically require changing the actual title.

  10. TERMINATION

    You may not copy, modify, sublicense, or distribute the Document except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, or distribute it is void, and will automatically terminate your rights under this License.

    However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation.

    Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice.

    Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, receipt of a copy of some or all of the same material does not give you any rights to use it.

  11. FUTURE REVISIONS OF THIS LICENSE

    The Free Software Foundation may publish new, revised versions of the GNU Free Documentation 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. See http://www.gnu.org/copyleft/.

    Each version of the License is given a distinguishing version number. If the Document specifies that a particular numbered version of this License “or any later version” applies to it, you have the option of following the terms and conditions either of that specified version or of any later version that has been published (not as a draft) by the Free Software Foundation. If the Document does not specify a version number of this License, you may choose any version ever published (not as a draft) by the Free Software Foundation. If the Document specifies that a proxy can decide which future versions of this License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Document.

  12. RELICENSING

    “Massive Multiauthor Collaboration Site” (or “MMC Site”) means any World Wide Web server that publishes copyrightable works and also provides prominent facilities for anybody to edit those works. A public wiki that anybody can edit is an example of such a server. A “Massive Multiauthor Collaboration” (or “MMC”) contained in the site means any set of copyrightable works thus published on the MMC site.

    “CC-BY-SA” means the Creative Commons Attribution-Share Alike 3.0 license published by Creative Commons Corporation, a not-for-profit corporation with a principal place of business in San Francisco, California, as well as future copyleft versions of that license published by that same organization.

    “Incorporate” means to publish or republish a Document, in whole or in part, as part of another Document.

    An MMC is “eligible for relicensing” if it is licensed under this License, and if all works that were first published under this License somewhere other than this MMC, and subsequently incorporated in whole or in part into the MMC, (1) had no cover texts or invariant sections, and (2) were thus incorporated prior to November 1, 2008.

    The operator of an MMC Site may republish an MMC contained in the site under CC-BY-SA on the same site at any time before August 1, 2009, provided the MMC is eligible for relicensing.

ADDENDUM: How to use this License for your documents

To use this License in a document you have written, include a copy of the License in the document and put the following copyright and license notices just after the title page:

 
  Copyright (C)  year  your name.
  Permission is granted to copy, distribute and/or modify this document
  under the terms of the GNU Free Documentation License, Version 1.3
  or any later version published by the Free Software Foundation;
  with no Invariant Sections, no Front-Cover Texts, and no Back-Cover
  Texts.  A copy of the license is included in the section entitled ``GNU
  Free Documentation License''.

If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts, replace the “with…Texts.” line with this:

 
    with the Invariant Sections being list their titles, with
    the Front-Cover Texts being list, and with the Back-Cover Texts
    being list.

If you have Invariant Sections without Cover Texts, or some other combination of the three, merge those two alternatives to suit the situation.

If your document contains nontrivial examples of program code, we recommend releasing these examples in parallel under your choice of free software license, such as the GNU General Public License, to permit their use in free software.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

Key Index

Jump to:   ^  
D   E   F   H   I   P   T   U  
Index Entry Section

^
^[]3.1.3 Panel modes
^]3.1.3 Panel modes
^A3.1.8.2 Moving Point
^B, LEFT3.1.8.2 Moving Point
^C -3.1.9.20 Managing tar based archive files
^C .3.1.9.12 Compressing Files
^C /3.1.9.7 Splitting files into smaller parts
^C 2 a3.1.12 Sending/receiving ascii/binary mail
^C 2 b3.1.12 Sending/receiving ascii/binary mail
^C 2 m3.1.12 Sending/receiving ascii/binary mail
^C =3.1.9.15 Comparing Files
^C ^D A3.1.9.21 Working with DPKG
^C ^D c3.1.9.21 Working with DPKG
^C ^D C3.1.9.21 Working with DPKG
^C ^D f3.1.9.21 Working with DPKG
^C ^D h3.1.9.21 Working with DPKG
^C ^D I3.1.9.21 Working with DPKG
^C ^D i3.1.9.21 Working with DPKG
^C ^D l3.1.9.21 Working with DPKG
^C ^D L3.1.9.21 Working with DPKG
^C ^D P3.1.9.21 Working with DPKG
^C ^D p3.1.9.21 Working with DPKG
^C ^D r3.1.9.21 Working with DPKG
^C ^D R A3.1.9.21 Working with DPKG
^C ^D R i3.1.9.21 Working with DPKG
^C ^D R u3.1.9.21 Working with DPKG
^C ^D s3.1.9.21 Working with DPKG
^C ^D S3.1.9.21 Working with DPKG
^C ^D u3.1.9.21 Working with DPKG
^C a3.1.9.20 Managing tar based archive files
^C B3.1.9.15 Comparing Files
^C b -3.1.9.20 Managing tar based archive files
^C b .3.1.9.12 Compressing Files
^C b /3.1.9.7 Splitting files into smaller parts
^C b 2 a3.1.12 Sending/receiving ascii/binary mail
^C b 2 b3.1.12 Sending/receiving ascii/binary mail
^C b 2 m3.1.12 Sending/receiving ascii/binary mail
^C b a3.1.9.20 Managing tar based archive files
^C b C3.1.9.1 Copying Files
^C b C (for directories)3.1.10.2 Copying directories
^C b D3.1.9.4 Deleting Files
^C b d3.1.10.6 Comparing Directories
^C b D (for directories)3.1.10.3 Deleting directories
^C b E3.1.9.13 Encoding Files
^C b e3.1.9.13 Encoding Files
^C b f Z3.1.9.12 Compressing Files
^C b G3.1.9.9 Changing a file's mode, owner and group
^C b H3.1.9.5 Linking Files
^C b i3.1.9.22 Installing and Uninstalling RPM packages
^C b I3.1.9.22 Installing and Uninstalling RPM packages
^C b K3.1.9.13 Encoding Files
^C b k3.1.9.13 Encoding Files
^C b M3.1.9.9 Changing a file's mode, owner and group
^C b m D3.1.9.24 Accessing MSDOS Files
^C b m F3.1.9.24 Accessing MSDOS Files
^C b m G3.1.9.24 Accessing MSDOS Files
^C b m K3.1.9.24 Accessing MSDOS Files
^C b m M3.1.9.24 Accessing MSDOS Files
^C b m P3.1.9.24 Accessing MSDOS Files
^C b m R3.1.9.24 Accessing MSDOS Files
^C b N3.1.9.22 Installing and Uninstalling RPM packages
^C b O3.1.9.9 Changing a file's mode, owner and group
^C b o3.1.9.12 Compressing Files
^C b R3.1.9.6 Renaming Files
^C b R (for directories)3.1.10.5 Renaming directories
^C b r G3.1.9.9 Changing a file's mode, owner and group
^C b r M3.1.9.9 Changing a file's mode, owner and group
^C b r O3.1.9.9 Changing a file's mode, owner and group
^C b S3.1.9.5 Linking Files
^C b T3.1.9.2 Moving Files
^C b T (for directories)3.1.10.4 Moving directories
^C b V3.1.9.20 Managing tar based archive files
^C b X3.1.9.20 Managing tar based archive files
^C b x3.1.9.20 Managing tar based archive files
^C b z3.1.9.12 Compressing Files
^C b Z3.1.9.12 Compressing Files
^C C (for directories)3.1.10.2 Copying directories
^C c q3.1.10.6 Comparing Directories
^C c t3.1.10.6 Comparing Directories
^C d3.1.10.6 Comparing Directories
^C D (for directories)3.1.10.3 Deleting directories
^C e3.1.9.13 Encoding Files
^C E3.1.9.13 Encoding Files
^C ESC =3.1.9.15 Comparing Files
^C f d3.1.10.6 Comparing Directories
^C f Z3.1.9.12 Compressing Files
^C G3.1.9.9 Changing a file's mode, owner and group
^C H3.1.9.5 Linking Files
^C I3.1.9.22 Installing and Uninstalling RPM packages
^C i3.1.9.22 Installing and Uninstalling RPM packages
^C j3.1.9.17 Printing Files
^C J3.1.9.17 Printing Files
^C k3.1.9.13 Encoding Files
^C K3.1.9.13 Encoding Files
^C M3.1.9.9 Changing a file's mode, owner and group
^C m D3.1.9.24 Accessing MSDOS Files
^C m d, ^C m ^D3.1.9.24 Accessing MSDOS Files
^C m F3.1.9.24 Accessing MSDOS Files
^C m G3.1.9.24 Accessing MSDOS Files
^C m K3.1.9.24 Accessing MSDOS Files
^C m L3.1.9.24 Accessing MSDOS Files
^C m M3.1.9.24 Accessing MSDOS Files
^C m P3.1.9.24 Accessing MSDOS Files
^C m R3.1.9.24 Accessing MSDOS Files
^C m T3.1.9.24 Accessing MSDOS Files
^C N3.1.9.22 Installing and Uninstalling RPM packages
^C n d3.1.9.6 Renaming Files
^C n u3.1.9.6 Renaming Files
^C o3.1.9.12 Compressing Files
^C O3.1.9.9 Changing a file's mode, owner and group
^C P3.1.9.14 Encrypting Files
^C p3.1.9.14 Encrypting Files
^C q3.1.9.22 Installing and Uninstalling RPM packages
^C R3.1.9.6 Renaming Files
^C R (for directories)3.1.10.5 Renaming directories
^C r G3.1.9.9 Changing a file's mode, owner and group
^C r M3.1.9.9 Changing a file's mode, owner and group
^C r O3.1.9.9 Changing a file's mode, owner and group
^C s3.1.6 Selecting files
^C S3.1.9.5 Linking Files
^C t3.1.9.23 File Types
^C T (for directories)3.1.10.4 Moving directories
^C U3.1.10.7 Summarize directory usage
^C u3.1.6 Selecting files
^C V3.1.9.20 Managing tar based archive files
^C W3.1.9.18 Wiping Files
^C x3.1.9.20 Managing tar based archive files
^C X3.1.9.20 Managing tar based archive files
^C Z3.1.9.12 Compressing Files
^C z3.1.9.12 Compressing Files
^C ~3.1.9.8 Packing files into the minimum number of bins
^E3.1.8.2 Moving Point
^F, RIGHT3.1.8.2 Moving Point
^H, BKSPC3.1.8.3 Deleting and killing text
^K3.1.8.3 Deleting and killing text
^L3.1.16 Refreshing the screen contents
^O, ESC o3.1.3 Panel modes
^R, ^Xr3.1.7 Incremental searching files in a panel
^S, ^Xs3.1.7 Incremental searching files in a panel
^SPC3.1.8.6 Commands to set the mark
^U3.1.8.3 Deleting and killing text
^W3.1.8.3 Deleting and killing text
^X 03.1.3 Panel modes
^X 13.1.3 Panel modes
^X 23.1.3 Panel modes
^X 4 a3.1.9.10 Editing Files
^X ^A3.1.23 Reading the documentation
^X ^F3.1.9.10 Editing Files
^X ^I3.1.8.1 Inserting Text
^X ^L3.1.17 Resetting your terminal
^X ^P3.1.10.9 Directory History
^X ^R3.1.10.9 Directory History
^X ^X3.1.8.6 Commands to set the mark
^X b m3.1.11 Compiling programs
^X d, ^X ^D3.1.10.8 Changing directories
^X E3.1.20 How to look at the environment variables
^X e3.1.9.10 Editing Files
^X G3.1.14 Using grep and recursive grep
^X g3.1.14 Using grep and recursive grep
^X h3.1.23 Reading the documentation
^X H3.1.20 How to look at the environment variables
^X I3.1.9.16 Spell Checking Files
^X k3.1.21 Viewing/killing processes
^X N3.1.10.9 Directory History
^X p3.1.15 Locking your console
^X P3.1.5 Moving the cursor in the panel
^X q3.1.23 Reading the documentation
^X S3.1.22 Synchronizing the file systems
^X T3.1.19 Getting some useful system information
^X v3.1.9.11 Viewing Files
^X W3.1.9.19 Searching Files
^X w3.1.9.19 Searching Files
^X z3.1.13 Starting a sub-shell
^Y3.1.8.7 Reinserting recently killed text

D
DEL, ^D3.1.8.3 Deleting and killing text
DOWN, ^N3.1.5 Moving the cursor in the panel

E
END, ESC >3.1.5 Moving the cursor in the panel
ESC %3.1.9.19 Searching Files
ESC &3.1.9.19 Searching Files
ESC +3.1.6 Selecting files
ESC -3.1.6 Selecting files
ESC .3.1.10.10 Hot Keys
ESC /3.1.10.10 Hot Keys
ESC 5 (for directories)3.1.10.2 Copying directories
ESC 6 (for directories)3.1.10.4 Moving directories
ESC 8 (for directories)3.1.10.3 Deleting directories
ESC \3.1.8.3 Deleting and killing text
ESC a c3.1.10.8 Changing directories
ESC a o3.1.10.8 Changing directories
ESC b3.1.8.2 Moving Point
ESC BKSPC3.1.8.3 Deleting and killing text
ESC c3.1.8.4 Case conversion of words.
ESC d3.1.8.3 Deleting and killing text
ESC e a3.1.3 Panel modes
ESC e d3.1.3 Panel modes
ESC e f3.1.3 Panel modes
ESC e m3.1.3 Panel modes
ESC e o3.1.3 Panel modes
ESC e s3.1.3 Panel modes
ESC e S3.1.3 Panel modes
ESC ESC 13.1.10.10 Hot Keys
ESC ESC 23.1.10.10 Hot Keys
ESC ESC RET3.1.8.1 Inserting Text
ESC f3.1.8.2 Moving Point
ESC g3.1.5 Moving the cursor in the panel
ESC h3.1.10.10 Hot Keys
ESC i3.1.10.10 Hot Keys
ESC j3.1.5 Moving the cursor in the panel
ESC k3.1.8.3 Deleting and killing text
ESC l3.1.8.4 Case conversion of words.
ESC m a3.1.18 Mounting/unmounting file systems
ESC m b3.1.18 Mounting/unmounting file systems
ESC m c3.1.18 Mounting/unmounting file systems
ESC m f3.1.18 Mounting/unmounting file systems
ESC m j3.1.18 Mounting/unmounting file systems
ESC m t3.1.18 Mounting/unmounting file systems
ESC m z3.1.18 Mounting/unmounting file systems
ESC n3.1.8.5 Reusing recent input line arguments
ESC p3.1.8.5 Reusing recent input line arguments
ESC P a, ESC P l, ESC P u3.1.21 Viewing/killing processes
ESC P b, ESC P c, ESC P e3.1.21 Viewing/killing processes
ESC P T3.1.21 Viewing/killing processes
ESC P x, ESC P y3.1.21 Viewing/killing processes
ESC r a3.1.18 Mounting/unmounting file systems
ESC r b3.1.18 Mounting/unmounting file systems
ESC r c3.1.18 Mounting/unmounting file systems
ESC r f3.1.18 Mounting/unmounting file systems
ESC r j3.1.18 Mounting/unmounting file systems
ESC r t3.1.18 Mounting/unmounting file systems
ESC r z3.1.18 Mounting/unmounting file systems
ESC RET3.1.8.1 Inserting Text
ESC s d3.1.4 Sorting methods
ESC s e3.1.4 Sorting methods
ESC S f3.1.19 Getting some useful system information
ESC s g i3.1.4 Sorting methods
ESC s g n3.1.4 Sorting methods
ESC s m3.1.4 Sorting methods
ESC S m3.1.19 Getting some useful system information
ESC s n3.1.4 Sorting methods
ESC s o i3.1.4 Sorting methods
ESC s o n3.1.4 Sorting methods
ESC S q3.1.19 Getting some useful system information
ESC S s3.1.19 Getting some useful system information
ESC s s3.1.4 Sorting methods
ESC s u3.1.4 Sorting methods
ESC S u3.1.19 Getting some useful system information
ESC S v3.1.19 Getting some useful system information
ESC S w3.1.19 Getting some useful system information
ESC SPC3.1.8.3 Deleting and killing text
ESC u3.1.8.4 Case conversion of words.
ESC w3.1.8.3 Deleting and killing text
ESC x r m3.1.12 Sending/receiving ascii/binary mail

F
F1, ESC 1, ^X i3.1.23 Reading the documentation
F10, ESC 0, ^X ^C, ^X c3.1.24 Exiting GNU Interactive Tools
F2, ESC 2, ^X a3.1.9.25 A different action for each file type
F3, ESC 33.1.9.11 Viewing Files
F4, ESC 43.1.9.10 Editing Files
F5 (for directories)3.1.10.2 Copying directories
F5, ESC 5, ^C C3.1.9.1 Copying Files
F6 (for directories)3.1.10.4 Moving directories
F6, ESC 6, ^C T3.1.9.2 Moving Files
F7, ESC 7, ^X M3.1.10.1 Creating directories
F8 (for directories)3.1.10.3 Deleting directories
F8, ESC 8, ^C D3.1.9.4 Deleting Files
F9, ESC 9, ^X m3.1.11 Compiling programs

H
HOME, ESC <3.1.5 Moving the cursor in the panel

I
INS, ^T, ^X \, ^\3.1.6 Selecting files

P
PGDOWN, ^V3.1.5 Moving the cursor in the panel
PGUP, ESC v3.1.5 Moving the cursor in the panel

T
TAB, ^I, ^X o3.1.5 Moving the cursor in the panel

U
UP, ^P3.1.5 Moving the cursor in the panel

Jump to:   ^  
D   E   F   H   I   P   T   U  

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

Command Index

Jump to:   A   B   C   D   E   F   G   H   I   J   K   L   M   N   O   P   Q   R   S   T   U   V   W   X   Y  
Index Entry Section

A
adapt-current-directory3.1.10.8 Changing directories
Adapt-other-directory3.1.10.8 Changing directories
apropos3.1.23 Reading the documentation
ASCII-MAIL3.1.12 Sending/receiving ascii/binary mail

B
B-ASCII-MAIL3.1.12 Sending/receiving ascii/binary mail
B-BINARY-MAIL3.1.12 Sending/receiving ascii/binary mail
B-BZIP2-COMPRESS3.1.9.12 Compressing Files
B-BZIP2-UNCOMPRESS3.1.9.12 Compressing Files
B-CHGRP3.1.9.9 Changing a file's mode, owner and group
B-CHMOD3.1.9.9 Changing a file's mode, owner and group
B-CHOWN3.1.9.9 Changing a file's mode, owner and group
B-COMPRESS3.1.9.12 Compressing Files
B-COPY3.1.9.1 Copying Files
B-COPY (for directories)3.1.10.2 Copying directories
B-DELETE3.1.9.4 Deleting Files
B-DELETE (for directories)3.1.10.3 Deleting directories
B-DIRR-DIFF3.1.10.6 Comparing Directories
B-GENERIC-UNPACK3.1.9.20 Managing tar based archive files
B-GENERIC-UNPACK-INTO3.1.9.20 Managing tar based archive files
B-LINK3.1.9.5 Linking Files
B-MAKE3.1.11 Compiling programs
B-MIME-MAIL3.1.12 Sending/receiving ascii/binary mail
B-MIME-PACK3.1.9.13 Encoding Files
B-MIME-UNPACK3.1.9.13 Encoding Files
B-MOVE3.1.9.2 Moving Files
B-MOVE (for directories)3.1.10.4 Moving directories
B-MTOOLS-DELETE3.1.9.24 Accessing MSDOS Files
B-MTOOLS-FORMAT3.1.9.24 Accessing MSDOS Files
B-MTOOLS-GET3.1.9.24 Accessing MSDOS Files
B-MTOOLS-MKDIR3.1.9.24 Accessing MSDOS Files
B-MTOOLS-PUT3.1.9.24 Accessing MSDOS Files
B-MTOOLS-RENAME3.1.9.24 Accessing MSDOS Files
B-MTOOLS-RMDIR3.1.9.24 Accessing MSDOS Files
B-R-CHGRP3.1.9.9 Changing a file's mode, owner and group
B-R-CHMOD3.1.9.9 Changing a file's mode, owner and group
B-R-CHOWN3.1.9.9 Changing a file's mode, owner and group
B-RENAME3.1.9.6 Renaming Files
B-RENAME (for directories)3.1.10.5 Renaming directories
B-RPM-INSTALL3.1.9.22 Installing and Uninstalling RPM packages
B-RPM-UNINSTALL3.1.9.22 Installing and Uninstalling RPM packages
B-RPM-UPGRADE3.1.9.22 Installing and Uninstalling RPM packages
B-SPLIT3.1.9.7 Splitting files into smaller parts
B-SYMLINK3.1.9.5 Linking Files
B-TAR3.1.9.20 Managing tar based archive files
B-TAR-BZIP23.1.9.20 Managing tar based archive files
B-TAR-COMPRESS3.1.9.20 Managing tar based archive files
B-UNCOMPRESS3.1.9.12 Compressing Files
B-UUDECODE3.1.9.13 Encoding Files
B-UUENCODE3.1.9.13 Encoding Files
backward-char3.1.8.2 Moving Point
backward-delete-char3.1.8.3 Deleting and killing text
backward-kill-word3.1.8.3 Deleting and killing text
backward-word3.1.8.2 Moving Point
beginning-of-line3.1.8.2 Moving Point
beginning-of-panel3.1.5 Moving the cursor in the panel
BF-UNCOMPRESS3.1.9.12 Compressing Files
bin-packing3.1.9.8 Packing files into the minimum number of bins
BINARY-MAIL3.1.12 Sending/receiving ascii/binary mail
BZIP2-COMPRESS3.1.9.12 Compressing Files
BZIP2-UNCOMPRESS3.1.9.12 Compressing Files

C
capitalize-word3.1.8.4 Case conversion of words.
change-directory3.1.10.8 Changing directories
CHANGE-LOG3.1.9.10 Editing Files
CHGRP3.1.9.9 Changing a file's mode, owner and group
CHMOD3.1.9.9 Changing a file's mode, owner and group
CHOWN3.1.9.9 Changing a file's mode, owner and group
compare3.1.9.15 Comparing Files
COMPRESS3.1.9.12 Compressing Files
copy3.1.9.1 Copying Files
copy (for directories)3.1.10.2 Copying directories

D
DATE3.1.19 Getting some useful system information
DECRYPT3.1.9.14 Encrypting Files
delete3.1.9.4 Deleting Files
delete (for directories)3.1.10.3 Deleting directories
delete-char3.1.8.3 Deleting and killing text
delete-horizontal-space3.1.8.3 Deleting and killing text
DIFF3.1.9.15 Comparing Files
DIRECTORY-USAGE3.1.10.7 Summarize directory usage
DIRR-DIFF3.1.10.6 Comparing Directories
DISK-FREE-SPACE3.1.19 Getting some useful system information
downcase-word3.1.8.4 Case conversion of words.
DPKG-CONFIGURE3.1.9.21 Working with DPKG
DPKG-CONTENTS3.1.9.21 Working with DPKG
DPKG-FIELD3.1.9.21 Working with DPKG
DPKG-HELP3.1.9.21 Working with DPKG
DPKG-INFO3.1.9.21 Working with DPKG
DPKG-INSTALL3.1.9.21 Working with DPKG
DPKG-LISTFILES3.1.9.21 Working with DPKG
DPKG-LISTPKGS3.1.9.21 Working with DPKG
DPKG-PRINTAVAIL3.1.9.21 Working with DPKG
DPKG-PURGE3.1.9.21 Working with DPKG
DPKG-RECORDAVAIL3.1.9.21 Working with DPKG
DPKG-REMOVE3.1.9.21 Working with DPKG
DPKG-SEARCH3.1.9.21 Working with DPKG
DPKG-STATUS3.1.9.21 Working with DPKG
DPKG-UNPACK3.1.9.21 Working with DPKG

E
EDIT3.1.9.10 Editing Files
ENCRYPT3.1.9.14 Encrypting Files
end-of-line3.1.8.2 Moving Point
end-of-panel3.1.5 Moving the cursor in the panel
enlarge-other-panel3.1.3 Panel modes
enlarge-panel3.1.3 Panel modes
entry-to-input-line3.1.8.1 Inserting Text
ENV3.1.20 How to look at the environment variables
exchange-point-and-mark3.1.8.6 Commands to set the mark
exit3.1.24 Exiting GNU Interactive Tools

F
F-UNCOMPRESS3.1.9.12 Compressing Files
FAST-DIFF3.1.10.6 Comparing Directories
FILE-ACTION3.1.9.25 A different action for each file type
FILE-CREATE3.1.9.10 Editing Files
FILE-TYPE3.1.9.23 File Types
FIND3.1.9.19 Searching Files
FINGER3.1.19 Getting some useful system information
FIRST-FLOPPY-DIR3.1.10.10 Hot Keys
forward-char3.1.8.2 Moving Point
forward-word3.1.8.2 Moving Point

G
GENERIC-UNPACK3.1.9.20 Managing tar based archive files
GENERIC-UNPACK-INTO3.1.9.20 Managing tar based archive files
GITPS, PS3.1.21 Viewing/killing processes
GITPS, PS3.1.21 Viewing/killing processes
GREP3.1.14 Using grep and recursive grep

H
HOME-DIR3.1.10.10 Hot Keys
horizontal-scroll-left3.1.5 Moving the cursor in the panel
horizontal-scroll-right3.1.5 Moving the cursor in the panel
HTML3.1.23 Reading the documentation

I
INCLUDE-DIR3.1.10.10 Hot Keys
INFO3.1.23 Reading the documentation
isearch-backward3.1.7 Incremental searching files in a panel
isearch-forward3.1.7 Incremental searching files in a panel
ISPELL3.1.9.16 Spell Checking Files

J
just-one-space3.1.8.3 Deleting and killing text

K
KILL3.1.21 Viewing/killing processes
kill-line3.1.8.3 Deleting and killing text
kill-region3.1.8.3 Deleting and killing text
kill-ring-save3.1.8.3 Deleting and killing text
kill-to-beginning-of-line3.1.8.3 Deleting and killing text
kill-to-end-of-line3.1.8.3 Deleting and killing text
kill-word3.1.8.3 Deleting and killing text

L
LAST-BACKUP-DIFF3.1.9.15 Comparing Files
LINK3.1.9.5 Linking Files
LOCATE3.1.9.19 Searching Files
lock3.1.15 Locking your console

M
MAKE3.1.11 Compiling programs
make-directory3.1.10.1 Creating directories
MAN3.1.23 Reading the documentation
MIME-MAIL3.1.12 Sending/receiving ascii/binary mail
MOUNT-A3.1.18 Mounting/unmounting file systems
MOUNT-B3.1.18 Mounting/unmounting file systems
MOUNT-CDROM3.1.18 Mounting/unmounting file systems
MOUNT-FLOPPY3.1.18 Mounting/unmounting file systems
MOUNT-JAZ3.1.18 Mounting/unmounting file systems
MOUNT-THESE3.1.18 Mounting/unmounting file systems
MOUNT-ZIP3.1.18 Mounting/unmounting file systems
MOUNTED-FILE-SYSTEMS3.1.19 Getting some useful system information
move3.1.9.2 Moving Files
move (for directories)3.1.10.4 Moving directories
MPACK3.1.9.13 Encoding Files
MTOOLS-CHDIR3.1.9.24 Accessing MSDOS Files
MTOOLS-DELETE3.1.9.24 Accessing MSDOS Files
MTOOLS-DIR3.1.9.24 Accessing MSDOS Files
MTOOLS-FORMAT3.1.9.24 Accessing MSDOS Files
MTOOLS-GET3.1.9.24 Accessing MSDOS Files
MTOOLS-MKDIR3.1.9.24 Accessing MSDOS Files
MTOOLS-PUT3.1.9.24 Accessing MSDOS Files
MTOOLS-RENAME3.1.9.24 Accessing MSDOS Files
MTOOLS-RMDIR3.1.9.24 Accessing MSDOS Files
MTOOLS-TYPE3.1.9.24 Accessing MSDOS Files
MULTIPLE-EDIT3.1.9.10 Editing Files
MULTIPLE-VIEW3.1.9.11 Viewing Files
MUNPACK3.1.9.13 Encoding Files

N
name-downcase3.1.9.6 Renaming Files
name-upcase3.1.9.6 Renaming Files
next-directory3.1.10.9 Directory History
next-history-element3.1.8.5 Reusing recent input line arguments
next-line3.1.5 Moving the cursor in the panel

O
other-panel3.1.5 Moving the cursor in the panel
other-path-to-input-line3.1.8.1 Inserting Text

P
panel-enable-abbrevsize3.1.3 Panel modes
panel-enable-all3.1.3 Panel modes
panel-enable-date-time3.1.3 Panel modes
panel-enable-full-name3.1.3 Panel modes
panel-enable-mode3.1.3 Panel modes
panel-enable-next-mode3.1.3 Panel modes
panel-enable-owner-group3.1.3 Panel modes
panel-enable-size3.1.3 Panel modes
panel-sort-by-date3.1.4 Sorting methods
panel-sort-by-extension3.1.4 Sorting methods
panel-sort-by-group-id3.1.4 Sorting methods
panel-sort-by-group-name3.1.4 Sorting methods
panel-sort-by-mode3.1.4 Sorting methods
panel-sort-by-name3.1.4 Sorting methods
panel-sort-by-owner-id3.1.4 Sorting methods
panel-sort-by-owner-name3.1.4 Sorting methods
panel-sort-by-size3.1.4 Sorting methods
panel-sort-next-method3.1.4 Sorting methods
previous-directory3.1.10.9 Directory History
previous-history-element3.1.8.5 Reusing recent input line arguments
previous-line3.1.5 Moving the cursor in the panel
PRINT-JOB3.1.9.17 Printing Files
PRINT-JOB-LIST3.1.9.17 Printing Files
PSTREE3.1.21 Viewing/killing processes

Q
quick-compare-panels3.1.10.6 Comparing Directories
QUOTA3.1.19 Getting some useful system information

R
R-CHGRP3.1.9.9 Changing a file's mode, owner and group
R-CHMOD3.1.9.9 Changing a file's mode, owner and group
R-CHOWN3.1.9.9 Changing a file's mode, owner and group
R-DPKG-INSTALL3.1.9.21 Working with DPKG
R-DPKG-RECORDAVAIL3.1.9.21 Working with DPKG
R-DPKG-UNPACK3.1.9.21 Working with DPKG
READ-MAIL3.1.12 Sending/receiving ascii/binary mail
RECURSIVE-GREP3.1.14 Using grep and recursive grep
refresh3.1.16 Refreshing the screen contents
RENAME3.1.9.6 Renaming Files
RENAME (for directories)3.1.10.5 Renaming directories
reset-directory-history3.1.10.9 Directory History
ROOT-DIR3.1.10.10 Hot Keys
RPM-INSTALL3.1.9.22 Installing and Uninstalling RPM packages
RPM-QUERY3.1.9.22 Installing and Uninstalling RPM packages
RPM-UNINSTALL3.1.9.22 Installing and Uninstalling RPM packages
RPM-UPGRADE3.1.9.22 Installing and Uninstalling RPM packages

S
scroll-down3.1.5 Moving the cursor in the panel
scroll-up3.1.5 Moving the cursor in the panel
SECOND-FLOPPY-DIR3.1.10.10 Hot Keys
select-entry3.1.6 Selecting files
select-extension3.1.6 Selecting files
select-files-matching-pattern3.1.6 Selecting files
selected-entries-to-input-line3.1.8.1 Inserting Text
set-mark3.1.8.6 Commands to set the mark
set-scroll-step3.1.5 Moving the cursor in the panel
SPLIT3.1.9.7 Splitting files into smaller parts
SUB-SHELL3.1.13 Starting a sub-shell
switch-panels3.1.5 Moving the cursor in the panel
SYMLINK3.1.9.5 Linking Files
SYNC3.1.22 Synchronizing the file systems

T
TAR3.1.9.20 Managing tar based archive files
TAR-BZIP23.1.9.20 Managing tar based archive files
TAR-COMPRESS3.1.9.20 Managing tar based archive files
thoroughly-compare-panels3.1.10.6 Comparing Directories
tty-mode3.1.3 Panel modes
TTY-RESET3.1.17 Resetting your terminal
two-panel-mode3.1.3 Panel modes

U
UMOUNT-A3.1.18 Mounting/unmounting file systems
UMOUNT-B3.1.18 Mounting/unmounting file systems
UMOUNT-FLOPPY3.1.18 Mounting/unmounting file systems
UMOUNT-JAZ3.1.18 Mounting/unmounting file systems
UMOUNT-THESE3.1.18 Mounting/unmounting file systems
UMOUNT-ZIP3.1.18 Mounting/unmounting file systems
UNCOMPRESS3.1.9.12 Compressing Files
unselect-extension3.1.6 Selecting files
unselect-files-matching-pattern3.1.6 Selecting files
up-one-dir3.1.10.10 Hot Keys
upcase-word3.1.8.4 Case conversion of words.
USERS3.1.19 Getting some useful system information
UUDECODE3.1.9.13 Encoding Files
UUENCODE3.1.9.13 Encoding Files

V
VIEW3.1.9.11 Viewing Files
VIRTUAL-MEMORY-STATUS3.1.19 Getting some useful system information

W
WHEREIS3.1.9.19 Searching Files
WHICH3.1.9.19 Searching Files
WHO3.1.19 Getting some useful system information
WIPE3.1.9.18 Wiping Files

X
XHOST3.1.20 How to look at the environment variables

Y
yank3.1.8.7 Reinserting recently killed text

Jump to:   A   B   C   D   E   F   G   H   I   J   K   L   M   N   O   P   Q   R   S   T   U   V   W   X   Y  

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

Variable Index

Jump to:   A   C   E   G   H   I   L   M   N   S   T   U  
Index Entry Section

A
AnsiColors4.2.2 The global setup section

C
CommandLineModeHelp4.2.3.1 gitfm Setup
ConfirmOnExit4.2.3.1 gitfm Setup

E
EDITOR4.1 Environment Variables

G
GNUIT_BROWSER4.1 Environment Variables
GNUIT_EDITOR4.1 Environment Variables
GNUIT_RMAIL4.1 Environment Variables
GNUIT_SHELL4.1 Environment Variables
GNUIT_VMSTAT4.1 Environment Variables
GroupDigits4.2.3.1 gitfm Setup

H
HistoryFile4.2.3.1 gitfm Setup

I
InfoDisplay4.2.3.1 gitfm Setup

L
LeadingDotMatch4.2.3.1 gitfm Setup

M
MaxUnscaledDigits4.2.3.1 gitfm Setup

N
NormalModeHelp4.2.3.1 gitfm Setup

S
SHELL4.1 Environment Variables
StartupFileDisplayMode4.2.3.1 gitfm Setup
StartupFileSortMethod4.2.3.1 gitfm Setup
StartupScrollStep4.2.2 The global setup section

T
TERM4.2 Configuration Files
TypeSensitivity4.2.3.1 gitfm Setup

U
UseLastScreenChar4.2.2 The global setup section

Jump to:   A   C   E   G   H   I   L   M   N   S   T   U  

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

Concept Index

Jump to:   A   B   C   D   E   F   G   H   I   J   K   L   M   N   O   P   Q   R   S   T   U   V   W   X   Y  
Index Entry Section

A
Adapt directory3.1.10.8 Changing directories
Adding and removing hosts3.1.20 How to look at the environment variables
Archive3.1.9.20 Managing tar based archive files

B
Background directory copy3.1.10.2 Copying directories
Background directory delete3.1.10.3 Deleting directories
Background directory diff3.1.10.6 Comparing Directories
Background directory move3.1.10.4 Moving directories
Background directory rename3.1.10.5 Renaming directories
Background file copy3.1.9.1 Copying Files
Background file delete3.1.9.4 Deleting Files
Background file move3.1.9.2 Moving Files
Background file rename3.1.9.6 Renaming Files
Background file split3.1.9.7 Splitting files into smaller parts
Background make3.1.11 Compiling programs
Backward char3.1.8.2 Moving Point
Backward delete char3.1.8.3 Deleting and killing text
Backward kill word3.1.8.3 Deleting and killing text
Backward word3.1.8.2 Moving Point
bash3.1.13 Starting a sub-shell
Beginning of line3.1.8.2 Moving Point
Beginning of panel3.1.5 Moving the cursor in the panel
Binary comparison3.1.9.15 Comparing Files
Binary files by mail3.1.12 Sending/receiving ascii/binary mail
Browsing through the process list3.1.21 Viewing/killing processes
Browsing through the process list3.1.21 Viewing/killing processes
bzip23.1.9.12 Compressing Files

C
Capitalize word3.1.8.4 Case conversion of words.
Capitalize word3.1.8.4 Case conversion of words.
Change the current panel directory3.1.10.8 Changing directories
Change the other panel directory3.1.10.8 Changing directories
Changing directory3.1.10.8 Changing directories
Changing the current directory3.1.10.8 Changing directories
Changing the directory3.1.10.8 Changing directories
Changing the file's group3.1.9.9 Changing a file's mode, owner and group
Changing the file's mode3.1.9.9 Changing a file's mode, owner and group
Changing the file's owner3.1.9.9 Changing a file's mode, owner and group
Changing the group in background3.1.9.9 Changing a file's mode, owner and group
Changing the group recursively3.1.9.9 Changing a file's mode, owner and group
Changing the group recursively in background3.1.9.9 Changing a file's mode, owner and group
Changing the inode's group3.1.9.9 Changing a file's mode, owner and group
Changing the inode's mode3.1.9.9 Changing a file's mode, owner and group
Changing the inode's owner3.1.9.9 Changing a file's mode, owner and group
Changing the mode in background3.1.9.9 Changing a file's mode, owner and group
Changing the mode recursively3.1.9.9 Changing a file's mode, owner and group
Changing the mode recursively in background3.1.9.9 Changing a file's mode, owner and group
Changing the owner in background3.1.9.9 Changing a file's mode, owner and group
Changing the owner recursively3.1.9.9 Changing a file's mode, owner and group
Changing the owner recursively in background3.1.9.9 Changing a file's mode, owner and group
chdir3.1.10.8 Changing directories
chgrp3.1.9.9 Changing a file's mode, owner and group
chmod3.1.9.9 Changing a file's mode, owner and group
chown3.1.9.9 Changing a file's mode, owner and group
Comparing directories quickly3.1.10.6 Comparing Directories
Comparing directories thoroughly3.1.10.6 Comparing Directories
Comparing panels quickly3.1.10.6 Comparing Directories
Comparing panels thoroughly3.1.10.6 Comparing Directories
Compile3.1.11 Compiling programs
Compiling programs3.1.11 Compiling programs
compress3.1.9.12 Compressing Files
compress3.1.9.12 Compressing Files
Compressing directories3.1.9.12 Compressing Files
Compressing directories3.1.9.12 Compressing Files
Compressing directories in background3.1.9.12 Compressing Files
Compressing directories in background3.1.9.12 Compressing Files
Compressing files3.1.9.12 Compressing Files
Compressing files3.1.9.12 Compressing Files
Compressing files in background3.1.9.12 Compressing Files
Compressing files in background3.1.9.12 Compressing Files
Console lock3.1.15 Locking your console
Convert to lower case3.1.8.4 Case conversion of words.
Convert to upper case3.1.8.4 Case conversion of words.
Copy entry name to input line.3.1.8.1 Inserting Text
Copying directories3.1.10.2 Copying directories
Copying directories in background3.1.10.2 Copying directories
Copying files3.1.9.1 Copying Files
Copying files in background3.1.9.1 Copying Files
Create directory3.1.10.1 Creating directories
Create file3.1.9.10 Editing Files
Creating a directory3.1.10.1 Creating directories
Creating bzip2 compressed tar archives3.1.9.20 Managing tar based archive files
Creating bzip2 compressed tar archives in background3.1.9.20 Managing tar based archive files
Creating compressed tar archives3.1.9.20 Managing tar based archive files
Creating compressed tar archives in background3.1.9.20 Managing tar based archive files
Creating tar archives3.1.9.20 Managing tar based archive files
Creating tar archives in background3.1.9.20 Managing tar based archive files
csh3.1.13 Starting a sub-shell
Current disk quota3.1.19 Getting some useful system information
Cursor backward3.1.8.2 Moving Point
Cursor backward one word3.1.8.2 Moving Point
Cursor down one entry3.1.5 Moving the cursor in the panel
Cursor down one page3.1.5 Moving the cursor in the panel
Cursor end3.1.5 Moving the cursor in the panel
Cursor forward3.1.8.2 Moving Point
Cursor forward one word3.1.8.2 Moving Point
Cursor home3.1.5 Moving the cursor in the panel
Cursor to BOL3.1.8.2 Moving Point
Cursor to EOL3.1.8.2 Moving Point
Cursor to the other panel3.1.5 Moving the cursor in the panel
Cursor up one entry3.1.5 Moving the cursor in the panel
Cursor up one page3.1.5 Moving the cursor in the panel

D
date3.1.19 Getting some useful system information
Date and time3.1.3 Panel modes
Date, time3.1.3 Panel modes
Decoding files3.1.9.13 Encoding Files
Decoding files3.1.9.13 Encoding Files
Decoding files in background3.1.9.13 Encoding Files
Decoding files in background3.1.9.13 Encoding Files
Decompressing directories3.1.9.12 Compressing Files
Decompressing directories3.1.9.12 Compressing Files
Decompressing directories in background3.1.9.12 Compressing Files
Decompressing directories in background3.1.9.12 Compressing Files
Decompressing directories/links3.1.9.12 Compressing Files
Decompressing directories/links in background3.1.9.12 Compressing Files
Decompressing files3.1.9.12 Compressing Files
Decompressing files3.1.9.12 Compressing Files
Decompressing files in background3.1.9.12 Compressing Files
Decompressing files in background3.1.9.12 Compressing Files
Decompressing files/links3.1.9.12 Compressing Files
Decompressing files/links in background3.1.9.12 Compressing Files
Decrypting the current file3.1.9.14 Encrypting Files
Delete char3.1.8.3 Deleting and killing text
Delete horizontal space3.1.8.3 Deleting and killing text
Delete line3.1.8.3 Deleting and killing text
Delete spaces3.1.8.3 Deleting and killing text
Delete word backward3.1.8.3 Deleting and killing text
Delete word forward3.1.8.3 Deleting and killing text
Deleting directories3.1.10.3 Deleting directories
Deleting directories in background3.1.10.3 Deleting directories
Deleting files3.1.9.4 Deleting Files
Deleting files in background3.1.9.4 Deleting Files
diff3.1.9.15 Comparing Files
Differences between ascii files3.1.9.15 Comparing Files
Differences between directories3.1.10.6 Comparing Directories
Differences between file and backup3.1.9.15 Comparing Files
Differences between two directories3.1.10.6 Comparing Directories
Directory copy3.1.10.2 Copying directories
Directory delete3.1.10.3 Deleting directories
Directory diff3.1.10.6 Comparing Directories
Directory diff3.1.10.6 Comparing Directories
Directory history reset3.1.10.9 Directory History
Directory mode3.1.3 Panel modes
Directory move3.1.10.4 Moving directories
Directory rename3.1.10.5 Renaming directories
Directory size3.1.3 Panel modes
Directory size3.1.3 Panel modes
Directory usage3.1.10.7 Summarize directory usage
Disk free space3.1.19 Getting some useful system information
Downcase file names3.1.9.6 Renaming Files
Downcase word3.1.8.4 Case conversion of words.
du3.1.10.7 Summarize directory usage

E
Editing a file3.1.9.10 Editing Files
Editing multiple files3.1.9.10 Editing Files
Editing the ChangeLog3.1.9.10 Editing Files
Emacs rmail3.1.12 Sending/receiving ascii/binary mail
Enable all3.1.3 Panel modes
Enable next mode3.1.3 Panel modes
Encoding files3.1.9.13 Encoding Files
Encoding files3.1.9.13 Encoding Files
Encoding files in background3.1.9.13 Encoding Files
Encoding files in background3.1.9.13 Encoding Files
Encrypting the current file3.1.9.14 Encrypting Files
End of line3.1.8.2 Moving Point
End of panel3.1.5 Moving the cursor in the panel
Enlarge other panel3.1.3 Panel modes
Enlarge panel3.1.3 Panel modes
Entire screen3.1.3 Panel modes
env3.1.20 How to look at the environment variables
Exchange point and mark3.1.8.6 Commands to set the mark
Exiting3.1.24 Exiting GNU Interactive Tools
Extracting files from archives3.1.9.20 Managing tar based archive files
Extracting files from archives3.1.9.20 Managing tar based archive files

F
File action3.1.9.25 A different action for each file type
File copy3.1.9.1 Copying Files
File create3.1.9.10 Editing Files
File delete3.1.9.4 Deleting Files
File edit3.1.9.10 Editing Files
File mode3.1.3 Panel modes
File move3.1.9.2 Moving Files
File or directory mode3.1.3 Panel modes
File or directory size3.1.3 Panel modes
File or directory size3.1.3 Panel modes
File rename3.1.9.6 Renaming Files
File search3.1.9.19 Searching Files
File search3.1.9.19 Searching Files
File size3.1.3 Panel modes
File size3.1.3 Panel modes
File split3.1.9.7 Splitting files into smaller parts
File system status3.1.19 Getting some useful system information
File view3.1.9.11 Viewing Files
File wipe3.1.9.18 Wiping Files
find3.1.9.19 Searching Files
finger3.1.19 Getting some useful system information
First entry3.1.5 Moving the cursor in the panel
Forward char3.1.8.2 Moving Point
Forward word3.1.8.2 Moving Point
Free disk space3.1.19 Getting some useful system information
Full directory info3.1.3 Panel modes
Full directory name3.1.3 Panel modes
Full file info3.1.3 Panel modes
Full file name3.1.3 Panel modes
Full file or directory name3.1.3 Panel modes
Full info3.1.3 Panel modes
Full name3.1.3 Panel modes

G
gitaction3.7 The GNUIT per file type action script
gitfm3.1 The GIT file system browser
gitkeys3.4 The GNUIT key sequences display utility
gitmount3.6 The GNUIT mount utility
gitps3.2 The GNUIT process viewer/killer
gitregrep3.9 The GIT recursive grep script
gitrfgrep3.9 The GIT recursive grep script
gitrgrep3.9 The GIT recursive grep script
gitunpack3.8 Unified archive unpacking
gitview3.3 The GNUIT ASCII/HEX file viewer
gitwipe3.5 The GNUIT wipe file utility
Go to ..3.1.10.10 Hot Keys
Go to /3.1.10.10 Hot Keys
Go to the $HOME directory3.1.10.10 Hot Keys
Go to the /usr/include directory3.1.10.10 Hot Keys
Go to the first floppy mount point3.1.10.10 Hot Keys
Go to the home directory3.1.10.10 Hot Keys
Go to the include directory3.1.10.10 Hot Keys
Go to the other panel3.1.5 Moving the cursor in the panel
Go to the parent directory3.1.10.10 Hot Keys
Go to the root directory3.1.10.10 Hot Keys
Go to the second floppy mount point3.1.10.10 Hot Keys
Go to the ~ directory3.1.10.10 Hot Keys
Go up one directory3.1.10.10 Hot Keys
grep3.1.14 Using grep and recursive grep
Group and owner3.1.3 Panel modes
Group, owner3.1.3 Panel modes
gunzip3.1.9.12 Compressing Files
gunzip3.1.9.12 Compressing Files
gunzip3.1.9.12 Compressing Files
gzip3.1.9.12 Compressing Files

H
Half screen3.1.3 Panel modes
Hard links to files3.1.9.5 Linking Files
Hot Keys3.1.10.10 Hot Keys

I
Incremental search backward3.1.7 Incremental searching files in a panel
Incremental search forward3.1.7 Incremental searching files in a panel
Isearch backward3.1.7 Incremental searching files in a panel
Isearch forward3.1.7 Incremental searching files in a panel
ispell3.1.9.16 Spell Checking Files

J
Just one space3.1.8.3 Deleting and killing text

K
Kill line3.1.8.3 Deleting and killing text
Kill region3.1.8.3 Deleting and killing text
Kill ring save3.1.8.3 Deleting and killing text
Kill to beginning of line3.1.8.3 Deleting and killing text
Kill to end of line3.1.8.3 Deleting and killing text
kill word3.1.8.3 Deleting and killing text
Killing processes3.1.21 Viewing/killing processes

L
Last backup diff3.1.9.15 Comparing Files
Last entry3.1.5 Moving the cursor in the panel
Linking files in background3.1.9.5 Linking Files
locate3.1.9.19 Searching Files
Locating files3.1.9.19 Searching Files
Locking the console3.1.15 Locking your console
Logged in users3.1.19 Getting some useful system information
Looking at the environment3.1.20 How to look at the environment variables
lpr3.1.9.17 Printing Files
lpr3.1.9.17 Printing Files

M
Major modes3.1.3 Panel modes
make3.1.11 Compiling programs
Make directory3.1.10.1 Creating directories
Make directory3.1.10.1 Creating directories
Making a directory3.1.10.1 Creating directories
Mark entry3.1.6 Selecting files
Mime encoded files by mail3.1.12 Sending/receiving ascii/binary mail
Minor modes3.1.3 Panel modes
mount3.1.18 Mounting/unmounting file systems
Mounted file systems list3.1.19 Getting some useful system information
Mounting subdirectories3.1.18 Mounting/unmounting file systems
Mounting the cdrom3.1.18 Mounting/unmounting file systems
Mounting the first floppy3.1.18 Mounting/unmounting file systems
Mounting the first floppy3.1.18 Mounting/unmounting file systems
Mounting the floppy3.1.18 Mounting/unmounting file systems
Mounting the floppy3.1.18 Mounting/unmounting file systems
Mounting the jaz drive3.1.18 Mounting/unmounting file systems
Mounting the second floppy3.1.18 Mounting/unmounting file systems
Mounting the zip drive3.1.18 Mounting/unmounting file systems
Mounting these file systems3.1.18 Mounting/unmounting file systems
Moving directories3.1.10.4 Moving directories
Moving directories in background3.1.10.4 Moving directories
Moving files3.1.9.2 Moving Files
Moving files in background3.1.9.2 Moving Files
mpack3.1.9.13 Encoding Files
Multiple edit3.1.9.10 Editing Files
munpack3.1.9.13 Encoding Files

N
Next directory history entry3.1.10.9 Directory History
Next history element3.1.8.5 Reusing recent input line arguments
Next sort method3.1.4 Sorting methods
No panels mode3.1.3 Panel modes

O
One panel3.1.3 Panel modes
One panel3.1.3 Panel modes
Other panel path to input line3.1.8.1 Inserting Text
Owner and group3.1.3 Panel modes
Owner, group3.1.3 Panel modes

P
Pack files into bins3.1.9.8 Packing files into the minimum number of bins
Previous directory history entry3.1.10.9 Directory History
Previous history element3.1.8.5 Reusing recent input line arguments
printing3.1.9.17 Printing Files
printing3.1.9.17 Printing Files
Printing files3.1.9.17 Printing Files
Printing files3.1.9.17 Printing Files
Program search3.1.9.19 Searching Files

Q
Quota3.1.19 Getting some useful system information

R
Re-reading directories.3.1.16 Refreshing the screen contents
Reading mail3.1.12 Sending/receiving ascii/binary mail
Reading the html documentation3.1.23 Reading the documentation
Reading the info documentation3.1.23 Reading the documentation
Reading the manual pages3.1.23 Reading the documentation
Recursive grep3.1.14 Using grep and recursive grep
Refreshing the screen.3.1.16 Refreshing the screen contents
regexp3.1.14 Using grep and recursive grep
Renaming directories3.1.10.5 Renaming directories
Renaming directories in background3.1.10.5 Renaming directories
Renaming files3.1.9.6 Renaming Files
Renaming files in background3.1.9.6 Renaming Files
Reset the directory history3.1.10.9 Directory History
Resetting the terminal3.1.17 Resetting your terminal

S
Save and delete region3.1.8.3 Deleting and killing text
Save into the kill ring3.1.8.3 Deleting and killing text
Scroll left3.1.5 Moving the cursor in the panel
Scroll right3.1.5 Moving the cursor in the panel
Scroll step3.1.5 Moving the cursor in the panel
Searching binaries3.1.9.19 Searching Files
Searching files3.1.9.19 Searching Files
Searching files3.1.9.19 Searching Files
Searching for key-bindings3.1.23 Reading the documentation
Searching patterns in files3.1.14 Using grep and recursive grep
Searching programs3.1.9.19 Searching Files
Searching regular expressions3.1.14 Using grep and recursive grep
Select entry3.1.6 Selecting files
Selected entries to input line3.1.8.1 Inserting Text
Selects files matching extension3.1.6 Selecting files
Selects files matching pattern3.1.6 Selecting files
Sending ascii mail3.1.12 Sending/receiving ascii/binary mail
Sending ascii mail in background3.1.12 Sending/receiving ascii/binary mail
Sending binary mail3.1.12 Sending/receiving ascii/binary mail
Sending binary mail in background3.1.12 Sending/receiving ascii/binary mail
Sending files by mail3.1.12 Sending/receiving ascii/binary mail
Sending mail3.1.12 Sending/receiving ascii/binary mail
Sending mime mail3.1.12 Sending/receiving ascii/binary mail
Sending mime mail in background3.1.12 Sending/receiving ascii/binary mail
Sending text by mail3.1.12 Sending/receiving ascii/binary mail
Set mark3.1.8.6 Commands to set the mark
Set the mark3.1.8.6 Commands to set the mark
sh3.1.13 Starting a sub-shell
Shell3.1.13 Starting a sub-shell
Sorted by date3.1.4 Sorting methods
Sorted by extension3.1.4 Sorting methods
Sorted by group id3.1.4 Sorting methods
Sorted by group name3.1.4 Sorting methods
Sorted by mode3.1.4 Sorting methods
Sorted by name3.1.4 Sorting methods
Sorted by owner id3.1.4 Sorting methods
Sorted by owner name3.1.4 Sorting methods
Sorted by size3.1.4 Sorting methods
Sorting3.1.4 Sorting methods
Sorting by date3.1.4 Sorting methods
Sorting by extension3.1.4 Sorting methods
Sorting by group id3.1.4 Sorting methods
Sorting by group name3.1.4 Sorting methods
Sorting by mode3.1.4 Sorting methods
Sorting by name3.1.4 Sorting methods
Sorting by owner id3.1.4 Sorting methods
Sorting by owner name3.1.4 Sorting methods
Sorting by size3.1.4 Sorting methods
Spell checking3.1.9.16 Spell Checking Files
Splitting files3.1.9.7 Splitting files into smaller parts
Splitting files in background3.1.9.7 Splitting files into smaller parts
Swapping3.1.19 Getting some useful system information
Switch panels3.1.5 Moving the cursor in the panel
Symbolic links to files3.1.9.5 Linking Files
sync3.1.22 Synchronizing the file systems
Synchronizing file systems3.1.22 Synchronizing the file systems
System users3.1.19 Getting some useful system information

T
Tar archive3.1.9.20 Managing tar based archive files
tcsh3.1.13 Starting a sub-shell
Terminal reset3.1.17 Resetting your terminal
Time and date3.1.3 Panel modes
Time, date3.1.3 Panel modes
Toggle flag3.1.6 Selecting files
Toggle panels3.1.5 Moving the cursor in the panel
tty mode3.1.3 Panel modes
Two panel mode3.1.3 Panel modes
Two panels3.1.3 Panel modes
Type specific file action3.1.9.25 A different action for each file type

U
umount3.1.18 Mounting/unmounting file systems
umount3.1.18 Mounting/unmounting file systems
Uncompressing directories3.1.9.12 Compressing Files
Uncompressing directories3.1.9.12 Compressing Files
Uncompressing directories in background3.1.9.12 Compressing Files
Uncompressing directories in background3.1.9.12 Compressing Files
Uncompressing directories/links3.1.9.12 Compressing Files
Uncompressing directories/links in background3.1.9.12 Compressing Files
Uncompressing files3.1.9.12 Compressing Files
Uncompressing files3.1.9.12 Compressing Files
Uncompressing files in background3.1.9.12 Compressing Files
Uncompressing files in background3.1.9.12 Compressing Files
Uncompressing files/links3.1.9.12 Compressing Files
Uncompressing files/links in background3.1.9.12 Compressing Files
Unmark entry3.1.6 Selecting files
Unmounting subdirectories3.1.18 Mounting/unmounting file systems
Unmounting the cdrom3.1.18 Mounting/unmounting file systems
Unmounting the first floppy3.1.18 Mounting/unmounting file systems
Unmounting the first floppy3.1.18 Mounting/unmounting file systems
Unmounting the floppy3.1.18 Mounting/unmounting file systems
Unmounting the floppy3.1.18 Mounting/unmounting file systems
Unmounting the jaz drive3.1.18 Mounting/unmounting file systems
Unmounting the second floppy3.1.18 Mounting/unmounting file systems
Unmounting the zip drive3.1.18 Mounting/unmounting file systems
Unmounting these file systems3.1.18 Mounting/unmounting file systems
Unselects files matching extension3.1.6 Selecting files
Unselects files matching pattern3.1.6 Selecting files
Upcase file names3.1.9.6 Renaming Files
Upcase word3.1.8.4 Case conversion of words.
uudecode3.1.9.13 Encoding Files
uuencode3.1.9.13 Encoding Files

V
Viewing files3.1.9.11 Viewing Files
Viewing multiple files3.1.9.11 Viewing Files
Viewing processes3.1.21 Viewing/killing processes
Viewing processes3.1.21 Viewing/killing processes
Viewing the process tree3.1.21 Viewing/killing processes
Virtual memory status3.1.19 Getting some useful system information

W
whereis3.1.9.19 Searching Files
which3.1.9.19 Searching Files
who3.1.19 Getting some useful system information
Wiping files3.1.9.18 Wiping Files
Wrapped incremental search3.1.7 Incremental searching files in a panel
Wrapped isearch3.1.7 Incremental searching files in a panel
Wrapped search3.1.7 Incremental searching files in a panel

X
xhost3.1.20 How to look at the environment variables

Y
Yanking, reinserting3.1.8.7 Reinserting recently killed text

Jump to:   A   B   C   D   E   F   G   H   I   J   K   L   M   N   O   P   Q   R   S   T   U   V   W   X   Y  

[Top] [Contents] [Index] [ ? ]

Table of Contents


[Top] [Contents] [Index] [ ? ]

Short Table of Contents


[Top] [Contents] [Index] [ ? ]

About This Document

This document was generated by Ian Beckwith on February, 18 2009 using texi2html 1.78.

The buttons in the navigation panels have the following meaning:

Button Name Go to From 1.2.3 go to
[ < ] Back Previous section in reading order 1.2.2
[ > ] Forward Next section in reading order 1.2.4
[ << ] FastBack Beginning of this chapter or previous chapter 1
[ Up ] Up Up section 1.2
[ >> ] FastForward Next chapter 2
[Top] Top Cover (top) of document  
[Contents] Contents Table of contents  
[Index] Index Index  
[ ? ] About About (help)  

where the Example assumes that the current position is at Subsubsection One-Two-Three of a document of the following structure:

  • 1. Section One
    • 1.1 Subsection One-One
      • ...
    • 1.2 Subsection One-Two
      • 1.2.1 Subsubsection One-Two-One
      • 1.2.2 Subsubsection One-Two-Two
      • 1.2.3 Subsubsection One-Two-Three     <== Current Position
      • 1.2.4 Subsubsection One-Two-Four
    • 1.3 Subsection One-Three
      • ...
    • 1.4 Subsection One-Four

This document was generated by Ian Beckwith on February, 18 2009 using texi2html 1.78.

gnuit-4.9.5/doc/Makefile.in0000644000175000017500000010374611146671375012440 00000000000000# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 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@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. 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 = : build_triplet = @build@ host_triplet = @host@ @TRANSITION_TRUE@am__append_1 = git.1 subdir = doc DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in texinfo.tex ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \ $(top_srcdir)/m4/alloca.m4 $(top_srcdir)/m4/argmatch.m4 \ $(top_srcdir)/m4/clock_time.m4 $(top_srcdir)/m4/codeset.m4 \ $(top_srcdir)/m4/dirname.m4 $(top_srcdir)/m4/dos.m4 \ $(top_srcdir)/m4/double-slash-root.m4 \ $(top_srcdir)/m4/eealloc.m4 $(top_srcdir)/m4/errno_h.m4 \ $(top_srcdir)/m4/error.m4 $(top_srcdir)/m4/exitfail.m4 \ $(top_srcdir)/m4/extensions.m4 $(top_srcdir)/m4/fcntl_h.m4 \ $(top_srcdir)/m4/flexmember.m4 $(top_srcdir)/m4/fnmatch.m4 \ $(top_srcdir)/m4/fsusage.m4 $(top_srcdir)/m4/getopt.m4 \ $(top_srcdir)/m4/gettime.m4 $(top_srcdir)/m4/gettimeofday.m4 \ $(top_srcdir)/m4/glibc21.m4 $(top_srcdir)/m4/gnulib-common.m4 \ $(top_srcdir)/m4/gnulib-comp.m4 $(top_srcdir)/m4/human.m4 \ $(top_srcdir)/m4/idcache.m4 $(top_srcdir)/m4/include_next.m4 \ $(top_srcdir)/m4/inline.m4 $(top_srcdir)/m4/inttypes-pri.m4 \ $(top_srcdir)/m4/inttypes.m4 $(top_srcdir)/m4/localcharset.m4 \ $(top_srcdir)/m4/locale-fr.m4 $(top_srcdir)/m4/locale-ja.m4 \ $(top_srcdir)/m4/locale-zh.m4 $(top_srcdir)/m4/longlong.m4 \ $(top_srcdir)/m4/lstat.m4 $(top_srcdir)/m4/malloc.m4 \ $(top_srcdir)/m4/malloca.m4 $(top_srcdir)/m4/mbchar.m4 \ $(top_srcdir)/m4/mbiter.m4 $(top_srcdir)/m4/mbrtowc.m4 \ $(top_srcdir)/m4/mbsinit.m4 $(top_srcdir)/m4/mbslen.m4 \ $(top_srcdir)/m4/mbsstr.m4 $(top_srcdir)/m4/mbstate_t.m4 \ $(top_srcdir)/m4/memmove.m4 $(top_srcdir)/m4/mkstemp.m4 \ $(top_srcdir)/m4/multiarch.m4 $(top_srcdir)/m4/nanosleep.m4 \ $(top_srcdir)/m4/onceonly.m4 $(top_srcdir)/m4/open.m4 \ $(top_srcdir)/m4/putenv.m4 $(top_srcdir)/m4/quote.m4 \ $(top_srcdir)/m4/quotearg.m4 $(top_srcdir)/m4/readlink.m4 \ $(top_srcdir)/m4/rename.m4 $(top_srcdir)/m4/safe-read.m4 \ $(top_srcdir)/m4/safe-write.m4 $(top_srcdir)/m4/sigaction.m4 \ $(top_srcdir)/m4/signal_h.m4 \ $(top_srcdir)/m4/signalblocking.m4 $(top_srcdir)/m4/ssize_t.m4 \ $(top_srcdir)/m4/stdbool.m4 $(top_srcdir)/m4/stdint.m4 \ $(top_srcdir)/m4/stdlib_h.m4 $(top_srcdir)/m4/strcase.m4 \ $(top_srcdir)/m4/strcasestr.m4 $(top_srcdir)/m4/strerror.m4 \ $(top_srcdir)/m4/string_h.m4 $(top_srcdir)/m4/strings_h.m4 \ $(top_srcdir)/m4/strndup.m4 $(top_srcdir)/m4/strnlen.m4 \ $(top_srcdir)/m4/strtoimax.m4 $(top_srcdir)/m4/strtol.m4 \ $(top_srcdir)/m4/strtoll.m4 $(top_srcdir)/m4/strtoul.m4 \ $(top_srcdir)/m4/strtoull.m4 $(top_srcdir)/m4/strtoumax.m4 \ $(top_srcdir)/m4/sys_select_h.m4 \ $(top_srcdir)/m4/sys_socket_h.m4 \ $(top_srcdir)/m4/sys_stat_h.m4 $(top_srcdir)/m4/sys_time_h.m4 \ $(top_srcdir)/m4/tempname.m4 $(top_srcdir)/m4/time_h.m4 \ $(top_srcdir)/m4/timespec.m4 $(top_srcdir)/m4/unistd_h.m4 \ $(top_srcdir)/m4/utimbuf.m4 $(top_srcdir)/m4/utime.m4 \ $(top_srcdir)/m4/utimes-null.m4 $(top_srcdir)/m4/wchar.m4 \ $(top_srcdir)/m4/wchar_t.m4 $(top_srcdir)/m4/wctype.m4 \ $(top_srcdir)/m4/wcwidth.m4 $(top_srcdir)/m4/wint_t.m4 \ $(top_srcdir)/m4/write.m4 $(top_srcdir)/m4/xalloc.m4 \ $(top_srcdir)/m4/xstrndup.m4 $(top_srcdir)/m4/xstrtol.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = INFO_DEPS = $(srcdir)/gnuit.info am__TEXINFO_TEX_DIR = $(srcdir) DVIS = gnuit.dvi PDFS = gnuit.pdf PSS = gnuit.ps HTMLS = gnuit.html TEXINFOS = gnuit.texinfo TEXI2PDF = $(TEXI2DVI) --pdf --batch MAKEINFOHTML = $(MAKEINFO) --html AM_MAKEINFOHTMLFLAGS = $(AM_MAKEINFOFLAGS) DVIPS = dvips am__installdirs = "$(DESTDIR)$(infodir)" "$(DESTDIR)$(man1dir)" \ "$(DESTDIR)$(htmldir)" "$(DESTDIR)$(pkgdatadir)" man1dir = $(mandir)/man1 NROFF = nroff MANS = $(man_MANS) 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|^.*/||'`; htmlDATA_INSTALL = $(INSTALL_DATA) pkgdataDATA_INSTALL = $(INSTALL_DATA) DATA = $(html_DATA) $(pkgdata_DATA) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) INSTALL = @INSTALL@ ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ ALLOCA_H = @ALLOCA_H@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BITSIZEOF_PTRDIFF_T = @BITSIZEOF_PTRDIFF_T@ BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@ BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@ BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@ BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CLEANFILES = @CLEANFILES@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEBIAN_FALSE = @DEBIAN_FALSE@ DEBIAN_TRUE = @DEBIAN_TRUE@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EMULTIHOP_HIDDEN = @EMULTIHOP_HIDDEN@ EMULTIHOP_VALUE = @EMULTIHOP_VALUE@ ENOLINK_HIDDEN = @ENOLINK_HIDDEN@ ENOLINK_VALUE = @ENOLINK_VALUE@ EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@ EOVERFLOW_VALUE = @EOVERFLOW_VALUE@ ERRNO_H = @ERRNO_H@ EXEEXT = @EXEEXT@ FCNTL_H = @FCNTL_H@ FNMATCH_H = @FNMATCH_H@ GETOPT_H = @GETOPT_H@ GLIBC21 = @GLIBC21@ GL_COND_LIBTOOL_FALSE = @GL_COND_LIBTOOL_FALSE@ GL_COND_LIBTOOL_TRUE = @GL_COND_LIBTOOL_TRUE@ GNULIB_ACCEPT = @GNULIB_ACCEPT@ GNULIB_ATOLL = @GNULIB_ATOLL@ GNULIB_BIND = @GNULIB_BIND@ GNULIB_BTOWC = @GNULIB_BTOWC@ GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@ GNULIB_CHOWN = @GNULIB_CHOWN@ GNULIB_CLOSE = @GNULIB_CLOSE@ GNULIB_CONNECT = @GNULIB_CONNECT@ GNULIB_DUP2 = @GNULIB_DUP2@ GNULIB_ENVIRON = @GNULIB_ENVIRON@ GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@ GNULIB_FCHDIR = @GNULIB_FCHDIR@ GNULIB_FSYNC = @GNULIB_FSYNC@ GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@ GNULIB_GETCWD = @GNULIB_GETCWD@ GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@ GNULIB_GETDTABLESIZE = @GNULIB_GETDTABLESIZE@ GNULIB_GETHOSTNAME = @GNULIB_GETHOSTNAME@ GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@ GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@ GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@ GNULIB_GETPEERNAME = @GNULIB_GETPEERNAME@ GNULIB_GETSOCKNAME = @GNULIB_GETSOCKNAME@ GNULIB_GETSOCKOPT = @GNULIB_GETSOCKOPT@ GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@ GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@ GNULIB_IMAXABS = @GNULIB_IMAXABS@ GNULIB_IMAXDIV = @GNULIB_IMAXDIV@ GNULIB_LCHMOD = @GNULIB_LCHMOD@ GNULIB_LCHOWN = @GNULIB_LCHOWN@ GNULIB_LINK = @GNULIB_LINK@ GNULIB_LISTEN = @GNULIB_LISTEN@ GNULIB_LSEEK = @GNULIB_LSEEK@ GNULIB_LSTAT = @GNULIB_LSTAT@ GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@ GNULIB_MBRLEN = @GNULIB_MBRLEN@ GNULIB_MBRTOWC = @GNULIB_MBRTOWC@ GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@ GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@ GNULIB_MBSCHR = @GNULIB_MBSCHR@ GNULIB_MBSCSPN = @GNULIB_MBSCSPN@ GNULIB_MBSINIT = @GNULIB_MBSINIT@ GNULIB_MBSLEN = @GNULIB_MBSLEN@ GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@ GNULIB_MBSNLEN = @GNULIB_MBSNLEN@ GNULIB_MBSNRTOWCS = @GNULIB_MBSNRTOWCS@ GNULIB_MBSPBRK = @GNULIB_MBSPBRK@ GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@ GNULIB_MBSRCHR = @GNULIB_MBSRCHR@ GNULIB_MBSRTOWCS = @GNULIB_MBSRTOWCS@ GNULIB_MBSSEP = @GNULIB_MBSSEP@ GNULIB_MBSSPN = @GNULIB_MBSSPN@ GNULIB_MBSSTR = @GNULIB_MBSSTR@ GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@ GNULIB_MEMMEM = @GNULIB_MEMMEM@ GNULIB_MEMPCPY = @GNULIB_MEMPCPY@ GNULIB_MEMRCHR = @GNULIB_MEMRCHR@ GNULIB_MKDTEMP = @GNULIB_MKDTEMP@ GNULIB_MKSTEMP = @GNULIB_MKSTEMP@ GNULIB_OPEN = @GNULIB_OPEN@ GNULIB_PUTENV = @GNULIB_PUTENV@ GNULIB_RANDOM_R = @GNULIB_RANDOM_R@ GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@ GNULIB_READLINK = @GNULIB_READLINK@ GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@ GNULIB_RECV = @GNULIB_RECV@ GNULIB_RECVFROM = @GNULIB_RECVFROM@ GNULIB_RPMATCH = @GNULIB_RPMATCH@ GNULIB_SELECT = @GNULIB_SELECT@ GNULIB_SEND = @GNULIB_SEND@ GNULIB_SENDTO = @GNULIB_SENDTO@ GNULIB_SETENV = @GNULIB_SETENV@ GNULIB_SETSOCKOPT = @GNULIB_SETSOCKOPT@ GNULIB_SHUTDOWN = @GNULIB_SHUTDOWN@ GNULIB_SIGACTION = @GNULIB_SIGACTION@ GNULIB_SIGNAL_H_SIGPIPE = @GNULIB_SIGNAL_H_SIGPIPE@ GNULIB_SIGPROCMASK = @GNULIB_SIGPROCMASK@ GNULIB_SLEEP = @GNULIB_SLEEP@ GNULIB_SOCKET = @GNULIB_SOCKET@ GNULIB_STPCPY = @GNULIB_STPCPY@ GNULIB_STPNCPY = @GNULIB_STPNCPY@ GNULIB_STRCASESTR = @GNULIB_STRCASESTR@ GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@ GNULIB_STRDUP = @GNULIB_STRDUP@ GNULIB_STRERROR = @GNULIB_STRERROR@ GNULIB_STRNDUP = @GNULIB_STRNDUP@ GNULIB_STRNLEN = @GNULIB_STRNLEN@ GNULIB_STRPBRK = @GNULIB_STRPBRK@ GNULIB_STRSEP = @GNULIB_STRSEP@ GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@ GNULIB_STRSTR = @GNULIB_STRSTR@ GNULIB_STRTOD = @GNULIB_STRTOD@ GNULIB_STRTOIMAX = @GNULIB_STRTOIMAX@ GNULIB_STRTOK_R = @GNULIB_STRTOK_R@ GNULIB_STRTOLL = @GNULIB_STRTOLL@ GNULIB_STRTOULL = @GNULIB_STRTOULL@ GNULIB_STRTOUMAX = @GNULIB_STRTOUMAX@ GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@ GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@ GNULIB_UNSETENV = @GNULIB_UNSETENV@ GNULIB_WCRTOMB = @GNULIB_WCRTOMB@ GNULIB_WCSNRTOMBS = @GNULIB_WCSNRTOMBS@ GNULIB_WCSRTOMBS = @GNULIB_WCSRTOMBS@ GNULIB_WCTOB = @GNULIB_WCTOB@ GNULIB_WCWIDTH = @GNULIB_WCWIDTH@ GNULIB_WRITE = @GNULIB_WRITE@ GREP = @GREP@ HAVE_ATOLL = @HAVE_ATOLL@ HAVE_BTOWC = @HAVE_BTOWC@ HAVE_CALLOC_POSIX = @HAVE_CALLOC_POSIX@ HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@ HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@ HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@ HAVE_DECL_IMAXABS = @HAVE_DECL_IMAXABS@ HAVE_DECL_IMAXDIV = @HAVE_DECL_IMAXDIV@ HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@ HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@ HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@ HAVE_DECL_STRERROR = @HAVE_DECL_STRERROR@ HAVE_DECL_STRNCASECMP = @HAVE_DECL_STRNCASECMP@ HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@ HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@ HAVE_DECL_STRSIGNAL = @HAVE_DECL_STRSIGNAL@ HAVE_DECL_STRTOIMAX = @HAVE_DECL_STRTOIMAX@ HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@ HAVE_DECL_STRTOUMAX = @HAVE_DECL_STRTOUMAX@ HAVE_DECL_WCTOB = @HAVE_DECL_WCTOB@ HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@ HAVE_DUP2 = @HAVE_DUP2@ HAVE_EUIDACCESS = @HAVE_EUIDACCESS@ HAVE_FSYNC = @HAVE_FSYNC@ HAVE_FTRUNCATE = @HAVE_FTRUNCATE@ HAVE_GETDOMAINNAME = @HAVE_GETDOMAINNAME@ HAVE_GETDTABLESIZE = @HAVE_GETDTABLESIZE@ HAVE_GETHOSTNAME = @HAVE_GETHOSTNAME@ HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@ HAVE_GETSUBOPT = @HAVE_GETSUBOPT@ HAVE_GETUSERSHELL = @HAVE_GETUSERSHELL@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_ISWCNTRL = @HAVE_ISWCNTRL@ HAVE_LCHMOD = @HAVE_LCHMOD@ HAVE_LINK = @HAVE_LINK@ HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@ HAVE_LSTAT = @HAVE_LSTAT@ HAVE_MALLOC_POSIX = @HAVE_MALLOC_POSIX@ HAVE_MBRLEN = @HAVE_MBRLEN@ HAVE_MBRTOWC = @HAVE_MBRTOWC@ HAVE_MBSINIT = @HAVE_MBSINIT@ HAVE_MBSNRTOWCS = @HAVE_MBSNRTOWCS@ HAVE_MBSRTOWCS = @HAVE_MBSRTOWCS@ HAVE_MEMPCPY = @HAVE_MEMPCPY@ HAVE_MKDTEMP = @HAVE_MKDTEMP@ HAVE_OS_H = @HAVE_OS_H@ HAVE_POSIX_SIGNALBLOCKING = @HAVE_POSIX_SIGNALBLOCKING@ HAVE_RANDOM_H = @HAVE_RANDOM_H@ HAVE_RANDOM_R = @HAVE_RANDOM_R@ HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@ HAVE_READLINK = @HAVE_READLINK@ HAVE_REALLOC_POSIX = @HAVE_REALLOC_POSIX@ HAVE_RPMATCH = @HAVE_RPMATCH@ HAVE_SETENV = @HAVE_SETENV@ HAVE_SIGACTION = @HAVE_SIGACTION@ HAVE_SIGINFO_T = @HAVE_SIGINFO_T@ HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@ HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@ HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@ HAVE_SIGSET_T = @HAVE_SIGSET_T@ HAVE_SLEEP = @HAVE_SLEEP@ HAVE_STDINT_H = @HAVE_STDINT_H@ HAVE_STPCPY = @HAVE_STPCPY@ HAVE_STPNCPY = @HAVE_STPNCPY@ HAVE_STRCASECMP = @HAVE_STRCASECMP@ HAVE_STRCASESTR = @HAVE_STRCASESTR@ HAVE_STRCHRNUL = @HAVE_STRCHRNUL@ HAVE_STRNDUP = @HAVE_STRNDUP@ HAVE_STRPBRK = @HAVE_STRPBRK@ HAVE_STRSEP = @HAVE_STRSEP@ HAVE_STRTOD = @HAVE_STRTOD@ HAVE_STRTOLL = @HAVE_STRTOLL@ HAVE_STRTOULL = @HAVE_STRTOULL@ HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@ HAVE_STRUCT_SIGACTION_SA_SIGACTION = @HAVE_STRUCT_SIGACTION_SA_SIGACTION@ HAVE_STRUCT_TIMEVAL = @HAVE_STRUCT_TIMEVAL@ HAVE_STRVERSCMP = @HAVE_STRVERSCMP@ HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@ HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@ HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@ HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@ HAVE_SYS_SELECT_H = @HAVE_SYS_SELECT_H@ HAVE_SYS_SOCKET_H = @HAVE_SYS_SOCKET_H@ HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ HAVE_UNISTD_H = @HAVE_UNISTD_H@ HAVE_UNSETENV = @HAVE_UNSETENV@ HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@ HAVE_WCHAR_H = @HAVE_WCHAR_H@ HAVE_WCRTOMB = @HAVE_WCRTOMB@ HAVE_WCSNRTOMBS = @HAVE_WCSNRTOMBS@ HAVE_WCSRTOMBS = @HAVE_WCSRTOMBS@ HAVE_WCTYPE_H = @HAVE_WCTYPE_H@ HAVE_WINSOCK2_H = @HAVE_WINSOCK2_H@ HAVE_WINT_T = @HAVE_WINT_T@ HAVE_WS2TCPIP_H = @HAVE_WS2TCPIP_H@ HAVE__BOOL = @HAVE__BOOL@ HOST = @HOST@ HTMLDOCS_MAKEINFO_FALSE = @HTMLDOCS_MAKEINFO_FALSE@ HTMLDOCS_MAKEINFO_TRUE = @HTMLDOCS_MAKEINFO_TRUE@ HTMLDOCS_TEXI2HTML_FALSE = @HTMLDOCS_TEXI2HTML_FALSE@ HTMLDOCS_TEXI2HTML_TRUE = @HTMLDOCS_TEXI2HTML_TRUE@ INCLUDES = @INCLUDES@ INCLUDE_NEXT = @INCLUDE_NEXT@ INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INT32_MAX_LT_INTMAX_MAX = @INT32_MAX_LT_INTMAX_MAX@ INT64_MAX_EQ_LONG_MAX = @INT64_MAX_EQ_LONG_MAX@ INTTYPES_H = @INTTYPES_H@ LDFLAGS = @LDFLAGS@ LIBGNU_LIBDEPS = @LIBGNU_LIBDEPS@ LIBGNU_LTLIBDEPS = @LIBGNU_LTLIBDEPS@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@ LIB_NANOSLEEP = @LIB_NANOSLEEP@ LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@ LOCALE_FR_UTF8 = @LOCALE_FR_UTF8@ LOCALE_JA = @LOCALE_JA@ LOCALE_ZH_CN = @LOCALE_ZH_CN@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAKE = @MAKE@ MAKEINFO = @MAKEINFO@ NEXT_ERRNO_H = @NEXT_ERRNO_H@ NEXT_FCNTL_H = @NEXT_FCNTL_H@ NEXT_INTTYPES_H = @NEXT_INTTYPES_H@ NEXT_SIGNAL_H = @NEXT_SIGNAL_H@ NEXT_STDINT_H = @NEXT_STDINT_H@ NEXT_STDLIB_H = @NEXT_STDLIB_H@ NEXT_STRINGS_H = @NEXT_STRINGS_H@ NEXT_STRING_H = @NEXT_STRING_H@ NEXT_SYS_SELECT_H = @NEXT_SYS_SELECT_H@ NEXT_SYS_SOCKET_H = @NEXT_SYS_SOCKET_H@ NEXT_SYS_STAT_H = @NEXT_SYS_STAT_H@ NEXT_SYS_TIME_H = @NEXT_SYS_TIME_H@ NEXT_TIME_H = @NEXT_TIME_H@ NEXT_UNISTD_H = @NEXT_UNISTD_H@ NEXT_WCHAR_H = @NEXT_WCHAR_H@ NEXT_WCTYPE_H = @NEXT_WCTYPE_H@ 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@ PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@ PRIPTR_PREFIX = @PRIPTR_PREFIX@ PRI_MACROS_BROKEN = @PRI_MACROS_BROKEN@ PRODUCT = @PRODUCT@ PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@ RANLIB = @RANLIB@ REPLACE_BTOWC = @REPLACE_BTOWC@ REPLACE_CHOWN = @REPLACE_CHOWN@ REPLACE_CLOSE = @REPLACE_CLOSE@ REPLACE_FCHDIR = @REPLACE_FCHDIR@ REPLACE_GETCWD = @REPLACE_GETCWD@ REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@ REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@ REPLACE_ISWCNTRL = @REPLACE_ISWCNTRL@ REPLACE_LCHOWN = @REPLACE_LCHOWN@ REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@ REPLACE_LSEEK = @REPLACE_LSEEK@ REPLACE_LSTAT = @REPLACE_LSTAT@ REPLACE_MBRLEN = @REPLACE_MBRLEN@ REPLACE_MBRTOWC = @REPLACE_MBRTOWC@ REPLACE_MBSINIT = @REPLACE_MBSINIT@ REPLACE_MBSNRTOWCS = @REPLACE_MBSNRTOWCS@ REPLACE_MBSRTOWCS = @REPLACE_MBSRTOWCS@ REPLACE_MBSTATE_T = @REPLACE_MBSTATE_T@ REPLACE_MEMMEM = @REPLACE_MEMMEM@ REPLACE_MKDIR = @REPLACE_MKDIR@ REPLACE_MKSTEMP = @REPLACE_MKSTEMP@ REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@ REPLACE_OPEN = @REPLACE_OPEN@ REPLACE_PUTENV = @REPLACE_PUTENV@ REPLACE_STRCASESTR = @REPLACE_STRCASESTR@ REPLACE_STRDUP = @REPLACE_STRDUP@ REPLACE_STRERROR = @REPLACE_STRERROR@ REPLACE_STRPTIME = @REPLACE_STRPTIME@ REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@ REPLACE_STRSTR = @REPLACE_STRSTR@ REPLACE_STRTOD = @REPLACE_STRTOD@ REPLACE_TIMEGM = @REPLACE_TIMEGM@ REPLACE_WCRTOMB = @REPLACE_WCRTOMB@ REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@ REPLACE_WCTOB = @REPLACE_WCTOB@ REPLACE_WCWIDTH = @REPLACE_WCWIDTH@ REPLACE_WRITE = @REPLACE_WRITE@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@ SIZE_T_SUFFIX = @SIZE_T_SUFFIX@ STDBOOL_H = @STDBOOL_H@ STDINT_H = @STDINT_H@ STRIP = @STRIP@ SYS_SELECT_H = @SYS_SELECT_H@ SYS_SOCKET_H = @SYS_SOCKET_H@ SYS_STAT_H = @SYS_STAT_H@ SYS_TIME_H = @SYS_TIME_H@ SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ TEXI2DVI = @TEXI2DVI@ TEXI2HTML = @TEXI2HTML@ TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@ TRANSITION_FALSE = @TRANSITION_FALSE@ TRANSITION_TRUE = @TRANSITION_TRUE@ UINT32_MAX_LT_UINTMAX_MAX = @UINT32_MAX_LT_UINTMAX_MAX@ UINT64_MAX_EQ_ULONG_MAX = @UINT64_MAX_EQ_ULONG_MAX@ UNISTD_H_HAVE_WINSOCK2_H = @UNISTD_H_HAVE_WINSOCK2_H@ VERSION = @VERSION@ VOID_UNSETENV = @VOID_UNSETENV@ WCHAR_H = @WCHAR_H@ WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@ WCTYPE_H = @WCTYPE_H@ WINT_T_SUFFIX = @WINT_T_SUFFIX@ ac_ct_CC = @ac_ct_CC@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ 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 = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ gl_LIBOBJS = @gl_LIBOBJS@ gl_LTLIBOBJS = @gl_LTLIBOBJS@ gltests_LIBOBJS = @gltests_LIBOBJS@ gltests_LTLIBOBJS = @gltests_LTLIBOBJS@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ 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@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ info_TEXINFOS = gnuit.texinfo ORIG_MANS = gitfm.1 gitaction.1 gitkeys.1 gitmount.1 gitrgrep.1 gitunpack.1 \ gitps.1 gitinternal.1 gitwipe.1 gitview.1 gitdpkgname.1 man_MANS = $(ORIG_MANS) $(am__append_1) BUILT_SOURCES = gnuit.html html_DATA = gnuit.html pkgdata_DATA = dpkg-help.txt EXTRA_DIST = gitfm.1 gitaction.1 gitkeys.1 gitmount.1 gitrgrep.1 gitunpack.1\ gnuit.html git.1 gitps.1 gitview.1 gitwipe.1 gitinternal.1 \ gitdpkgname.1 dpkg-help.txt fdl.texi GIT_INTERNAL_MANS = gitwhich gitmkdirs gitxgrep GIT_GREPS = gitregrep gitrfgrep all: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) all-am .SUFFIXES: .SUFFIXES: .dvi .html .info .pdf .ps .texinfo $(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) --foreign doc/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --foreign 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 .texinfo.info: restore=: && backupdir="$(am__leading_dot)am$$$$" && \ am__cwd=`pwd` && cd $(srcdir) && \ rm -rf $$backupdir && mkdir $$backupdir && \ if ($(MAKEINFO) --version) >/dev/null 2>&1; then \ for f in $@ $@-[0-9] $@-[0-9][0-9] $(@:.info=).i[0-9] $(@:.info=).i[0-9][0-9]; do \ if test -f $$f; then mv $$f $$backupdir; restore=mv; else :; fi; \ done; \ else :; fi && \ cd "$$am__cwd"; \ if $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \ -o $@ $<; \ then \ rc=0; \ cd $(srcdir); \ else \ rc=$$?; \ cd $(srcdir) && \ $$restore $$backupdir/* `echo "./$@" | sed 's|[^/]*$$||'`; \ fi; \ rm -rf $$backupdir; exit $$rc .texinfo.dvi: TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \ MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \ $(TEXI2DVI) $< .texinfo.pdf: TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \ MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \ $(TEXI2PDF) $< .texinfo.html: rm -rf $(@:.html=.htp) if $(MAKEINFOHTML) $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \ -o $(@:.html=.htp) $<; \ then \ rm -rf $@; \ if test ! -d $(@:.html=.htp) && test -d $(@:.html=); then \ mv $(@:.html=) $@; else mv $(@:.html=.htp) $@; fi; \ else \ if test ! -d $(@:.html=.htp) && test -d $(@:.html=); then \ rm -rf $(@:.html=); else rm -Rf $(@:.html=.htp) $@; fi; \ exit 1; \ fi $(srcdir)/gnuit.info: gnuit.texinfo gnuit.dvi: gnuit.texinfo gnuit.pdf: gnuit.texinfo .dvi.ps: TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \ $(DVIPS) -o $@ $< uninstall-info-am: @$(PRE_UNINSTALL) @if (install-info --version && \ install-info --version 2>&1 | sed 1q | grep -i -v debian) >/dev/null 2>&1; then \ list='$(INFO_DEPS)'; \ for file in $$list; do \ relfile=`echo "$$file" | sed 's|^.*/||'`; \ echo " install-info --info-dir='$(DESTDIR)$(infodir)' --remove '$(DESTDIR)$(infodir)/$$relfile'"; \ install-info --info-dir="$(DESTDIR)$(infodir)" --remove "$(DESTDIR)$(infodir)/$$relfile"; \ done; \ else :; fi @$(NORMAL_UNINSTALL) @list='$(INFO_DEPS)'; \ for file in $$list; do \ relfile=`echo "$$file" | sed 's|^.*/||'`; \ relfile_i=`echo "$$relfile" | sed 's|\.info$$||;s|$$|.i|'`; \ (if cd "$(DESTDIR)$(infodir)"; then \ echo " cd '$(DESTDIR)$(infodir)' && rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]"; \ rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]; \ else :; fi); \ done dist-info: $(INFO_DEPS) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ list='$(INFO_DEPS)'; \ for base in $$list; do \ case $$base in \ $(srcdir)/*) base=`echo "$$base" | sed "s|^$$srcdirstrip/||"`;; \ esac; \ if test -f $$base; then d=.; else d=$(srcdir); fi; \ base_i=`echo "$$base" | sed 's|\.info$$||;s|$$|.i|'`; \ for file in $$d/$$base $$d/$$base-[0-9] $$d/$$base-[0-9][0-9] $$d/$$base_i[0-9] $$d/$$base_i[0-9][0-9]; do \ if test -f $$file; then \ relfile=`expr "$$file" : "$$d/\(.*\)"`; \ test -f $(distdir)/$$relfile || \ cp -p $$file $(distdir)/$$relfile; \ else :; fi; \ done; \ done mostlyclean-aminfo: -rm -rf gnuit.aux gnuit.cp gnuit.cps gnuit.fn gnuit.fns gnuit.ky gnuit.kys \ gnuit.log gnuit.pg gnuit.pgs gnuit.tmp gnuit.toc gnuit.tp \ gnuit.tps gnuit.vr gnuit.vrs gnuit.dvi gnuit.pdf gnuit.ps \ gnuit.html maintainer-clean-aminfo: @list='$(INFO_DEPS)'; for i in $$list; do \ i_i=`echo "$$i" | sed 's|\.info$$||;s|$$|.i|'`; \ echo " rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]"; \ rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]; \ done 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-htmlDATA: $(html_DATA) @$(NORMAL_INSTALL) test -z "$(htmldir)" || $(mkdir_p) "$(DESTDIR)$(htmldir)" @list='$(html_DATA)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f=$(am__strip_dir) \ echo " $(htmlDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(htmldir)/$$f'"; \ $(htmlDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(htmldir)/$$f"; \ done uninstall-htmlDATA: @$(NORMAL_UNINSTALL) @list='$(html_DATA)'; for p in $$list; do \ f=$(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(htmldir)/$$f'"; \ rm -f "$(DESTDIR)$(htmldir)/$$f"; \ done install-pkgdataDATA: $(pkgdata_DATA) @$(NORMAL_INSTALL) test -z "$(pkgdatadir)" || $(mkdir_p) "$(DESTDIR)$(pkgdatadir)" @list='$(pkgdata_DATA)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f=$(am__strip_dir) \ echo " $(pkgdataDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgdatadir)/$$f'"; \ $(pkgdataDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgdatadir)/$$f"; \ done uninstall-pkgdataDATA: @$(NORMAL_UNINSTALL) @list='$(pkgdata_DATA)'; for p in $$list; do \ f=$(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(pkgdatadir)/$$f'"; \ rm -f "$(DESTDIR)$(pkgdatadir)/$$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)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ 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-info dist-hook check-am: all-am check: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) check-am all-am: Makefile $(INFO_DEPS) $(MANS) $(DATA) installdirs: for dir in "$(DESTDIR)$(infodir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(htmldir)" "$(DESTDIR)$(pkgdatadir)"; do \ test -z "$$dir" || $(mkdir_p) "$$dir"; \ done install: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) 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 "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) 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: $(DVIS) html-am: $(HTMLS) info: info-am info-am: $(INFO_DEPS) install-data-am: install-htmlDATA install-info-am install-man \ install-pkgdataDATA @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) install-data-hook install-exec-am: install-info: install-info-am install-info-am: $(INFO_DEPS) @$(NORMAL_INSTALL) test -z "$(infodir)" || $(mkdir_p) "$(DESTDIR)$(infodir)" @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ list='$(INFO_DEPS)'; \ for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ esac; \ if test -f $$file; then d=.; else d=$(srcdir); fi; \ file_i=`echo "$$file" | sed 's|\.info$$||;s|$$|.i|'`; \ for ifile in $$d/$$file $$d/$$file-[0-9] $$d/$$file-[0-9][0-9] \ $$d/$$file_i[0-9] $$d/$$file_i[0-9][0-9] ; do \ if test -f $$ifile; then \ relfile=`echo "$$ifile" | sed 's|^.*/||'`; \ echo " $(INSTALL_DATA) '$$ifile' '$(DESTDIR)$(infodir)/$$relfile'"; \ $(INSTALL_DATA) "$$ifile" "$(DESTDIR)$(infodir)/$$relfile"; \ else : ; fi; \ done; \ done @$(POST_INSTALL) @if (install-info --version && \ install-info --version 2>&1 | sed 1q | grep -i -v debian) >/dev/null 2>&1; then \ list='$(INFO_DEPS)'; \ for file in $$list; do \ relfile=`echo "$$file" | sed 's|^.*/||'`; \ echo " install-info --info-dir='$(DESTDIR)$(infodir)' '$(DESTDIR)$(infodir)/$$relfile'";\ install-info --info-dir="$(DESTDIR)$(infodir)" "$(DESTDIR)$(infodir)/$$relfile" || :;\ done; \ else : ; fi install-man: install-man1 installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-aminfo \ maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-aminfo mostlyclean-generic pdf: pdf-am pdf-am: $(PDFS) ps: ps-am ps-am: $(PSS) uninstall-am: uninstall-htmlDATA uninstall-info-am uninstall-local \ uninstall-man uninstall-pkgdataDATA uninstall-man: uninstall-man1 .PHONY: all all-am check check-am clean clean-generic dist-hook \ dist-info distclean distclean-generic distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-data-hook install-exec install-exec-am \ install-htmlDATA install-info install-info-am install-man \ install-man1 install-pkgdataDATA install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-aminfo maintainer-clean-generic mostlyclean \ mostlyclean-aminfo mostlyclean-generic pdf pdf-am ps ps-am \ uninstall uninstall-am uninstall-htmlDATA uninstall-info-am \ uninstall-local uninstall-man uninstall-man1 \ uninstall-pkgdataDATA #AM_MAKEINFOHTMLFLAGS = --no-split #dist-hook: html gnuit.html: -make html html: @HTMLDOCS_TEXI2HTML_TRUE@ texi2html -expandinfo $(srcdir)/gnuit.texinfo @HTMLDOCS_MAKEINFO_TRUE@@HTMLDOCS_TEXI2HTML_FALSE@ makeinfo --html --no-split -o gnuit.html $(srcdir)/gnuit.texinfo @HTMLDOCS_MAKEINFO_FALSE@@HTMLDOCS_TEXI2HTML_FALSE@ echo Not building html documentation: cannot find texi2html or makeinfo dist-hook: html # If mandir != $(prefix)/man (eg is $(prefix)/share/man) # there could be old manpages in ${prefix}/man, remove them, # ignoring git.1 in case the other git is using it # The same applies for infodir, $(prefix)/info vs $(prefix)/share/info install-data-hook: for i in $(GIT_GREPS);\ do\ rm -f $(DESTDIR)$(mandir)/man1/$${i}.1;\ ln -s $(mandir)/man1/gitrgrep.1 $(DESTDIR)$(mandir)/man1/$${i}.1;\ done \ for i in $(GIT_INTERNAL_MANS);\ do\ rm -f $(DESTDIR)$(mandir)/man1/$${i}.1;\ ln -s $(mandir)/man1/gitinternal.1 $(DESTDIR)$(mandir)/man1/$${i}.1;\ done if [ "$(mandir)" != "$(prefix)/man" ]; then\ for i in $(ORIG_MANS) $(GIT_INTERNAL_MANS); \ do\ if [ -e "$(DESTDIR)$(prefix)/man/man1/$${i}" ]; then \ rm -f "$(DESTDIR)$(prefix)/man/man1/$${i}"; \ fi; \ done; \ fi if [ "$(infodir)" != "$(prefix)/info" ]; then\ rm -f "$(DESTDIR)$(prefix)/info/gnuit"*; \ fi uninstall-local: -rmdir $(DESTDIR)$(htmldir) for i in $(GIT_GREPS);\ do\ rm -f $(DESTDIR)$(mandir)/man1/$${i}.1;\ done \ for i in $(GIT_INTERNAL_MANS);\ do\ rm -f $(DESTDIR)$(mandir)/man1/$${i}.1;\ done # 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: gnuit-4.9.5/doc/git.10000644000175000017500000000330611146671375011227 00000000000000.\" +---------- .\" | .\" | git.transition man page .\" | .\" | Copyright 1993-2008 Free Software Foundation, Inc. .\" | .\" | This file is part of GNUIT (GNU Interactive Tools) .\" | .\" | GNUIT 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 3, or (at your option) any later .\" | version. .\" | .\" | GNUIT 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 GNUIT; see the file COPYING. If not, see http://www.gnu.org/licenses/ .\" | .TH git.transition 1 .SH NAME git.transition \- GNU Interactive Tools \- git transition script .SH SYNTAX .I git [arguments to gitfm] .SH DESCRIPTION The filemanager with GNU Interactive Tools (gnuit) is now called .I gitfm git.transition is a very small script that replaces /usr/bin/git. The script warns the user of the rename, and then runs gitfm(1), passing any supplied arguments. git was renamed to gitfm to avoid confusion with Linus Torvalds' content tracker, also called git. .SH DEBIAN If you wish to complete the transition early, install git-core and (as root) use: update-alternatives \-\-config git .SH SEE ALSO gitfm(1) git(7) (part of the git-core package on Debian, or see http://git.or.cz/) .SH AUTHORS .I Tudor Hulubei .br .I Andrei Pitis .br .I Ian Beckwith (Current maintainer) gnuit-4.9.5/doc/Makefile.am0000644000175000017500000000406311146671375012417 00000000000000info_TEXINFOS = gnuit.texinfo ORIG_MANS = gitfm.1 gitaction.1 gitkeys.1 gitmount.1 gitrgrep.1 gitunpack.1 \ gitps.1 gitinternal.1 gitwipe.1 gitview.1 gitdpkgname.1 man_MANS= $(ORIG_MANS) BUILT_SOURCES = gnuit.html html_DATA = gnuit.html pkgdata_DATA = dpkg-help.txt EXTRA_DIST = gitfm.1 gitaction.1 gitkeys.1 gitmount.1 gitrgrep.1 gitunpack.1\ gnuit.html git.1 gitps.1 gitview.1 gitwipe.1 gitinternal.1 \ gitdpkgname.1 dpkg-help.txt fdl.texi if TRANSITION man_MANS += git.1 endif GIT_INTERNAL_MANS=gitwhich gitmkdirs gitxgrep GIT_GREPS=gitregrep gitrfgrep #AM_MAKEINFOHTMLFLAGS = --no-split #dist-hook: html gnuit.html: -make html html: if HTMLDOCS_TEXI2HTML texi2html -expandinfo $(srcdir)/gnuit.texinfo else if HTMLDOCS_MAKEINFO makeinfo --html --no-split -o gnuit.html $(srcdir)/gnuit.texinfo else echo Not building html documentation: cannot find texi2html or makeinfo endif endif dist-hook: html # If mandir != $(prefix)/man (eg is $(prefix)/share/man) # there could be old manpages in ${prefix}/man, remove them, # ignoring git.1 in case the other git is using it # The same applies for infodir, $(prefix)/info vs $(prefix)/share/info install-data-hook: for i in $(GIT_GREPS);\ do\ rm -f $(DESTDIR)$(mandir)/man1/$${i}.1;\ ln -s $(mandir)/man1/gitrgrep.1 $(DESTDIR)$(mandir)/man1/$${i}.1;\ done \ for i in $(GIT_INTERNAL_MANS);\ do\ rm -f $(DESTDIR)$(mandir)/man1/$${i}.1;\ ln -s $(mandir)/man1/gitinternal.1 $(DESTDIR)$(mandir)/man1/$${i}.1;\ done if [ "$(mandir)" != "$(prefix)/man" ]; then\ for i in $(ORIG_MANS) $(GIT_INTERNAL_MANS); \ do\ if [ -e "$(DESTDIR)$(prefix)/man/man1/$${i}" ]; then \ rm -f "$(DESTDIR)$(prefix)/man/man1/$${i}"; \ fi; \ done; \ fi if [ "$(infodir)" != "$(prefix)/info" ]; then\ rm -f "$(DESTDIR)$(prefix)/info/gnuit"*; \ fi uninstall-local: -rmdir $(DESTDIR)$(htmldir) for i in $(GIT_GREPS);\ do\ rm -f $(DESTDIR)$(mandir)/man1/$${i}.1;\ done \ for i in $(GIT_INTERNAL_MANS);\ do\ rm -f $(DESTDIR)$(mandir)/man1/$${i}.1;\ done gnuit-4.9.5/doc/gitmount.10000644000175000017500000000327511146671375012317 00000000000000.\" +---------- .\" | .\" | GITMOUNT man page .\" | .\" | Copyright 1993-1999, 2006-2007 Free Software Foundation, Inc. .\" | .\" | This file is part of GNUIT (GNU Interactive Tools) .\" | .\" | GNUIT 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 3, or (at your option) any later .\" | version. .\" | .\" | GNUIT 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 GNUIT; see the file COPYING. If not, see http://www.gnu.org/licenses/ .\" | .TH gitmount 1 .SH NAME gitmount \- GNU Interactive Tools - auto-mount script .SH SYNTAX .I gitmount device .SH DESCRIPTION .I gitmount is a script which allows you to mount any block device without specifying the file system type. You may now insert the floppy in the drive and type ' .BR "gitmount fd0" ' and the first floppy will be mounted in the directory .BR /mnt/fd0 . On Linux just press .B F11 or .BR F12 . You don't need to know the file system type anymore. The directories .B /mnt/fd0 and .B /mnt/fd1 are created if they don't exist. .SH BUGS Please send bug reports to: .br .I gnuit-dev@gnu.org .SH SEE ALSO gitfm(1) gitps(1) gitview(1) gitkeys(1) gitaction(1) gitrgrep(1) gitunpack(1) .SH AUTHORS .I Tudor Hulubei .br .I Andrei Pitis .br .I Ian Beckwith (Current maintainer) gnuit-4.9.5/doc/gitps.10000644000175000017500000000602111146671375011567 00000000000000.\" Hey, EMACS: -*- nroff -*- .\" +---------- .\" | .\" | GITPS man page .\" | .\" | Copyright 1993-1999,2006-2007 Free Software Foundation, Inc. .\" | .\" | This file is part of GNUIT (GNU Interactive Tools) .\" | .\" | GNUIT 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 3, or (at your option) any later .\" | version. .\" | .\" | GNUIT 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 GNUIT; see the file COPYING. If not, see http://www.gnu.org/licenses/ .\" | .\" First parameter, NAME, should be all caps .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection .\" other parameters are allowed: see man(7), man(1) .TH GITPS 1 "Sep 30, 2007" .\" Please adjust this date whenever revising the manpage. .\" .\" Some roff macros, for reference: .\" .nh disable hyphenation .\" .hy enable hyphenation .\" .ad l left justify .\" .ad b justify to both left and right margins .\" .nf disable filling .\" .fi enable filling .\" .br insert line break .\" .sp insert n+1 empty lines .\" for manpage-specific macros, see man(7) .SH NAME gitps \- A process viewer/killer .SH SYNOPSIS .B gitps .RI [ -hvcblp ] .SH DESCRIPTION This manual page documents briefly the .B gitps command. \fBgitps\fP is an interactive process viewer/killer. It calls internally the \fBps\fP(1) utility. .PP More extensive documentation on .I gitps and the other .B gnuit tools is available in info format, try .I 'info gnuit'. .PP Running `gitps' is self explanatory. Use the `arrows', `PageUp', `PageDown', `Home', `End', `^N', `^P', `^V', `ESC v', `Space' and `Backspace' to move in the list, `^L' to refresh it, `Enter' to change the default signal and `F10', `q' or `^X ^C' to leave. .PP You can change these keys, just read the GITPS-Setup, GITPS-Color, GITPS-Monochrome and GITPS-Keys sections in the configuration files \fBgnuitrc.TERM\fP. .PP .B gitps is part of the GNU Interactive Tools. .SH OPTIONS A summary of options is included below. For a complete description, see the Info files. .TP .B \-h Show summary of options. .TP .B \-v Show version of program. .TP .B \-c Use ANSI colours. .TP .B \-b Don't use ANSI colours. .TP .B \-l Don't use last screen character. .TP .B \-p Pass the remaining arguments to ps(1). .SH SEE ALSO .BR gitfm (1) .PP \fBgitps\fP and \fBgitfm\fP are documented fully by .IR "GNU Interactive Tools" , available via the Info system. .SH BUGS Please send bug reports to: .br .I gnuit-dev@gnu.org .SH AUTHORS .I Tudor Hulubei .br .I Andrei Pitis .br .I Ian Beckwith (Current maintainer) gnuit-4.9.5/doc/gitview.10000644000175000017500000000561411146671375012126 00000000000000.\" Hey, EMACS: -*- nroff -*- .\" +---------- .\" | .\" | GITVIEW man page .\" | .\" | Copyright 1993-1999,2006-2007 Free Software Foundation, Inc. .\" | .\" | This file is part of GNUIT (GNU Interactive Tools) .\" | .\" | GNUIT 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 3, or (at your option) any later .\" | version. .\" | .\" | GNUIT 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 GNUIT; see the file COPYING. If not, see http://www.gnu.org/licenses/ .\" | .\" First parameter, NAME, should be all caps .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection .\" other parameters are allowed: see man(7), man(1) .TH GITVIEW 1 "Sep 30, 2007" .\" Please adjust this date whenever revising the manpage. .\" .\" Some roff macros, for reference: .\" .nh disable hyphenation .\" .hy enable hyphenation .\" .ad l left justify .\" .ad b justify to both left and right margins .\" .nf disable filling .\" .fi enable filling .\" .br insert line break .\" .sp insert n+1 empty lines .\" for manpage-specific macros, see man(7) .SH NAME gitview \- An ASCII/HEX file viewer .SH SYNOPSIS .B gitview .RI [ -hvcblp ] " file" .SH DESCRIPTION This manual page documents briefly the .B gitview command. \fBgitview\fP is an ASCII/HEX file viewer. Use the `arrows', `PageUp', `PageDown', `Home', `End', `^N', `^P', `^V', `ESC v', `Space' and `Backspace' to move in the file, `^L' to refresh the screen and `F10', `q' or `^X ^C' to leave. .PP More extensive documentation on .I gitview and the other .B gnuit tools is available in info format, try .I 'info gnuit'. .PP You can change these keys, just read the GITVIEW-Setup, GITVIEW-Color, GITVIEW-Monochrome and GITVIEW-Keys sections in the configuration files \fBgnuitrc.TERM\fP. .PP .B gitview is part of \fBgit\fP(1), the GNU Interactive Tools. .SH OPTIONS A summary of options is included below. For a complete description, see the Info files. .TP .B \-h Show summary of options. .TP .B \-v Show version of program. .TP .B \-c Use ANSI colours. .TP .B \-b Don't use ANSI colours. .TP .B \-l Don't use last screen character. .SH SEE ALSO .BR gitfm (1) .PP \fBgitview\fP and \fBgitfm\fP are documented fully by .IR "GNU Interactive Tools" , available via the Info system. .SH BUGS Please send bug reports to: .br .I gnuit-dev@gnu.org .SH AUTHORS .I Tudor Hulubei .br .I Andrei Pitis .br .I Ian Beckwith (Current maintainer) gnuit-4.9.5/doc/gitwipe.10000644000175000017500000000523411146671375012116 00000000000000.\" Hey, EMACS: -*- nroff -*- .\" +---------- .\" | .\" | GITWIPE man page .\" | .\" | Copyright 1993-1999,2006-2007 Free Software Foundation, Inc. .\" | .\" | This file is part of GNUIT (GNU Interactive Tools) .\" | .\" | GNUIT 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 3, or (at your option) any later .\" | version. .\" | .\" | GNUIT 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 GNUIT; see the file COPYING. If not, see http://www.gnu.org/licenses/ .\" | .\" First parameter, NAME, should be all caps .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection .\" other parameters are allowed: see man(7), man(1) .TH GITWIPE 1 "Sep 30, 2007" .\" Please adjust this date whenever revising the manpage. .\" .\" Some roff macros, for reference: .\" .nh disable hyphenation .\" .hy enable hyphenation .\" .ad l left justify .\" .ad b justify to both left and right margins .\" .nf disable filling .\" .fi enable filling .\" .br insert line break .\" .sp insert n+1 empty lines .\" for manpage-specific macros, see man(7) .SH NAME gitwipe \- An utility for wiping files .SH SYNOPSIS .B gitwipe .I "file ..." .SH DESCRIPTION This manual page documents briefly the .B gitwipe command. \fBgitwipe\fP is an utility for wiping files. It overwrites the file contents with a random sequence of numbers and then calls `sync'(). .PP Note that \fBgitwipe\fP does \fBnot\fP remove the wiped file since (under `Linux' at least) the `sync'() system call might return before actually writing the new file contents to disk. Removing the file might be dangerous because some file systems can detect that the blocks in the removed wiped file are no longer used and never write them back to disk in order to improve performance. It is up to you to remove the file(s) at a later moment. .PP .B gitwipe is part of the GNU Interactive Tools. .SH SEE ALSO .BR gitfm (1) .PP \fBgitwipe\fP and \fBgitfm\fP are documented fully by .IR "GNU Interactive Tools" , available via the Info system. .SH BUGS Please send bug reports to: .br .I gnuit-dev@gnu.org .SH AUTHORS .I Tudor Hulubei .br .I Andrei Pitis .br .I Ian Beckwith (Current maintainer) gnuit-4.9.5/doc/gnuit.texinfo0000644000175000017500000037162511146671375013122 00000000000000\input texinfo @c -*-texinfo-*- @c %**start of header @setfilename gnuit.info @settitle GNU Interactive Tools @c For double-sided printing, uncomment: @c @setchapternewpage odd @c %**end of header @set EDITION 2.9.4 @set VERSION 4.9.5 @set UPDATED January 2008 @iftex @finalout @end iftex @ifinfo @dircategory Utilities @format START-INFO-DIR-ENTRY * gnuit: (gnuit). GNU Interactive Tools END-INFO-DIR-ENTRY @end format @end ifinfo @copying GNUIT: A set of interactive tools, by Tudor Hulubei and Andrei Pitis. This file documents the GNU Interactive Tools package. Copyright (C) 1993-1998, 2006-2008 Free Software Foundation, Inc. @quotation Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the license is included in the section entitled ``Copying This Manual''. @end quotation @end copying @titlepage @title GNU Interactive Tools @subtitle A Set of Interactive Programs @subtitle Edition @value{EDITION}, for GNUIT version @value{VERSION} @subtitle @value{UPDATED} @author by Tudor Hulubei, Andrei Pitis and Ian Beckwith @page @vskip 0pt plus 1filll @insertcopying @end titlepage @node Top, Introduction, , (dir) @comment node-name, next, previous, up @ifinfo @code{GNUIT} is a package containing a file system browser, a process viewer/killer and an ASCII/HEX file viewer. This is edition @value{EDITION}, for GNU Interactive Tools version @value{VERSION}. @end ifinfo @menu * Introduction:: An introduction to GNUIT concepts. * Distrib:: How to get the latest GNUIT distribution. * Description:: How to use GNUIT. * Customization:: How to customize GNUIT. * Limitations:: Known GNUIT limitations. * Bugs:: How to report a bug. * Copying This Manual:: The GNU Free Documentation License. * Key Index:: An item for each standard GNUIT key sequence. * Command Index:: An item for each command name. * Variable Index:: An item for each documented variable. * Concept Index:: An item for each concept. @end menu @node Introduction, Distrib, Top, Top @chapter Introduction @code{GNUIT} is a set of interactive tools. It contains an extensible file system browser, an ascii/hex file viewer, a process viewer/killer and some other related utilities and shell scripts. It can be used to increase the speed and efficiency of most of the daily tasks such as copying and moving files and directories, invoking editors, compressing and uncompressing files, creating and expanding archives, compiling programs, sending mail, etc. It looks nice, has colors (if the standard ANSI color sequences are supported) and is user-friendly. @code{GNUIT} runs on a wide variety of @code{UNIX} systems because it uses the @code{GNU Autoconf} package to get system specific information. Please refer to the PLATFORMS file included in the standard distribution for a detailed list of systems on which @code{GNUIT} has been tested. One of the main advantages of @code{GNUIT} is its flexibility. It is not limited to a given set of commands. The configuration file can be easily enhanced, allowing the user to add new commands or file operations, depending on its needs or preferences. @code{GNUIT} also provides a shell like command prompt, just to make sure that the entire power of the @code{UNIX} shell commands is still there. @node Distrib, Key Index, Introduction, Top @chapter Distributing GNU Interactive Tools @code{GNUIT} is "free software"; this means that everyone is free to use it and free to redistribute it on certain conditions. @code{GNUIT} is not in the public domain; it is copyrighted and there are restrictions on its distribution, but these restrictions are designed to permit everything that a good cooperating citizen would want to do. What is not allowed is to try to prevent others from further sharing any version of @code{GNUIT} that they might get from you. The precise conditions are found in the GNU General Public License that comes with @code{GNUIT} and also appears following this section. The easiest way to get a copy of @code{GNUIT} is from someone else who has it. You need not ask for our permission to do so, or tell any one else; just copy it. If you have access to the Internet, you can get the latest distribution version of @code{GNUIT} from host @samp{ftp.gnu.org} using anonymous login. See the file `/pub/gnu/GETTING.GNU.SOFTWARE' on that host to find out about your options for copying and which files to use. You may also receive @code{GNU Interactive Tools} when you buy a computer. Computer manufacturers are free to distribute copies on the same terms that apply to everyone else. These terms require them to give you the full sources, including whatever changes they may have made, and to permit you to redistribute the GNU Interactive Tools received from them under the usual terms of the General Public License. In other words, the program must be free for you when you get it, not just free for the manufacturer. @node Description, Customization, Concept Index, Top @chapter Using GNU Interactive Tools The @code{GNUIT} package contains three interactive programs and a few additional utilities. Here there is a description of each of them. @menu * gitfm:: A file system browser. * gitps:: A process viewer/killer. * gitview:: An ASCII/HEX file viewer. * gitkeys:: An utility for displaying key sequences. * gitwipe:: An utility for wiping files. * gitmount:: A script for mounting file systems. * gitaction:: A per file type action script. * gitunpack:: Unified archive unpacking. * gitrgrep:: A recursive grep script. @end menu @node gitfm, gitps, , Description @section The GIT file system browser @cindex gitfm @code{gitfm} is a file system browser with some shell like features designed to make your work much easier and much efficient. It displays one or two panels, each one containing a file system directory. You can browse the directory tree with the usual cursor keys, pressing @kbd{ENTER} when you want to enter or leave a directory and @kbd{TAB} when you want to change the panels. Under the two panels there is a shell like input line which you can use to type normal shell commands. The input line can handle an unlimited number of characters and keeps a history of typed commands (using the GNU history library). Under the input line there is a status bar. You can see there the status of the currently executed command, the warnings and errors and you will be prompted if a decision has to be taken. @menu * Conventions:: Key binding conventions. * Command line:: The command line arguments. * Modes:: How panels can look like. * Sorting:: How files can be sorted in a panel. * Moving:: How to move the cursor in the panel. * Selecting:: How to select (mark) files in a panel. * Isearch:: How to search a file name in a panel. * Input Line:: How to use the input line. Basic editing. * Files:: How to copy/move/delete/compress/@dots{} files. * Directories:: How to operate with directories. * Compiling:: How to compile programs. * Mail:: How to send/receive ascii/binary mail. * Shell:: How to start a sub-shell. * Grep:: How to use grep/recursive grep. * Locking:: How to lock your console. * Refreshing:: How to refresh the screen contents. * Resetting:: How to reset your terminal. * Mounting:: How to mount/unmount a file system. * Sysinfo:: How to get some useful system information. * Environment:: How to look at the environment variables. * Processes:: How to view/kill processes. * Sync:: How to synchronize your file systems. * Documentation:: How to read documentation. * Exit:: How to exit GNU Interactive Tools. @end menu @node Conventions, Command line, , gitfm @subsection Key binding conventions @code{gitfm} now follows a new, easy to remember, scheme to bind commands on keys. This is only a convention, if you define new key bindings you may, or may not follow it. All the file commands start with @kbd{^C}. This prefix can be followed by some modifiers, in order to affect the default behavior of the given command. These modifiers are @kbd{b} and @kbd{r}. @kbd{b} - this modifier specifies that the command will run in background: @example ^CM = CHMOD; chmod %s@{New mode of %i: ,%m@} %i;;;;y @end example @noindent defines a command that changes the current selected files mode in foreground, while @example ^CbM = B-CHMOD; chmod %s@{New mode of %i: ,%m@} %i&;;;;y @end example @noindent defines a background command that does the same thing. @kbd{r} - this modifier specifies that the command will be run recursively: @example ^CrM = R-CHMOD; chmod -R %s@{New mode of %i: ,@} %i;;;;y @end example @noindent defines a command that recursively changes the mode of the selected entries. The @kbd{b} and @kbd{r} modifiers can be combined, the resulting command running recursively and in background: @example ^CbrM = B-R-CHMOD; chmod -R %s@{New mode of %i: ,@} %i&;;;;y @end example You should also note that for some commands (like @code{gzip}) there is no need for a non-recursive version. Running @code{gzip} recursively on files is harmless. If there is a directory between these files, @code{gzip} will recursively compress that directory, so you can use the same key binding for recursively and non-recursively compressing. In fact, it is a matter of selecting files or directories. Unfortunately, we can't run @code{chmod} recursively trying to change the mode of all the files in a directory to 0644 because that directory might contain subdirectories and removing the execution permission from them is a bad idea. So, in this case, we need separate commands. @node Command line, Modes, Conventions, gitfm @subsection Command line This is a brief description of the command line arguments. @noindent @code{-h} print this help message @noindent @code{-v} print the version number @noindent @code{-c} use ANSI colors @noindent @code{-b} don't use ANSI colors @noindent @code{-l} don't use the last screen character @noindent @code{-p} output final path at exit The @code{-p} option can be used to make gitfm force bash (assuming that you're using it as your shell) chdir to the last directory gitfm was in before quitting. In order to do this, you need to invoke gitfm using this function (put it into your .profile): @display function g @{ gitfm -p $@ 3> /tmp/gitfm.p.$$ if test -s /tmp/gitfm.p.$$; then if test -d "`cat /tmp/gitfm.p.$$`"; then cd "`cat /tmp/gitfm.p.$$`" else cd fi fi rm -f /tmp/gitfm.p.$$ @} @end display This will not work if you suspend gitfm. Nothing bad will happen, just the chdir will not be performed. @node Modes, Sorting, Command line, gitfm @subsection Panel modes @code{gitfm} has three major modes of displaying the panels. In the first (default) mode, two panels are displayed, each one using half of the screen. In the second mode, only one panel uses the entire screen. In the third mode, only the status bar and the input line are displayed, both panels being hidden. Briefly, a panel can use the entire screen or just half of it. Even when a panel is hidden, it still exists. @cindex Major modes @cindex Half screen @cindex Entire screen Users can switch between these three major modes as needed: @noindent @kbd{^X 0} @display Enlarges the other panel to use the entire screen. It also changes the minor mode to @samp{Enable all}. The current panel will become invisible (@samp{enlarge-other-panel}). @end display @cindex One panel @cindex Enlarge other panel @findex enlarge-other-panel @kindex ^X 0 @noindent @kbd{^X 1} @display Enlarges the current panel to use the entire screen. It also changes the minor mode to @samp{Enable all}. The other panel will become invisible (@samp{enlarge-panel}). @end display @cindex One panel @cindex Enlarge panel @findex enlarge-panel @kindex ^X 1 @noindent @kbd{^X 2} @display Switches back to the two panel mode (@samp{two-panel-mode}). @end display @cindex Two panel mode @cindex Two panels @findex two-panel-mode @kindex ^X 2 @noindent @kbd{^O}, @kbd{ESC o} @display Switches to the tty mode (no panels on the screen) (@samp{tty-mode}). @end display @cindex No panels mode @cindex tty mode @findex tty-mode @kindex ^O, ESC o A panel displays the files and subdirectories in a directory. You can optionally specify some additional information about each entry (file, directory, @dots{}) to be displayed (a minor mode). When using the full screen mode, all the minor modes here can be used. In half screen mode, the @samp{panel-enable-all} mode is not available. These are the panel minor modes: @cindex Minor modes @noindent @kbd{ESC e o} @display Display the entry owner and group (@samp{panel-enable-owner-group}). @end display @cindex Owner, group @cindex Group, owner @cindex Owner and group @cindex Group and owner @findex panel-enable-owner-group @kindex ESC e o @noindent @kbd{ESC e d} @display Display the entry date and time (@samp{panel-enable-date-time}). @end display @cindex Date, time @cindex Time, date @cindex Date and time @cindex Time and date @findex panel-enable-date-time @kindex ESC e d @noindent @kbd{ESC e s} @display Display the entry size (@samp{panel-enable-size}). @end display @cindex File size @cindex Directory size @cindex File or directory size @findex panel-enable-size @kindex ESC e s @noindent @kbd{ESC e S} @display Display the entry size, scaled (e.g. @samp{123M}) (@samp{panel-enable-abbrevsize}). @end display @cindex File size @cindex Directory size @cindex File or directory size @findex panel-enable-abbrevsize @kindex ESC e S @noindent @kbd{ESC e m} @display Display the entry mode (@samp{panel-enable-mode}). @end display @cindex File mode @cindex Directory mode @cindex File or directory mode @findex panel-enable-mode @kindex ESC e m @noindent @kbd{ESC e f} @display Display the entry full name (@samp{panel-enable-full-name}). @end display @cindex Full name @cindex Full file name @cindex Full directory name @cindex Full file or directory name @findex panel-enable-full-name @kindex ESC e f @noindent @kbd{ESC e a} @display Display the entire information about file (@samp{panel-enable-all}). This mode is only available if the panel has been enlarged to use the entire screen with @samp{enlarge-panel} or @samp{enlarge-other-panel} (@samp{panel-enable-all}). @end display @cindex Full info @cindex Full file info @cindex Full directory info @cindex Enable all @findex panel-enable-all @kindex ESC e a There is another way of changing the panel minor modes: @noindent @kbd{^]}, @kbd{^[]} @display Switches to the next panel minor mode (@samp{panel-enable-next-mode}). @end display @cindex Enable next mode @findex panel-enable-next-mode @kindex ^] @kindex ^[] @node Sorting, Moving, Modes, gitfm @subsection Sorting methods @cindex Sorting Entries in a panel can be sorted in different ways. These are the available options: @noindent @kbd{ESC s n} @display Display the panel entries sorted by their names (@samp{panel-sort-by-name}). @end display @cindex Sorted by name @cindex Sorting by name @findex panel-sort-by-name @kindex ESC s n @noindent @kbd{ESC s e} @display Display the panel entries sorted by their extensions (@samp{panel-sort-by-extension}). @end display @cindex Sorted by extension @cindex Sorting by extension @findex panel-sort-by-extension @kindex ESC s e @noindent @kbd{ESC s s} @display Display the panel entries sorted by their sizes (@samp{panel-sort-by-size}). @end display @cindex Sorted by size @cindex Sorting by size @findex panel-sort-by-size @kindex ESC s s @noindent @kbd{ESC s d} @display Display the panel entries sorted by their @samp{last modified} stamps (@samp{panel-sort-by-date}). @end display @cindex Sorted by date @cindex Sorting by date @findex panel-sort-by-date @kindex ESC s d @noindent @kbd{ESC s m} @display Display the panel entries sorted by their modes (@samp{panel-sort-by-mode}). @end display @cindex Sorted by mode @cindex Sorting by mode @findex panel-sort-by-mode @kindex ESC s m @noindent @kbd{ESC s o i} @display Display the panel entries sorted by their owner ids (@samp{panel-sort-by-owner-id}). @end display @cindex Sorted by owner id @cindex Sorting by owner id @findex panel-sort-by-owner-id @kindex ESC s o i @noindent @kbd{ESC s g i} @display Display the panel entries sorted by their group ids (@samp{panel-sort-by-group-id}). @end display @cindex Sorted by group id @cindex Sorting by group id @findex panel-sort-by-group-id @kindex ESC s g i @noindent @kbd{ESC s o n} @display Display the panel entries sorted by their owner names (@samp{panel-sort-by-owner-name}). @end display @cindex Sorted by owner name @cindex Sorting by owner name @findex panel-sort-by-owner-name @kindex ESC s o n @noindent @kbd{ESC s g n} @display Display the panel entries sorted by their group names (@samp{panel-sort-by-group-name}). @end display @cindex Sorted by group name @cindex Sorting by group name @findex panel-sort-by-group-name @kindex ESC s g n There is also another way to change the sort method: @noindent @kbd{ESC s u} @display Switch to the next panel sort method (@samp{panel-sort-next-method}). @end display @cindex Next sort method @findex panel-sort-next-method @kindex ESC s u @node Moving, Selecting, Sorting, gitfm @subsection Moving the cursor in the panel Moving the cursor in the panel is very easy. If your keyboard has arrows, use them. If the arrow keys don't work (it might be due to a badly configured @var{TERM} environment variable), you can use the Emacs commands bindings as well. @noindent @kbd{UP}, @kbd{^P} @display Move the cursor vertically up one entry (@samp{previous-line}). @end display @cindex Cursor up one entry @findex previous-line @kindex UP, ^P @noindent @kbd{DOWN}, @kbd{^N} @display Move the cursor vertically down one entry (@samp{next-line}). @end display @cindex Cursor down one entry @findex next-line @kindex DOWN, ^N @noindent @kbd{HOME}, @kbd{ESC <} @display Move the cursor on the first entry in the panel (@samp{beginning-of-panel}). @end display @cindex Cursor home @cindex First entry @cindex Beginning of panel @findex beginning-of-panel @kindex HOME, ESC < @noindent @kbd{END}, @kbd{ESC >} @display Move the cursor on the last entry in the panel (@samp{end-of-panel}). @end display @cindex Cursor end @cindex Last entry @cindex End of panel @findex end-of-panel @kindex END, ESC > @noindent @kbd{PGUP}, @kbd{ESC v} @display Move the cursor vertically down one page (@samp{scroll-down}). @end display @cindex Cursor down one page @findex scroll-down @kindex PGUP, ESC v @noindent @kbd{PGDOWN}, @kbd{^V} @display Move the cursor vertically down one page (@samp{scroll-up}). @end display @cindex Cursor up one page @findex scroll-up @kindex PGDOWN, ^V @noindent @kbd{ESC g} @display Scroll the panel entries to the left (@samp{horizontal-scroll-left}). @end display @cindex Scroll left @findex horizontal-scroll-left @kindex ESC g @noindent @kbd{ESC j} @display Scroll the panel entries to the right (@samp{horizontal-scroll-right}). @end display @cindex Scroll right @findex horizontal-scroll-right @kindex ESC j @noindent @kbd{^X P} @display In order to optimize the screen output, you can modify the scroll step (@samp{set-scroll-step}). This is the number of lines to try scrolling a panel when the cursor moves out. The @samp{StartupScrollStep} specifies the initial scroll step, but using @samp{set-scroll-step} you can dynamically change it. @end display @cindex Scroll step @findex set-scroll-step @noindent @kbd{TAB}, @kbd{^I}, @kbd{^X o} @display Move the cursor in the other panel (@samp{other-panel}). @end display @cindex Cursor to the other panel @cindex Go to the other panel @findex other-panel @kindex TAB, ^I, ^X o @noindent @kbd{^X P} @display Switch the two panels. This command works even when @code{gitfm} is not in the @samp{two panels} mode (@samp{switch-panels}). @end display @cindex Toggle panels @cindex Switch panels @findex switch-panels @kindex ^X P @node Selecting, Isearch, Moving, gitfm @subsection Selecting files @noindent @kbd{INS}, @kbd{^T}, @kbd{^X \}, @kbd{^\} @display Toggle the @samp{selected} flag of the current entry (@samp{select-entry}). @end display @cindex Toggle flag @cindex Mark entry @cindex Unmark entry @cindex Select entry @findex select-entry @kindex INS, ^T, ^X \, ^\ @noindent @kbd{^C s} @display Select (marks) all the files matching at least one pattern from a space separated list of shell patterns. Spaces and \s are allowed in the patterns but they have to be escaped with a \. The user will be prompted for a pattern to match against (@samp{select-files-matching-pattern}). @end display @cindex Selects files matching pattern @findex select-files-matching-pattern @kindex ^C s @noindent @kbd{^C u} @display Unselect (unmarks) all the files matching at least one pattern from a space separated list of shell patterns. Spaces and \s are allowed in the patterns but they have to be escaped with a \. The user will be prompted for a pattern to match against (@samp{unselect-files-matching-pattern}). @end display @cindex Unselects files matching pattern @findex unselect-files-matching-pattern @kindex ^C u @noindent @kbd{ESC +} @display Select (marks) all the files having the same extension as the current file. If the current file name doesn't have an extension or starts with a dot, no files are selected (@samp{select-extension}). @end display @cindex Selects files matching extension @findex select-extension @kindex ESC + @noindent @kbd{ESC -} @display Unselect (unmarks) all the files having the same extension as the current file. If the current file name doesn't have an extension or starts with a dot, no files are unselected (@samp{unselect-extension}). @end display @cindex Unselects files matching extension @findex unselect-extension @kindex ESC - @xref{Selecting Files}, for additional ways of selecting and unselecting files. @node Isearch, Input Line, Selecting, gitfm @subsection Incremental searching files in a panel Users sometime need to search a file in a panel, especially when the panel contains a big number of entries. For that reason @code{gitfm} provides an incremental search feature. Using forward and backward incremental search, files can be very easy located. Wrapped incremental search is also provided. @cindex Wrapped isearch @cindex Wrapped search @cindex Wrapped incremental search @noindent @kbd{^S}, @kbd{^Xs} @display Incremental search forward a file name in the current panel (@samp{isearch-forward}). Pressing @kbd{^S} or @kbd{^Xs} again will force @code{gitfm} to go to the next entry that matches the current isearched string. When the end of the panel is reached, the isearch is restarted from its beginning. @end display @cindex Incremental search forward @cindex Isearch forward @findex isearch-forward @kindex ^S, ^Xs @noindent @kbd{^R}, @kbd{^Xr} @display Incremental search backward a file name in the current panel (@samp{isearch-backward}). Pressing @kbd{^R} or @kbd{^Xr} again will force @code{gitfm} to go to the next entry that matches the current isearched string. When the beginning of the panel is reached, the isearch is restarted from its end. @end display @cindex Incremental search backward @cindex Isearch backward @findex isearch-backward @kindex ^R, ^Xr @node Input Line, Files, Isearch, gitfm @subsection Using the input line The input line is one of the main methods used by @code{gitfm} to interact with the user. All the answers the user should give in order to perform some operation and all the shell like commands are built using it. So here is a description of all the basic editing operations that the @samp{input line} provides. They are very much inspired from @code{Emacs}, so @code{Emacs} users should have no problem using them. @menu * Inserting Text:: Inserting text by simply typing it. * Moving Point:: How to move the cursor to the place where you want to change something. * Erasing:: Deleting and killing text. * Case Changes:: Case conversion of words. * History:: Reusing recent input line arguments. * Setting Mark:: Commands to set the mark. * Yanking:: Reinserting recently killed text. * Selecting Files:: Selecting files matching patterns. @end menu @node Inserting Text, Moving Point, , Input Line @subsubsection Inserting Text Typing characters is the most usual way of inserting text into the input line. Key sequences starting with printable ascii characters are not allowed in @code{gitfm} so typing @kbd{a} for example results in inserting @kbd{a} at the current point position. Of course, there are some other ways of inserting text into the command line and here there is a description of most of them. @noindent @kbd{ESC RET} @display Copy the current entry name into the input line at the current point position (@samp{entry-to-input-line}). @end display @cindex Copy entry name to input line. @findex entry-to-input-line @kindex ESC RET @noindent @kbd{ESC ESC RET} @display Copy the other panel path into the input line at the current point position (@samp{other-path-to-input-line}). @end display @cindex Other panel path to input line @findex other-path-to-input-line @kindex ESC ESC RET @noindent @kbd{^X ^I} @display Copy the names of all the selected entries into the input line at the current point position (@samp{selected-entries-to-input-line}). @end display @cindex Selected entries to input line @findex selected-entries-to-input-line @kindex ^X ^I @node Moving Point, Erasing, Inserting Text, Input Line @subsubsection Moving Point @noindent @kbd{^B}, @kbd{LEFT} @display Move the point backward one character (@samp{backward-char}). @end display @cindex Cursor backward @cindex Backward char @findex backward-char @kindex ^B, LEFT @noindent @kbd{^F}, @kbd{RIGHT} @display Move the point forward one character (@samp{forward-char}). @end display @cindex Cursor forward @cindex Forward char @findex forward-char @kindex ^F, RIGHT @noindent @kbd{ESC b} @display Move the point one word backward (@samp{backward-word}). @end display @cindex Cursor backward one word @cindex Backward word @findex backward-word @kindex ESC b @noindent @kbd{ESC f} @display Move the point one word forward (@samp{forward-word}). @end display @cindex Cursor forward one word @cindex Forward word @findex forward-word @kindex ESC f @noindent @kbd{^A} @display Move the cursor at the beginning of the input line (@samp{beginning-of-line}). @end display @cindex Cursor to BOL @cindex Beginning of line @findex beginning-of-line @kindex ^A @noindent @kbd{^E} @display Move the cursor at the end of the input line (@samp{end-of-line}). @end display @cindex Cursor to EOL @cindex End of line @findex end-of-line @kindex ^E @node Erasing, Case Changes, Moving Point, Input Line @subsubsection Deleting and killing text @noindent @kbd{DEL}, @kbd{^D} @display Delete the character under the cursor (@samp{delete-char}). @end display @cindex Delete char @findex delete-char @kindex DEL, ^D @noindent @kbd{^H}, @kbd{BKSPC} @display Delete the character before the cursor (@samp{backward-delete-char}). @end display @cindex Backward delete char @findex backward-delete-char @kindex ^H, BKSPC @noindent @kbd{ESC BKSPC} @display Delete backward one word (@samp{backward-kill-word}). @end display @cindex Delete word backward @cindex Backward kill word @findex backward-kill-word @kindex ESC BKSPC @noindent @kbd{ESC d} @display Delete forward one word (@samp{kill-word}). @end display @cindex Delete word forward @cindex kill word @findex kill-word @kindex ESC d @noindent @kbd{ESC k} @display Delete the entire line (@samp{kill-line}). @end display @cindex Delete line @cindex Kill line @findex kill-line @kindex ESC k @noindent @kbd{^U} @display Delete all the characters between the beginning of the input line and the point (@samp{kill-to-beginning-of-line}). @end display @cindex Kill to beginning of line @findex kill-to-beginning-of-line @kindex ^U @noindent @kbd{^K} @display Delete all the characters between the point and the end of the input line (@samp{kill-to-end-of-line}). @end display @cindex Kill to end of line @findex kill-to-end-of-line @kindex ^K @noindent @kbd{ESC SPC} @display Delete all the spaces around the point, leaving only one space (@samp{just-one-space}). @end display @cindex Just one space @findex just-one-space @kindex ESC SPC @noindent @kbd{ESC \} @display Delete all the spaces around the point (@samp{delete-horizontal-space}). @end display @cindex Delete spaces @cindex Delete horizontal space @findex delete-horizontal-space @kindex ESC \ @noindent @kbd{^W} @display Save the region between the point and the mark into the kill "ring" and then kills it (@samp{kill-region}). Note that there is no real kill-ring here. The so-called kill-ring has only one entry. @end display @cindex Save and delete region @cindex Kill region @findex kill-region @kindex ^W @noindent @kbd{ESC w} @display Save the region between the point and the mark without killing it (@samp{kill-ring-save}). @end display @cindex Save into the kill ring @cindex Kill ring save @findex kill-ring-save @kindex ESC w @node Case Changes, History, Erasing, Input Line @subsubsection Case conversion of words. @noindent @kbd{ESC l} @display Convert the following word to lower case, moving over. (@samp{downcase-word}). @end display @cindex Convert to lower case @cindex Downcase word @findex downcase-word @kindex ESC l @noindent @kbd{ESC u} @display Convert the following word to upper case, moving over. (@samp{upcase-word}). @end display @cindex Convert to upper case @cindex Upcase word @findex upcase-word @kindex ESC u @noindent @kbd{ESC c} @display Capitalize the following word, moving over. (@samp{capitalize-word}). @end display @cindex Capitalize word @cindex Capitalize word @findex capitalize-word @kindex ESC c @node History, Setting Mark, Case Changes, Input Line @subsubsection Reusing recent input line arguments A separate history is kept for both built-in and user-defined commands. If you call a command that you have used before, you can re-edit a previously entered string in order to minimize the amount of characters needed to be typed for the new one. There is no limit on the number of strings that can be kept in the history. @noindent @kbd{ESC p} @display Walk backward through the history of previously entered strings (@samp{previous-history-element}). @end display @cindex Previous history element @findex previous-history-element @kindex ESC p @noindent @kbd{ESC n} @display Walk forward through the history of previously entered strings (@samp{next-history-element}). @end display @cindex Next history element @findex next-history-element @kindex ESC n @node Setting Mark, Yanking, History, Input Line @subsubsection Commands to set the mark @noindent @kbd{^SPC} @display Set the mark at the current point position (@samp{set-mark}). @end display @cindex Set the mark @cindex Set mark @findex set-mark @kindex ^SPC @noindent @kbd{^X ^X} @display Exchange the current point position with the mark one (@samp{exchange-point-and-mark}). @end display @cindex Exchange point and mark @findex exchange-point-and-mark @kindex ^X ^X @node Yanking, Selecting Files, Setting Mark, Input Line @subsubsection Reinserting recently killed text @noindent @kbd{^Y} @display Reinsert a previously killed text at the current point position (@samp{yank}). @end display @cindex Yanking, reinserting @findex yank @kindex ^Y @node Selecting Files, , Yanking, Input Line @subsubsection Selecting files matching patterns If the very first character in the input line is a `+', what comes after it is considered a (space separated) list of shell patterns, and all the files that match at least one pattern from that list will be marked as selected. An empty list of shell patterns (i.e. the `+' by itself) will cause all the files to be selected. If the very first character in the input line is a `-', the space separated list of shell patterns that follows is used to unselect files. An empty list of shell patterns (i.e. the `-' by itself) will cause all the selected files to be unselected. Finally, if the first and only character in the input line is a `*', then all the selected files will become unselected, and all the unselected files will become selected. @node Files, Directories, Input Line, gitfm @subsection File operations @menu * Copying Files:: How to copy files. * Moving Files:: How to move files. * Creating Files:: How to create new files. * Deleting Files:: How to delete files. * Linking Files:: How to create hard and symbolic links. * Renaming Files:: How to rename files. * Splitting Files:: How to split files into smaller parts. * Packing Files:: How to pack files in the min. number of bins. * Inode:: How to change a file's mode, owner, group. * Editing Files:: How to edit and create files. Default editor. * Viewing Files:: How to view files. Default viewer. * Compressing Files:: How to compress and decompress files. * Encoding Files:: How to uuencode/uudecode, mpack/munpack a file. * Encrypting Files:: How to encrypt/decrypt files with pgp. * Comparing Files:: How to compare two files. * Spell Checking Files:: How to spell check a file. * Printing Files:: How to print files. * Wiping Files:: How to wipe a file. * Searching Files:: How to search a file. * Archive Files:: How to manage tar based archive files. * DEB Packages:: How to work with DEB packages. * RPM Packages:: How to install and uninstall RPM packages. * File Types:: How to figure out the file type. * MSDOS Files:: How to access msdos floppies. * Actions:: A different action for each file type. @end menu @node Copying Files, Moving Files, , Files @subsubsection Copying Files @noindent @kbd{F5}, @kbd{ESC 5}, @kbd{^C C} @display Copy the currently selected entries to the user supplied path (@samp{copy}). @end display @cindex File copy @cindex Copying files @findex copy @kindex F5, ESC 5, ^C C @noindent @kbd{^C b C} @display Copy the currently selected entries to the user supplied path. The operation is performed in background (@samp{B-COPY}). @end display @cindex Copying files in background @cindex Background file copy @findex B-COPY @kindex ^C b C @node Moving Files, Creating Files, Copying Files, Files @subsubsection Moving Files @noindent @kbd{F6}, @kbd{ESC 6}, @kbd{^C T} @display Move the currently selected entries to the user supplied path (@samp{move}). @end display @cindex File move @cindex Moving files @findex move @kindex F6, ESC 6, ^C T @noindent @kbd{^C b T} @display Move the currently selected entries to the user supplied path. The operation is performed in background (@samp{B-MOVE}). @end display @cindex Moving files in background @cindex Background file move @findex B-MOVE @kindex ^C b T @node Creating Files, Deleting Files, Moving Files, Files @subsubsection Creating Files The easiest way to create a new file is to start an editor passing the file name as an argument. Most editors will try to create the file if the file doesn't exist. @xref{Editing Files}, for more information. @node Deleting Files, Linking Files, Creating Files, Files @subsubsection Deleting Files @noindent @kbd{F8}, @kbd{ESC 8}, @kbd{^C D} @display Delete the currently selected entries (@samp{delete}). @end display @cindex Deleting files @cindex File delete @findex delete @kindex F8, ESC 8, ^C D @noindent @kbd{^C b D} @display Delete the currently selected entries. The operation is performed in background (@samp{B-DELETE}). @end display @cindex Deleting files in background @cindex Background file delete @findex B-DELETE @kindex ^C b D @node Linking Files, Renaming Files, Deleting Files, Files @subsubsection Linking Files @noindent @kbd{^C H} @display Create a hard link from the current files to a user supplied file name (@samp{LINK}). @end display @cindex Hard links to files @findex LINK @kindex ^C H @noindent @kbd{^C b H} @display Create a hard link from the current files to a user supplied file name (@samp{B-LINK}). The action is performed in background. @end display @cindex Linking files in background @findex B-LINK @kindex ^C b H @noindent @kbd{^C S} @display Create a symbolic link from the current files to a user supplied file name (@samp{SYMLINK}). @end display @cindex Symbolic links to files @findex SYMLINK @kindex ^C S @noindent @kbd{^C b S} @display Create a symbolic link from the current files to a user supplied file name (@samp{B-SYMLINK}). The action is performed in background. @end display @findex B-SYMLINK @kindex ^C b S @node Renaming Files, Splitting Files, Linking Files, Files @subsubsection Renaming Files @noindent @kbd{^C R} @display Rename the current file or directory with the user supplied name (@samp{RENAME}). @end display @cindex Renaming files @cindex File rename @findex RENAME @kindex ^C R @noindent @kbd{^C b R} @display Rename the current file or directory with the user supplied name. The operation is performed in background (@samp{B-RENAME}). @end display @cindex Renaming files in background @cindex Background file rename @findex B-RENAME @kindex ^C b R @noindent @kbd{^C n d} @display Change the name of all the selected entries to lowercase. (@samp{name-downcase}). @end display @cindex Downcase file names @findex name-downcase @kindex ^C n d @noindent @kbd{^C n u} @display Change the name of all the selected entries to uppercase. (@samp{name-upcase}). @end display @cindex Upcase file names @findex name-upcase @kindex ^C n u @node Splitting Files, Packing Files, Renaming Files, Files @subsubsection Splitting files into smaller parts @noindent @kbd{^C /} @display Split the current file into several smaller files of a given size and named based on a given prefix (@samp{SPLIT}). @end display @cindex Splitting files @cindex File split @findex SPLIT @kindex ^C / @noindent @kbd{^C b /} @display Split the current file into several smaller files of a given size and named based on a given prefix. The operation is performed in background (@samp{B-SPLIT}). @end display @cindex Splitting files in background @cindex Background file split @findex B-SPLIT @kindex ^C b / @node Packing Files, Inode, Splitting Files, Files @subsubsection Packing files into the minimum number of bins @noindent @kbd{^C ~} @display Pack the files into the smallest number of bins. This is an approximation - the problem is NP-complete and no known algorithm can guarantee a solution better than @samp{(11/9) * OPTIMAL + 4}. To make things even worse, for large files, there is no portable way to predict how many blocks the file system implementation will require for indirect blocks, directories, etc. So keep in mind that this is only an approximation. Bin packing can be useful when you want to put a bunch of files on floppies or zip disks and you want to optimize things a little bit (@samp{bin-packing}). @samp{gitfm} assumes that you want to pack all the files in the current directory - if there is any selected file in that directory it will be unselected first. Then @samp{gitfm} will ask for a bin size, and select the files that should go in the first bin. You are supposed to place those files in the first bin (e.g. a tar archive), remove them from the current directory, then run @samp{bin-packing} again, to obtain the list of the files that should go into the second bin, etc. @end display @cindex Pack files into bins @findex bin-packing @kindex ^C ~ @node Inode, Editing Files, Packing Files, Files @subsubsection Changing a file's mode, owner and group @noindent @kbd{^C M} @display Change the mode of the currently selected entries (@samp{CHMOD}). @end display @cindex chmod @cindex Changing the file's mode @cindex Changing the inode's mode @findex CHMOD @kindex ^C M @noindent @kbd{^C b M} @display Change the mode of the currently selected entries. The operation is performed in background (@samp{B-CHMOD}). @end display @cindex Changing the mode in background @findex B-CHMOD @kindex ^C b M @noindent @kbd{^C r M} @display Recursively change the modes of the selected entries if one of them is a directory (@samp{R-CHMOD}). @end display @cindex Changing the mode recursively @findex R-CHMOD @kindex ^C r M @noindent @kbd{^C b r M} @display Recursively change the modes of the selected entries if one of them is a directory. The operation is performed in background (@samp{B-R-CHMOD}). @end display @cindex Changing the mode recursively in background @findex B-R-CHMOD @kindex ^C b r M @noindent @kbd{^C O} @display Change the owner of the currently selected entries (@samp{CHOWN}). @end display @cindex chown @cindex Changing the file's owner @cindex Changing the inode's owner @findex CHOWN @kindex ^C O @noindent @kbd{^C b O} @display Change the owner of the currently selected entries. The operation is performed in background (@samp{B-CHOWN}). @end display @cindex Changing the owner in background @findex B-CHOWN @kindex ^C b O @noindent @kbd{^C r O} @display Recursively change the owners of the selected entries if one of them is a directory (@samp{R-CHOWN}). @end display @cindex Changing the owner recursively @findex R-CHOWN @kindex ^C r O @noindent @kbd{^C b r O} @display Recursively change the owners of the selected entries if one of them is a directory. The operation is performed in background (@samp{B-R-CHOWN}). @end display @cindex Changing the owner recursively in background @findex B-R-CHOWN @kindex ^C b r O @noindent @kbd{^C G} @display Change the group of the currently selected entries (@samp{CHGRP}). @end display @cindex chgrp @cindex Changing the file's group @cindex Changing the inode's group @findex CHGRP @kindex ^C G @noindent @kbd{^C b G} @display Change the group of the currently selected entries. The operation is performed in background (@samp{B-CHGRP}). @end display @cindex Changing the group in background @findex B-CHGRP @kindex ^C b G @noindent @kbd{^C r G} @display Recursively change the groups of the selected entries if one of them is a directory (@samp{R-CHGRP}). @end display @cindex Changing the group recursively @findex R-CHGRP @kindex ^C r G @noindent @kbd{^C b r G} @display Recursively change the groups of the selected entries if one of them is a directory. The operation is performed in background (@samp{B-R-CHGRP}). @end display @cindex Changing the group recursively in background @findex B-R-CHGRP @kindex ^C b r G @node Editing Files, Viewing Files, Inode, Files @subsubsection Editing Files @noindent @kbd{F4}, @kbd{ESC 4} @display Call the default editor with the current file name as an argument (@samp{EDIT}). @end display @cindex File edit @cindex Editing a file @findex EDIT @kindex F4, ESC 4 @noindent @kbd{^X e} @display Call the default editor with the selected entry names as arguments (@samp{MULTIPLE-EDIT}). @end display @cindex Editing multiple files @cindex Multiple edit @findex MULTIPLE-EDIT @kindex ^X e @noindent @kbd{^X ^F} @display Create a new file by calling the default editor with the user supplied file name as an argument (@samp{FILE-CREATE}). @end display @cindex File create @cindex Create file @findex FILE-CREATE @kindex ^X ^F @noindent @kbd{^X 4 a} @display Call the default editor in order to edit the @file{ChangeLog} file (@samp{CHANGE-LOG}). @end display @cindex Editing the ChangeLog @findex CHANGE-LOG @kindex ^X 4 a The default editor can be specified using the @var{EDITOR} or @var{GNUIT_EDITOR} environment variables. @xref{Environment Variables}, for more information. @var{$GNUIT_EDITOR} used to be called @var{$GIT_EDITOR}. The old name is still accepted for backwards-compatibility. @node Viewing Files, Compressing Files, Editing Files, Files @subsubsection Viewing Files @noindent @kbd{F3}, @kbd{ESC 3} @display Call the default viewer (@code{gitview}) with the current file name as argument (@samp{VIEW}). @end display @cindex Viewing files @cindex File view @findex VIEW @kindex F3, ESC 3 @noindent @kbd{^X v} @display Call the default pager (@code{more}) with the currently selected entry names as arguments (@samp{MULTIPLE-VIEW}). @end display @cindex Viewing multiple files @findex MULTIPLE-VIEW @kindex ^X v @node Compressing Files, Encoding Files, Viewing Files, Files @subsubsection Compressing Files @noindent @kbd{^C z} @display Compress the currently selected entries with @code{gzip} (@samp{COMPRESS}). @end display @cindex Compressing files @cindex Compressing directories @cindex gzip @cindex compress @findex COMPRESS @kindex ^C z @noindent @kbd{^C b z} @display Compress the currently selected entries with @code{gzip}. The operation is performed in background (@samp{B-COMPRESS}). @end display @cindex Compressing files in background @cindex Compressing directories in background @findex B-COMPRESS @kindex ^C b z @noindent @kbd{^C Z} @display Uncompress the currently selected entries with @code{gunzip} (@samp{UNCOMPRESS}). @end display @cindex Uncompressing files @cindex Uncompressing directories @cindex Decompressing files @cindex Decompressing directories @cindex gunzip @findex UNCOMPRESS @kindex ^C Z @noindent @kbd{^C b Z} @display Uncompress the currently selected entries with @code{gunzip}. The operation is performed in background (@samp{B-UNCOMPRESS}). @end display @cindex Uncompressing files in background @cindex Uncompressing directories in background @cindex Decompressing files in background @cindex Decompressing directories in background @findex B-UNCOMPRESS @kindex ^C b Z @noindent @kbd{^C f Z} @display Uncompress the currently selected entries with @code{gunzip} (@samp{F-UNCOMPRESS}). Force uncompression of links. @end display @cindex Uncompressing files/links @cindex Uncompressing directories/links @cindex Decompressing files/links @cindex Decompressing directories/links @cindex gunzip @findex F-UNCOMPRESS @kindex ^C f Z @noindent @kbd{^C b f Z} @display Uncompress the currently selected entries with @code{gunzip}. Force uncompression of links. The operation is performed in background (@samp{BF-UNCOMPRESS}). @end display @cindex Uncompressing files/links in background @cindex Uncompressing directories/links in background @cindex Decompressing files/links in background @cindex Decompressing directories/links in background @findex BF-UNCOMPRESS @kindex ^C b f Z @noindent @kbd{^C .} @display Compress the currently selected entries with @code{bzip2} (@samp{BZIP2-COMPRESS}). @end display @cindex Compressing files @cindex Compressing directories @cindex bzip2 @cindex compress @findex BZIP2-COMPRESS @kindex ^C . @noindent @kbd{^C b .} @display Compress the currently selected entries with @code{bzip2}. The operation is performed in background (@samp{B-BZIP2-COMPRESS}). @end display @cindex Compressing files in background @cindex Compressing directories in background @findex B-BZIP2-COMPRESS @kindex ^C b . @noindent @kbd{^C o} @display Uncompress the currently selected entries with @code{bunzip2} (@samp{BZIP2-UNCOMPRESS}). @end display @cindex Uncompressing files @cindex Uncompressing directories @cindex Decompressing files @cindex Decompressing directories @cindex gunzip @findex BZIP2-UNCOMPRESS @kindex ^C o @noindent @kbd{^C b o} @display Uncompress the currently selected entries with @code{bunzip2}. The operation is performed in background (@samp{B-BZIP2-UNCOMPRESS}). @end display @cindex Uncompressing files in background @cindex Uncompressing directories in background @cindex Decompressing files in background @cindex Decompressing directories in background @findex B-BZIP2-UNCOMPRESS @kindex ^C b o @node Encoding Files, Encrypting Files, Compressing Files, Files @subsubsection Encoding Files @noindent @kbd{^C e} @display Encode the currently selected file (@samp{UUENCODE}). @end display @cindex Encoding files @cindex uuencode @findex UUENCODE @kindex ^C e @noindent @kbd{^C b e} @display Encode the currently selected file. The operation is performed in background (@samp{B-UUENCODE}). @end display @cindex Encoding files in background @findex B-UUENCODE @kindex ^C b e @noindent @kbd{^C E} @display Decode the currently selected file (@samp{UUDECODE}). @end display @cindex uudecode @cindex Decoding files @findex UUDECODE @kindex ^C E @noindent @kbd{^C b E} @display Decode the currently selected file. The operation is performed in background (@samp{B-UUDECODE}). @end display @cindex Decoding files in background @findex B-UUDECODE @kindex ^C b E @noindent @kbd{^C k} @display Encode the currently selected file using mpack (@samp{MIME-PACK}). @end display @cindex Encoding files @cindex mpack @findex MPACK @kindex ^C k @noindent @kbd{^C b k} @display Encode the currently selected file using mpack. The operation is performed in background (@samp{B-MIME-PACK}). @end display @cindex Encoding files in background @findex B-MIME-PACK @kindex ^C b k @noindent @kbd{^C K} @display Decode the currently selected file using munpack (@samp{MIME-UNPACK}). @end display @cindex munpack @cindex Decoding files @findex MUNPACK @kindex ^C K @noindent @kbd{^C b K} @display Decode the currently selected file using munpack. The operation is performed in background (@samp{B-MIME-UNPACK}). @end display @cindex Decoding files in background @findex B-MIME-UNPACK @kindex ^C b K @node Encrypting Files, Comparing Files, Encoding Files, Files @subsubsection Encrypting Files @noindent @kbd{^C p} @display Encrypt (using @code{pgp}) the current file (@samp{ENCRYPT}). @end display @cindex Encrypting the current file @findex ENCRYPT @kindex ^C p @noindent @kbd{^C P} @display Decrypt (using @code{pgp}) the current file (@samp{DECRYPT}). @end display @cindex Decrypting the current file @findex DECRYPT @kindex ^C P @node Comparing Files, Spell Checking Files, Encrypting Files, Files @subsubsection Comparing Files @noindent @kbd{^C =} @display Compare (using @code{diff}) the current ASCII file with the other panel's current file (@samp{DIFF}). If both entries are directories, a recursive diff is performed. @end display @cindex diff @cindex Differences between ascii files @findex DIFF @kindex ^C = @noindent @kbd{^C ESC =} @display Compare (using @code{diff}) the current ASCII file with its latest backup. The latest backup is the file having the same name and a '~' at the end (@samp{LAST-BACKUP-DIFF}). @end display @cindex Last backup diff @cindex Differences between file and backup @findex LAST-BACKUP-DIFF @kindex ^C ESC = @noindent @kbd{^C B} @display Compare the current file with the other panel current file. A binary comparison is performed (@samp{compare}). @end display @cindex Binary comparison @findex compare @kindex ^C B @node Spell Checking Files, Printing Files, Comparing Files, Files @subsubsection Spell Checking Files @noindent @kbd{^X I} @display Run the @code{ispell} command with the current file name as an argument. @end display @cindex Spell checking @cindex ispell @findex ISPELL @kindex ^X I @node Printing Files, Wiping Files, Spell Checking Files, Files @subsubsection Printing Files @noindent @kbd{^C j} @display Print the selected files via @code{lpr} to the user specified printer or to the default one if no @code{lpr} options are given (@samp{PRINT-JOB}). @end display @cindex Printing files @cindex lpr @cindex printing @findex PRINT-JOB @kindex ^C j @noindent @kbd{^C J} @display Print the list of active printing jobs via @code{lpq}. The default printer is queried if no @code{lpq} options are given (@samp{PRINT-JOB-LIST}). @end display @cindex Printing files @cindex lpr @cindex printing @findex PRINT-JOB-LIST @kindex ^C J @node Wiping Files, Searching Files, Printing Files, Files @subsubsection Wiping Files @noindent @kbd{^C W} @display Call @code{gitwipe} to wipe the selected files. Asks for confirmation before actually wiping them in order to avoid errors (@samp{WIPE}). @end display @xref{gitwipe}, for more information. @cindex Wiping files @cindex File wipe @findex WIPE @kindex ^C W @node Searching Files, Archive Files, Wiping Files, Files @subsubsection Searching Files @noindent @kbd{ESC %} @display Search files on the file system, starting from the current directory (@samp{FIND}). @end display @cindex find @cindex File search @cindex Searching files @findex FIND @kindex ESC % @noindent @kbd{ESC &} @display Use 'locate' to search files on the file system, starting from the current directory (@samp{LOCATE}). @end display @cindex locate @cindex Locating files @cindex File search @cindex Searching files @findex LOCATE @kindex ESC & @noindent @kbd{^X w} @display Locate the binary, source, and manual page files for a command (@samp{WHEREIS}). @end display @cindex Program search @cindex whereis @findex WHEREIS @kindex ^X w @noindent @kbd{^X W} @display Locate a command; display its pathname or alias (@samp{WHICH}). @end display @cindex Searching programs @cindex Searching binaries @cindex which @findex WHICH @kindex ^X W @node Archive Files, DEB Packages, Searching Files, Files @subsubsection Managing tar based archive files @noindent @kbd{^C a} @display Create a @code{tar} archive containing all the currently selected entries (@samp{TAR}). @end display @cindex Tar archive @cindex Archive @cindex Creating tar archives @findex TAR @kindex ^C a @noindent @kbd{^C b a} @display Create a @code{tar} archive containing all the currently selected entries. The operation is performed in background (@samp{B-TAR}). @end display @cindex Creating tar archives in background @findex B-TAR @kindex ^C b a @noindent @kbd{^C x} @display Create a compressed @code{tar} archive containing the current entry, provided it is a directory (@samp{TAR-COMPRESS}). @end display @cindex Creating compressed tar archives @findex TAR-COMPRESS @kindex ^C x @noindent @kbd{^C b x} @display Create a compressed @code{tar} archive containing the current entry, provided it is directory. The operation is performed in background (@samp{B-TAR-COMPRESS}). @end display @cindex Creating compressed tar archives in background @findex B-TAR-COMPRESS @kindex ^C b x @noindent @kbd{^C -} @display Create a bzip2 compressed @code{tar} archive containing the current entry, provided it is a directory (@samp{TAR-BZIP2}). @end display @cindex Creating bzip2 compressed tar archives @findex TAR-BZIP2 @kindex ^C - @noindent @kbd{^C b -} @display Create a bzip2 compressed @code{tar} archive containing the current entry, provided it is a directory. The operation is performed in background (@samp{B-TAR-BZIP2}). @end display @cindex Creating bzip2 compressed tar archives in background @findex B-TAR-BZIP2 @kindex ^C b - @noindent @kbd{^C X} @display Expand the selected archives into the current directory. The utility used is selected based on the extension of the file (@samp{GENERIC-UNPACK}). @end display @cindex Extracting files from archives @findex GENERIC-UNPACK @kindex ^C X @noindent @kbd{^C b X} @display Expand the selected archives into the current directory. The utility used is based on the extension of the file. The operation is performed in background (@samp{B-GENERIC-UNPACK}). @end display @findex B-GENERIC-UNPACK @kindex ^C b X @noindent @kbd{^C V} @display Expand the selected archives into an user supplied current directory. The utility used is selected based on the extension of the file (@samp{GENERIC-UNPACK-INTO}). @end display @cindex Extracting files from archives @findex GENERIC-UNPACK-INTO @kindex ^C V @noindent @kbd{^C b V} @display Expand the selected archives into an user supplied directory. The utility used is based on the extension of the file. The operation is performed in background (@samp{B-GENERIC-UNPACK-INTO}). @end display @findex B-GENERIC-UNPACK-INTO @kindex ^C b V @node DEB Packages, RPM Packages, Archive Files, Files @subsubsection Working with DPKG @code{dpkg} provides commands for manipulating and querying the dpkg database, @code{gitfm}'s DPKG commands allow quick access to most of those which operate on binary packages, files, or require package names as arguments. All commands expecting package names can also be given binary packages, the package names will be automatically extracted. Most commands use their single character @code{dpkg} option letter as the key command. @noindent @kbd{^C ^D i} @display Install the @code{deb} file(s) selected or pointed by the cursor (@samp{DPKG-INSTALL}). @end display @findex DPKG-INSTALL @kindex ^C ^D i @noindent @kbd{^C ^D R i} @display Recursively install the @code{deb} file(s) in the directories selected or pointed by the cursor (@samp{R-DPKG-INSTALL}). @end display @findex R-DPKG-INSTALL @kindex ^C ^D R i @noindent @kbd{^C ^D u} @display Unpack the @code{deb} file(s) selected or pointed by the cursor, but don't configure it (@samp{DPKG-UNPACK}). @end display @findex DPKG-UNPACK @kindex ^C ^D u @noindent @kbd{^C ^D R u} @display Recursively unpack the @code{deb} file(s) in the directories selected or pointed by the cursor, but don't configure them (@samp{R-DPKG-UNPACK}). @end display @findex R-DPKG-UNPACK @kindex ^C ^D R u @noindent @kbd{^C ^D C} @display Configure the unpacked package(s) selected or pointed by the cursor (@samp{DPKG-CONFIGURE}). @end display @findex DPKG-CONFIGURE @kindex ^C ^D C @noindent @kbd{^C ^D r} @display Remove the package(s) selected or pointed by the cursor (@samp{DPKG-REMOVE}). @end display @findex DPKG-REMOVE @kindex ^C ^D r @noindent @kbd{^C ^D P} @display Purge the package(s) selected or pointed by the cursor (@samp{DPKG-PURGE}). @end display @findex DPKG-PURGE @kindex ^C ^D P @noindent @kbd{^C ^D A} @display Update dpkg and dselect's idea of which packages are available with information from the @code{deb} file(s) selected or pointed by the cursor (@samp{DPKG-RECORDAVAIL}). @end display @findex DPKG-RECORDAVAIL @kindex ^C ^D A @noindent @kbd{^C ^D R A} @display Recursively update dpkg and dselect's idea of which packages are available with information from the @code{deb} file(s) in the directories selected or pointed by the cursor (@samp{R-DPKG-RECORDAVAIL}). @end display @findex R-DPKG-RECORDAVAIL @kindex ^C ^D R A @noindent @kbd{^C ^D h} @display Display quick help file for GITFM's DPKG commands. (@samp{DPKG-HELP}). @end display @findex DPKG-HELP @kindex ^C ^D h @noindent @kbd{^C ^D c} @display Lists the contents of the filesystem tree archive portion of the @code{deb} file pointed by the cursor (@samp{DPKG-CONTENTS}). @end display @findex DPKG-CONTENTS @kindex ^C ^D c @noindent @kbd{^C ^D f} @display Extracts control file information from a @code{deb} file pointed by the cursor (@samp{DPKG-FIELD}). You are presented with the file name and can either hit ENTER to see all fields, or add control file field names (space separated) to see only those fields. @end display @findex DPKG-FIELD @kindex ^C ^D f @noindent @kbd{^C ^D I} @display Provides information about a @code{deb} file pointed by the cursor (@samp{DPKG-INFO}). @end display @findex DPKG-INFO @kindex ^C ^D I @noindent @kbd{^C ^D l} @display List the package(s) selected or pointed by the cursor (@samp{DPKG-LISTPKGS}). @end display @findex DPKG-LISTPKGS @kindex ^C ^D l @noindent @kbd{^C ^D s} @display Display status details for the package(s) selected or pointed by the cursor (@samp{DPKG-STATUS}). @end display @findex DPKG-STATUS @kindex ^C ^D s @noindent @kbd{^C ^D L} @display List files owned by the package(s) selected or pointed by the cursor (@samp{DPKG-LISTFILES}). @end display @findex DPKG-LISTFILES @kindex ^C ^D L @noindent @kbd{^C ^D S} @display Find package owning file pointed to by the cursor (@samp{DPKG-SEARCH}). @end display @findex DPKG-SEARCH @kindex ^C ^D S @noindent @kbd{^C ^D p} @display Display available version details of package(s) selected or pointed by the cursor (@samp{DPKG-PRINTAVAIL}). @end display @findex DPKG-PRINTAVAIL @kindex ^C ^D p @node RPM Packages, File Types, DEB Packages, Files @subsubsection Installing and Uninstalling RPM packages Red Hat Linux Distributions use a very powerful package manager called @code{rpm}. It is used whenever you need to install/remove/upgrade/etc a software package. The packages used by @code{rpm} use the extension @samp{.rpm}. @code{gitfm} provides default key bindings for some of the basic operations @code{rpm} can perform on packages: install, uninstall, upgrade and query. @noindent @kbd{^C I} @display Install the @code{rpm} package pointed by the cursor (@samp{RPM-INSTALL}). @end display @findex RPM-INSTALL @kindex ^C I @noindent @kbd{^C b I} @display Install the @code{rpm} package pointed by the cursor (@samp{B-RPM-INSTALL}). The operation is performed in background. @end display @findex B-RPM-INSTALL @kindex ^C b I @noindent @kbd{^C i} @display Uninstall the @code{rpm} package pointed by the cursor (@samp{RPM-UNINSTALL}). @end display @findex RPM-UNINSTALL @kindex ^C i @noindent @kbd{^C b i} @display Uninstall the @code{rpm} package pointed by the cursor (@samp{B-RPM-UNINSTALL}). The operation is performed in background. @end display @findex B-RPM-UNINSTALL @kindex ^C b i @noindent @kbd{^C N} @display Upgrade the @code{rpm} package pointed by the cursor (@samp{RPM-UPGRADE}). @end display @findex RPM-UPGRADE @kindex ^C N @noindent @kbd{^C b N} @display Upgrade the @code{rpm} package pointed by the cursor (@samp{B-RPM-UPGRADE}). The operation is performed in background. @end display @findex B-RPM-UPGRADE @kindex ^C b N @noindent @kbd{^C q} @display Query the @code{rpm} package manager (@samp{RPM-QUERY}). The default options used are @samp{-qil}. See the @code{rpm} manual page for more details on using @code{rpm}. @end display @findex RPM-QUERY @kindex ^C q @node File Types, MSDOS Files, RPM Packages, Files @subsubsection File Types @noindent @kbd{^C t} @display Print the type of a file using the @code{file} utility (@samp{FILE-TYPE}). @end display @findex FILE-TYPE @kindex ^C t @node MSDOS Files, Actions, File Types, Files @subsubsection Accessing MSDOS Files @noindent @kbd{^C m d}, @kbd{^C m ^D} @display Change the current @code{MSDOS} directory to a given directory (@samp{MTOOLS-CHDIR}). @end display @findex MTOOLS-CHDIR @kindex ^C m d, ^C m ^D @noindent @kbd{^C m P} @display Put the currently selected files on a @code{MSDOS} floppy (@samp{MTOOLS-PUT}). @end display @findex MTOOLS-PUT @kindex ^C m P @noindent @kbd{^C b m P} @display Put the currently selected files on a @code{MSDOS} floppy (@samp{B-MTOOLS-PUT}). The operation is performed in background. @end display @findex B-MTOOLS-PUT @kindex ^C b m P @noindent @kbd{^C m G} @display Get some files from a @code{MSDOS} floppy and put them in a given directory (@samp{MTOOLS-GET}). @end display @findex MTOOLS-GET @kindex ^C m G @noindent @kbd{^C b m G} @display Get some files from a @code{MSDOS} floppy and put them in a given directory (@samp{B-MTOOLS-GET}). The operation is performed in background. @end display @findex B-MTOOLS-GET @kindex ^C b m G @noindent @kbd{^C m D} @display Delete files from a @code{MSDOS} floppy (@samp{MTOOLS-DELETE}). @end display @findex MTOOLS-DELETE @kindex ^C m D @noindent @kbd{^C b m D} @display Delete files from a @code{MSDOS} floppy (@samp{B-MTOOLS-DELETE}). The operation is performed in background. @end display @findex B-MTOOLS-DELETE @kindex ^C b m D @noindent @kbd{^C m L} @display List files and directories on a @code{MSDOS} floppy (@samp{MTOOLS-DIR}). @end display @findex MTOOLS-DIR @kindex ^C m L @noindent @kbd{^C m F} @display Format a @code{MSDOS} floppy (@samp{MTOOLS-FORMAT}). @end display @findex MTOOLS-FORMAT @kindex ^C m F @noindent @kbd{^C b m F} @display Format a @code{MSDOS} floppy (@samp{B-MTOOLS-FORMAT}). The operation is performed in background. @end display @findex B-MTOOLS-FORMAT @kindex ^C b m F @noindent @kbd{^C m M} @display Create a directory on a @code{MSDOS} floppy (@samp{MTOOLS-MKDIR}). @end display @findex MTOOLS-MKDIR @kindex ^C m M @noindent @kbd{^C b m M} @display Create a directory on a @code{MSDOS} floppy (@samp{B-MTOOLS-MKDIR}). The operation is performed in background. @end display @findex B-MTOOLS-MKDIR @kindex ^C b m M @noindent @kbd{^C m K} @display Remove a directory from a @code{MSDOS} floppy (@samp{MTOOLS-RMDIR}). All the files and subdirectories in that directory are removed as well. @end display @findex MTOOLS-RMDIR @kindex ^C m K @noindent @kbd{^C b m K} @display Remove a directory from a @code{MSDOS} floppy (@samp{B-MTOOLS-RMDIR}). All the files and subdirectories in that directory are removed as well. The operation is performed in background. @end display @findex B-MTOOLS-RMDIR @kindex ^C b m K @noindent @kbd{^C m R} @display Rename a file or directory on a @code{MSDOS} floppy (@samp{MTOOLS-RENAME}). @end display @findex MTOOLS-RENAME @kindex ^C m R @noindent @kbd{^C b m R} @display Rename a file or directory on a @code{MSDOS} floppy (@samp{B-MTOOLS-RENAME}). The operation is performed in background. @end display @findex B-MTOOLS-RENAME @kindex ^C b m R @noindent @kbd{^C m T} @display Display the contents of a file located on a @code{MSDOS} floppy (@samp{MTOOLS-TYPE}). @end display @findex MTOOLS-TYPE @kindex ^C m T @node Actions, , MSDOS Files, Files @subsubsection A different action for each file type Many files on @code{UNIX} systems have one or more extensions specifying their types. For example, a file that ends in @samp{.c} is a file containing a @code{C} program, while a file ending in @samp{.tar.gz} is a @code{tar} archive compressed with the @code{gzip} utility. Having a default action for each file type, binded on the same key, seems to be a good idea because you can use that key to obtain type specific information about a file or to process it in some type specific way much easier. The @code{GNUIT} package contains a script called @code{gitaction} that is used to detect the current file type and perform a type specific action. @xref{gitaction}, for more information. @noindent @kbd{F2}, @kbd{ESC 2}, @kbd{^X a} @display Perform an action on the current file, depending on its type (@samp{FILE-ACTION}). @end display @cindex Type specific file action @cindex File action @findex FILE-ACTION @kindex F2, ESC 2, ^X a @node Directories, Compiling, Files, gitfm @subsection Directory operations @menu * Creating Dirs:: How to create new directories. * Copying Dirs:: How to copy directories. * Deleting Dirs:: How to delete directories. * Moving Dirs:: How to move directories. * Renaming Dirs:: How to rename directories. * Comparing Dirs:: How to compare directories. * Dirs Usage:: Summarize directory usage. * Changing Dirs:: How to go to a new directory. * Dirs History:: How to use the directory history. * Hot Keys:: Hot keys for the most used directories. @end menu @node Creating Dirs, Copying Dirs, , Directories @subsubsection Creating directories @noindent @kbd{F7}, @kbd{ESC 7}, @kbd{^X M} @display Create a new subdirectory in the current directory with the user supplied name (@samp{make-directory}). @end display @cindex Make directory @cindex Create directory @cindex Making a directory @cindex Creating a directory @cindex Make directory @findex make-directory @kindex F7, ESC 7, ^X M @node Copying Dirs, Deleting Dirs, Creating Dirs, Directories @subsubsection Copying directories @noindent @kbd{F5 (for directories)}, @kbd{ESC 5 (for directories)}, @kbd{^C C (for directories)} @display Copy the currently selected entries to the user supplied path (@samp{copy}). @end display @cindex Directory copy @cindex Copying directories @findex copy (for directories) @kindex F5 (for directories) @kindex ESC 5 (for directories) @kindex ^C C (for directories) @noindent @kbd{^C b C (for directories)} @display Copy the currently selected entries to the user supplied path. The operation is performed in background (@samp{B-COPY}). @end display @cindex Copying directories in background @cindex Background directory copy @findex B-COPY (for directories) @kindex ^C b C (for directories) @node Deleting Dirs, Moving Dirs, Copying Dirs, Directories @subsubsection Deleting directories @noindent @kbd{F8 (for subdirectories)}, @kbd{ESC 8 (for directories)}, @kbd{^C D (for subdirectories)} @display Delete the currently selected entries (@samp{delete}). @end display @cindex Deleting directories @cindex Directory delete @findex delete (for directories) @kindex F8 (for directories) @kindex ESC 8 (for directories) @kindex ^C D (for directories) @noindent @kbd{^C b D (for directories)} @display Delete the currently selected entries. The operation is performed in background (@samp{B-DELETE}). @end display @cindex Deleting directories in background @cindex Background directory delete @findex B-DELETE (for directories) @kindex ^C b D (for directories) @node Moving Dirs, Renaming Dirs, Deleting Dirs, Directories @subsubsection Moving directories @noindent @kbd{F6 (for directories)}, @kbd{ESC 6 (for directories)}, @kbd{^C T (for directories)} @display Move the currently selected entries to the user supplied path (@samp{move}). @end display @cindex Directory move @cindex Moving directories @findex move (for directories) @kindex F6 (for directories) @kindex ESC 6 (for directories) @kindex ^C T (for directories) @noindent @kbd{^C b T (for directories)} @display Move the currently selected entries to the user supplied path. The operation is performed in background (@samp{B-MOVE}). @end display @cindex Moving directories in background @cindex Background directory move @findex B-MOVE (for directories) @kindex ^C b T (for directories) @node Renaming Dirs, Comparing Dirs, Moving Dirs, Directories @subsubsection Renaming directories @noindent @kbd{^C R (for directories)} @display Rename the current file or directory with the user supplied name (@samp{RENAME}). @end display @cindex Renaming directories @cindex Directory rename @findex RENAME (for directories) @kindex ^C R (for directories) @noindent @kbd{^C b R (for directories)} @display Rename the current file or directory with the user supplied name. The operation is performed in background (@samp{B-RENAME}). @end display @cindex Renaming directories in background @cindex Background directory rename @findex B-RENAME (for directories) @kindex ^C b R (for directories) @node Comparing Dirs, Dirs Usage, Renaming Dirs, Directories @subsubsection Comparing Directories @noindent @kbd{^C c q} @display Quickly compare the files in the left panel with the files in the right one. Only the file names, sizes and time stamps are considered in the comparison. @end display @cindex Comparing directories quickly @cindex Comparing panels quickly @findex quick-compare-panels @kindex ^C c q @noindent @kbd{^C c t} @display Compare the files in the left panel with the files in the right one. The contents of each file in the current panel will be compared against the contents of its counterpart (if any) from the other panel. @end display @cindex Comparing directories thoroughly @cindex Comparing panels thoroughly @findex thoroughly-compare-panels @kindex ^C c t @noindent @kbd{^C f d} @display Recursively compare (using @code{diff -r -q}) the current directory with the other panel's current directory (@samp{FAST-DIFF}). Print on standard output the names of the files that differ. @end display @cindex Directory diff @cindex Differences between directories @findex FAST-DIFF @kindex ^C f d @noindent @kbd{^C d} @display Compare (using @code{diff}) the current directory with the other panel current directory. For successful operation, both panels should contain the same directory (@samp{DIR-DIFF}). @end display @cindex Directory diff @cindex Differences between two directories @findex DIRR-DIFF @kindex ^C d @noindent @kbd{^C b d} @display Compare (using @code{diff}) the current directory with the other panel current directory. For successful operation, both panels should contain the same directory. The operation is performed in background (@samp{DIR-DIFF}). @end display @cindex Background directory diff @findex B-DIRR-DIFF @kindex ^C b d @node Dirs Usage, Changing Dirs, Comparing Dirs, Directories @subsubsection Summarize directory usage @noindent @kbd{^C U} @display Display the output of the @code{du -s} command on the status line (@samp{DIRECTORY-USAGE}). @end display @cindex Directory usage @cindex du @findex DIRECTORY-USAGE @kindex ^C U @node Changing Dirs, Dirs History, Dirs Usage, Directories @subsubsection Changing directories @noindent @kbd{^X d}, @kbd{^X ^D} @display Change the current working directory. The user is asked for a new directory name and the new directory is added to the directory history (@samp{change-directory}). @end display @xref{Dirs History}, for more information. @cindex chdir @cindex Changing directory @cindex Changing the directory @cindex Changing the current directory @findex change-directory @kindex ^X d, ^X ^D @noindent @kbd{ESC a c} @display Change the current directory of the current panel to the directory of the other panel (@samp{adapt-current-directory}). @end display @cindex Change the current panel directory @cindex Adapt directory @findex adapt-current-directory @kindex ESC a c @noindent @kbd{ESC a o} @display Change the current directory of the other panel to the directory of the current panel (@samp{adapt-other-directory}). @end display @cindex Change the other panel directory @findex Adapt-other-directory @kindex ESC a o @node Dirs History, Hot Keys, Changing Dirs, Directories @subsubsection Directory History Users usually work on a limited set of subdirectories. Providing a fast method of switching between a number of intensively used directories is a good idea and @code{gitfm} has a set of builtin commands for doing it. Usually new directories are added to the directory history when the @samp{change-directory} built-in command is used. @code{gitfm} also adds the current directory to the history list when started, when the directory history is reset and when a command having a non empty @samp{new-dir} field successfully completes its execution. @xref{new-dir}, for more information. @noindent @kbd{^X ^N} @display Go to the next directory in the history (@samp{next-directory}). @end display @cindex Next directory history entry @findex next-directory @kindex ^X N @noindent @kbd{^X ^P} @display Go to the previous directory in the history (@samp{previous-directory}). @end display @cindex Previous directory history entry @findex previous-directory @kindex ^X ^P @noindent @kbd{^X ^R} @display Reset the entire directory history. As explained above, the current directory becomes the only directory in the history (@samp{reset-directory-history}). @end display @cindex Directory history reset @cindex Reset the directory history @findex reset-directory-history @kindex ^X ^R @node Hot Keys, , Dirs History, Directories @subsubsection Hot Keys @code{gitfm} provides default key bindings for switching to a number of important directories as "/", "..", "$HOME", etc. @cindex Hot Keys @noindent @kbd{ESC /} @display Go to the @samp{/} directory (@samp{ROOT-DIR}). @end display @cindex Go to the root directory @cindex Go to / @findex ROOT-DIR @kindex ESC / @noindent @kbd{ESC .} @display Go to the @samp{..} directory (@samp{up-one-dir}). @end display @cindex Go up one directory @cindex Go to .. @cindex Go to the parent directory @findex up-one-dir @kindex ESC . @noindent @kbd{ESC h} @display Go to the @samp{~} ($HOME) directory (@samp{HOME-DIR}). @end display @cindex Go to the home directory @cindex Go to the ~ directory @cindex Go to the $HOME directory @findex HOME-DIR @kindex ESC h @noindent @kbd{ESC i} @display Go to the @samp{/usr/include} directory (@samp{INCLUDE-DIR}). @end display @cindex Go to the include directory @cindex Go to the /usr/include directory @findex INCLUDE-DIR @kindex ESC i @noindent @kbd{ESC ESC 1} @display Go to the @samp{/mnt/fd0} directory (@samp{FIRST-FLOPPY-DIR}). @end display @cindex Go to the first floppy mount point @findex FIRST-FLOPPY-DIR @kindex ESC ESC 1 @noindent @kbd{ESC ESC 2} @display Go to the @samp{/mnt/fd1} directory (@samp{SECOND-FLOPPY-DIR}). @end display @cindex Go to the second floppy mount point @findex SECOND-FLOPPY-DIR @kindex ESC ESC 2 @node Compiling, Mail, Directories, gitfm @subsection Compiling programs @noindent @kbd{F9}, @kbd{ESC 9}, @kbd{^X m} @display Run the @code{make} command in the current directory. Use -k as the default option (@samp{MAKE}). @end display @cindex Compiling programs @cindex make @cindex Compile @findex MAKE @kindex F9, ESC 9, ^X m @noindent @kbd{^X b m} @display Run the @code{make} command in background in the current directory (@samp{B-MAKE}). @end display @xref{gitaction}, for more information. @cindex Background make @findex B-MAKE @kindex ^X b m @node Mail, Shell, Compiling, gitfm @subsection Sending/receiving ascii/binary mail @noindent @kbd{^C 2 a} @display Send the current current ascii file by mail to an user supplied email address (@samp{ASCII-MAIL}). @end display @cindex Sending ascii mail @cindex Sending text by mail @findex ASCII-MAIL @kindex ^C 2 a @noindent @kbd{^C b 2 a} @display The same as @samp{ASCII-MAIL}, the only difference being that the command runs in background (@samp{B-ASCII-MAIL}). @end display @cindex Sending ascii mail in background @cindex Sending mail @cindex Sending files by mail @findex B-ASCII-MAIL @kindex ^C b 2 a @noindent @kbd{^C 2 b} @display Send the current current binary file by mail to an user supplied list of email addresses. The file is uuencoded first (@samp{BINARY-MAIL}). @end display @cindex Sending binary mail @cindex Binary files by mail @findex BINARY-MAIL @kindex ^C 2 b @noindent @kbd{^C b 2 b} @display The same as @samp{BINARY-MAIL}, the only difference being that the command runs in background (@samp{B-BINARY-MAIL}). @end display @cindex Sending binary mail in background @findex B-BINARY-MAIL @kindex ^C b 2 b @noindent @kbd{^C 2 m} @display Send the current current binary file by mail to an user supplied list of email addresses. The file is encoded with mpack first (@samp{MIME-MAIL}). @end display @cindex Sending mime mail @cindex Mime encoded files by mail @findex MIME-MAIL @kindex ^C 2 m @noindent @kbd{^C b 2 m} @display The same as @samp{MIME-MAIL}, the only difference being that the command runs in background (@samp{B-MIME-MAIL}). @end display @cindex Sending mime mail in background @findex B-MIME-MAIL @kindex ^C b 2 m @noindent @kbd{ESC x r m} @display Run the @code{emacs -f rmail} command. This will start the Emacs's @samp{rmail} function so that you can read your mail (@samp{READ-MAIL}). @end display @cindex Emacs rmail @cindex Reading mail @findex READ-MAIL @kindex ESC x r m @node Shell, Grep, Mail, gitfm @subsection Starting a sub-shell @noindent @kbd{^X z} @display Call a sub-shell as specified by the @var{$GNUIT_SHELL} environment variable (@samp{SUB-SHELL}). @var{$GNUIT_SHELL} used to be called @var{$GIT_SHELL}. The old name is still accepted for backwards-compatibility. @end display @xref{Environment Variables}, for more information. @cindex Shell @cindex bash @cindex csh @cindex tcsh @cindex sh @findex SUB-SHELL @kindex ^X z @node Grep, Locking, Shell, gitfm @subsection Using grep and recursive grep @noindent @kbd{^X g} @display Search using @code{grep} all the selected files for a given pattern (@samp{GREP}). @end display @cindex grep @cindex Searching regular expressions @cindex Searching patterns in files @cindex regexp @findex GREP @kindex ^X g @noindent @kbd{^X g} @display Search recursively using @code{gitrgrep} all the user specified files and directories for a given pattern (@samp{RECURSIVE-GREP}). @end display @xref{gitrgrep}, for more information. @cindex Recursive grep @findex RECURSIVE-GREP @kindex ^X G @node Locking, Refreshing, Grep, gitfm @subsection Locking your console Having a lock feature might be a good idea and, since not all the @code{UNIX} systems provide one, @code{gitfm} tries to get around the problem @dots{} @noindent @kbd{^X p} @display Prompt the user for a password and locks the console until the same password is reinserted (@samp{lock}). @end display @cindex Locking the console @cindex Console lock @findex lock @kindex ^X p @node Refreshing, Resetting, Locking, gitfm @subsection Refreshing the screen contents Sometimes your screen needs to be refreshed. Just think about what happens when somebody wants to talk with you and the talk daemon writes something like this @display Message from Talk_Daemon@@galei.cs.vu.nl at 12:15 ... talk: connection requested by andrei@@galei.cs.vu.nl. talk: respond with: talk andrei@@galei.cs.vu.nl @end display @noindent on your screen. And sometimes you might also want to re-read the current directories. @code{gitfm} provides a built-in command for refreshing the screen contents. @noindent @kbd{^L} @display Re-read the directories contents and refresh the screen (@samp{refresh}). @end display @cindex Re-reading directories. @cindex Refreshing the screen. @findex refresh @kindex ^L @node Resetting, Mounting, Refreshing, gitfm @subsection Resetting your terminal @noindent @kbd{^X ^L} @display Call @code{reset} in order to reset the terminal to its default settings (@samp{TTY-RESET}). @end display @cindex Resetting the terminal @cindex Terminal reset @findex TTY-RESET @kindex ^X ^L @node Mounting, Sysinfo, Resetting, gitfm @subsection Mounting/unmounting file systems People dealing with lots of files usually need to save/restore/copy files from/to other file systems. In order to be more efficient, @code{gitfm} provides a set of key bindings for mounting and unmounting file systems. @xref{gitmount}, for more information. The default key bindings set has been designed to work under @code{Linux}, but it can be easily changed for other @code{UNIX} systems with different device names. Reading the configuration file @file{gnuitrc.common} should be enough. @xref{Hot Keys}, for more information. As a convention, the @samp{/mnt} directory is used to store an empty subdirectory for each mountable file system. Each file system is actually mounted in its counterpart @samp{/mnt} subdirectory. Try to follow this convention since the @code{gitmount} script is heavily based on it. @xref{Customization}, for more information. @noindent @kbd{ESC m a} @display Call @code{mount}(1) in order to mount the first floppy (@samp{/dev/fd0}) in the @samp{/mnt/fd0} directory (@samp{MOUNT-A}). @end display @cindex Mounting the first floppy @cindex Mounting the floppy @findex MOUNT-A @kindex ESC m a @noindent @kbd{ESC m b} @display Call @code{mount}(1) in order to mount the second floppy (@samp{/dev/fd1}) in the @samp{/mnt/fd1} directory (@samp{MOUNT-B}). @end display @cindex Mounting the second floppy @findex MOUNT-B @kindex ESC m b @noindent @kbd{ESC m c} @display Call @code{mount}(1) in order to mount the cdrom (@samp{/dev/cdrom}) in the @samp{/mnt/cdrom} directory (@samp{MOUNT-CDROM}). @end display @cindex Mounting the cdrom @findex MOUNT-CDROM @kindex ESC m c @noindent @kbd{ESC m f} @display Call @code{mount}(1) in order to mount the first floppy (@samp{/dev/fd0}) in the @samp{/mnt/floppy} directory (@samp{MOUNT-FLOPPY}). @end display @cindex Mounting the first floppy @cindex Mounting the floppy @findex MOUNT-FLOPPY @kindex ESC m f @noindent @kbd{ESC m z} @display Call @code{mount}(1) in order to mount the zip drive (@samp{/dev/zip}) in the @samp{/mnt/zip} directory (@samp{MOUNT-ZIP}). @end display @cindex Mounting the zip drive @findex MOUNT-ZIP @kindex ESC m z @noindent @kbd{ESC m j} @display Call @code{mount}(1) in order to mount the jaz drive (@samp{/dev/jaz}) in the @samp{/mnt/jaz} directory (@samp{MOUNT-JAZ}). @end display @cindex Mounting the jaz drive @findex MOUNT-JAZ @kindex ESC m j @noindent @kbd{ESC m t} @display Call @code{mount}(1) in order to mount the file systems corresponding to the selected subdirectories. For example, if you are in the @samp{/mnt} directory and the @samp{cdrom} and @samp{zip} subdirectories are selected, the cdrom and the zip disk will be mounted (@samp{MOUNT-THESE}). @end display @cindex mount @cindex Mounting these file systems @cindex Mounting subdirectories @findex MOUNT-THESE @kindex ESC m t @noindent @kbd{ESC r a} @display Call @code{umount}(1) in order to remove (unmount) the first floppy (@samp{/dev/fd0}) (@samp{UMOUNT-A}). @end display @cindex Unmounting the first floppy @cindex Unmounting the floppy @cindex umount @findex UMOUNT-A @kindex ESC r a @noindent @kbd{ESC r b} @display Call @code{umount}(1) in order to remove (unmount) the second floppy (@samp{/dev/fd1}) (@samp{UMOUNT-B}). @end display @cindex Unmounting the second floppy @findex UMOUNT-B @kindex ESC r b @noindent @kbd{ESC r c} @display Call @code{umount}(1) in order to remove (unmount) the cdrom (@samp{/dev/cdrom}) (@samp{UMOUNT-CDROM}). @end display @cindex Unmounting the cdrom findex UMOUNT-CDROM @kindex ESC r c @noindent @kbd{ESC r f} @display Call @code{umount}(1) in order to remove (unmount) the first floppy (@samp{/dev/fd0}) (@samp{UMOUNT-FLOPPY}). @end display @cindex Unmounting the first floppy @cindex Unmounting the floppy @cindex umount @findex UMOUNT-FLOPPY @kindex ESC r f @noindent @kbd{ESC r z} @display Call @code{umount}(1) in order to remove (unmount) the zip drive (@samp{/dev/zip}) (@samp{UMOUNT-ZIP}). @end display @cindex Unmounting the zip drive @findex UMOUNT-ZIP @kindex ESC r z @noindent @kbd{ESC r j} @display Call @code{umount}(1) in order to remove (unmount) the jaz drive (@samp{/dev/jaz}) (@samp{UMOUNT-JAZ}). @end display @cindex Unmounting the jaz drive @findex UMOUNT-JAZ @kindex ESC r j @noindent @kbd{ESC r t} @display Call @code{umount}(1) in order to remove (unmount) the file systems mounted into the selected subdirectories. For example, if the current directory is @samp{/mnt} and the @samp{cdrom} and @samp{zip} subdirectories are selected, the cdrom and the zip disk will be unmounted (@samp{UMOUNT-THESE}). @end display @cindex Unmounting these file systems @cindex Unmounting subdirectories @findex UMOUNT-THESE @kindex ESC r t @node Sysinfo, Environment, Mounting, gitfm @subsection Getting some useful system information @noindent @kbd{^X T} @display Call @code{date}(1) in order to display the current time/date (@samp{DATE}). @end display @cindex date @findex DATE @kindex ^X T @noindent @kbd{ESC S f} @display Call @code{finger}(1) in order to display information about local and remote users (@samp{FINGER}). @end display @cindex finger @findex FINGER @kindex ESC S f @noindent @kbd{ESC S m} @display Call @code{mount}(1) in order to display a list of the currently mounted file systems (@samp{MOUNTED-FILE-SYSTEMS}). @end display @cindex Mounted file systems list @findex MOUNTED-FILE-SYSTEMS @kindex ESC S m @noindent @kbd{ESC S q} @display Call @code{quota}(1) in order to display a user file system disk quota and quota (@samp{QUOTA}). @end display @cindex Current disk quota @cindex Quota @findex QUOTA @kindex ESC S q @noindent @kbd{ESC S s} @display Call @code{df}(1) in order to get the status of the currently mounted file systems (@samp{DISK-FREE-SPACE}). @end display @cindex Free disk space @cindex Disk free space @cindex File system status @findex DISK-FREE-SPACE @kindex ESC S s @noindent @kbd{ESC S u} @display Call @code{users}(1) in order to get the name of the currently logged in users (@samp{USERS}). @end display @cindex System users @cindex Logged in users @findex USERS @kindex ESC S u @noindent @kbd{ESC S v} @display Call @code{$GNUIT_VMSTAT}(1) in order to get the current virtual memory status. This is very system dependent, @code{Linux} uses @code{free}, other systems use @code{vmstat}, so the @var{$GNUIT_VMSTAT} variable is used to deal with this (@samp{VIRTUAL-MEMORY-STATUS}). @var{$GNUIT_VMSTAT} used to be called @var{$GIT_VMSTAT}. The old name is still accepted for backwards-compatibility. @end display @xref{Environment Variables}, for more information. @cindex Virtual memory status @cindex Swapping @findex VIRTUAL-MEMORY-STATUS @kindex ESC S v @noindent @kbd{ESC S w} @display Call @code{who}(1) in order to find out who is on the system (@samp{WHO}). @end display @cindex who @findex WHO @kindex ESC S w @node Environment, Processes, Sysinfo, gitfm @subsection How to look at the environment variables @noindent @kbd{^X E} @display Call @code{env}(1) in order to display the current environment (@samp{ENV}). @end display @cindex env @cindex Looking at the environment @findex ENV @kindex ^X E @noindent @kbd{^X H} @display Call @code{xhost}(1) in order to add/remove hosts names to the list allowed to make connection to the X server (@samp{XHOST}). @end display @cindex xhost @cindex Adding and removing hosts @findex XHOST @kindex ^X H @node Processes, Sync, Environment, gitfm @subsection Viewing/killing processes There are at least two kinds of @code{ps}(1) utilities. One that accepts (more or less) combinations of the 'a', 'u', and 'x' flags and another that accepts combinations of 'e', 'f' and 'l' flags. Since is quite difficult to test which one works fine on a given @code{UNIX} system, @code{gitfm} provides key bindings for both of them. Anyway, if your @code{ps}(1) fails to accept the predefined combinations, please take a look in its manual and then modify the @file{.gnuitrc.TERM} file as needed. Since the number of possible combinations of flags in the @code{ps} command line is quite big and *very* system dependent, there is no real reason to display them all here. We are only interested in giving you a starting point in your search through the @file{.gnuitrc.TERM} file. Note also that you can display a list of processes using @code{ps}(1) or browse through a list of them (killing as needed) using @code{gitps}. As a convention, we have used the same key sequence for a given set of @code{ps}(1) flags for both @code{ps}(1) and @code{gitps}, the only difference being that @code{ps}(1) keys end in an uppercase letter. @xref{gitps}, for more information. Under Linux it is possible to see a tree of processes using @code{pstree}(1). Here there are the default key bindings for the 'e', 'f' and 'l' @code{ps}(1) flags combinations: @noindent @kbd{ESC P b}, @kbd{ESC P c}, @kbd{ESC P e} @display Call @code{gitps} or @code{ps}(1) in order to browse through or display a list of currently running processes (@samp{GITPS}, @samp{PS}). @end display @cindex Viewing processes @cindex Browsing through the process list @findex GITPS, PS @kindex ESC P b, ESC P c, ESC P e @noindent ... and the default key bindings for the 'a', 'u' and 'x' @code{ps}(1) flags combinations: @noindent @kbd{ESC P a}, @kbd{ESC P l}, @kbd{ESC P u} @kbd{ESC P x}, @kbd{ESC P y} @display Call @code{gitps} or @code{ps}(1) in order to browse through or display a list of currently running processes (@samp{GITPS}, @samp{PS}). @end display @cindex Viewing processes @cindex Browsing through the process list @findex GITPS, PS @kindex ESC P a, ESC P l, ESC P u @kindex ESC P x, ESC P y @noindent @kbd{ESC P T} @display Call @code{pstree}(1) in order to display the tree of currently running processes (@samp{PSTREE}). @end display @cindex Viewing the process tree @findex PSTREE @kindex ESC P T @noindent @kbd{^X k} @display Call @code{kill}(1) in order to kill a user specified process with a given signal (@samp{KILL}). @end display @cindex Killing processes @findex KILL @kindex ^X k @node Sync, Documentation, Processes, gitfm @subsection Synchronizing the file systems @noindent @kbd{^X S} @display Call @code{sync}(1) in order to synchronize all the file systems (@samp{SYNC}). @end display @cindex Synchronizing file systems @cindex sync @findex SYNC @kindex ^X S @node Documentation, Exit, Sync, gitfm @subsection Reading the documentation @noindent @kbd{^X q} @display Read a manual page. The user is prompted for its name (@samp{MAN}). @end display @cindex Reading the manual pages @findex MAN @kindex ^X q @noindent @kbd{F1}, @kbd{ESC 1}, @kbd{^X i} @display Read an info documentation. The user is prompted for the documentation name (@samp{INFO}). @end display @cindex Reading the info documentation @findex INFO @kindex F1, ESC 1, ^X i @noindent @kbd{^X h} @display Read the html documentation using the viewer specified in @var{GNUIT_BROWSER}, or with lynx if @var{GNUIT_BROWSER} is not set (@samp{HTML}). @var{$GNUIT_BROWSER} used to be called @var{$GIT_BROWSER}. The old name is still accepted for backwards-compatibility. @end display @cindex Reading the html documentation @findex HTML @kindex ^X h @noindent @kbd{^X ^A} @display Show the key-bindings for commands matching a specified string (@samp{apropos}). @end display @cindex Searching for key-bindings @findex apropos @kindex ^X ^A @node Exit, , Documentation, gitfm @subsection Exiting GNU Interactive Tools @noindent @kbd{F10}, @kbd{ESC 0}, @kbd{^X ^C}, @kbd{^X c} @display Exit GNU Interactive Tools (@samp{exit}). @end display @cindex Exiting @findex exit @kindex F10, ESC 0, ^X ^C, ^X c @c de scris de variabila cu pricina @node gitps, gitview, gitfm, Description @section The GNUIT process viewer/killer @cindex gitps @code{gitps} is an interactive process viewer/killer. It calls internally the @code{ps}(1) utility. This is a brief description of the command line arguments. @noindent @code{-h} print this help message @noindent @code{-v} print the version number @noindent @code{-i} print the installation directory @noindent @code{-c} use ANSI colors @noindent @code{-b} don't use ANSI colors @noindent @code{-l} don't use the last screen character @noindent @code{-p} pass the remaining arguments to ps(1) Running @code{gitps} is self explanatory. Use the @kbd{arrows}, @kbd{PageUp}, @kbd{PageDown}, @kbd{Home}, @kbd{End}, @kbd{^N}, @kbd{^P}, @kbd{^V}, @kbd{ESC v}, @kbd{Space} and @kbd{Backspace} to move in the list, @kbd{^L} to refresh it, @kbd{Enter} to change the default signal and @kbd{F10}, @kbd{q} or @kbd{^X ^C} to leave. You can change these keys, just read the GITPS-Setup, GITPS-Color, GITPS-Monochrome and GITPS-Keys sections in the configuration files @file{gnuitrc.TERM}. The selected signal can also be changed by pressing its first letter (in uppercase), e.g. for @samp{SIGTERM} press @kbd{T}, or by pressing the key corresponding to the signal number. For signals > 10, prefix with @kbd{^X}, and for signals greater than 20, prefix with @kbd{^C}. For instance, to select signal 15 (@samp{SIGTERM}), press @kbd{^X5}. Keys for signal numbers are hard-coded to the versions in i386 Linux, however most correspond to POSIX. Compare signal(7) or signal(5) with @uref{http://linux.die.net/man/7/signal}. @node gitview, gitkeys, gitps, Description @section The GNUIT ASCII/HEX file viewer @cindex gitview @code{gitview} is an ASCII/HEX file viewer. Use the @kbd{arrows}, @kbd{PageUp}, @kbd{PageDown}, @kbd{Home}, @kbd{End}, @kbd{^N}, @kbd{^P}, @kbd{^V}, @kbd{ESC v}, @kbd{Space} and @kbd{Backspace} to move in the file, @kbd{^L} to refresh the screen and @kbd{F10}, @kbd{q} or @kbd{^X ^C} to leave. You can change these keys, just read the GITVIEW-Setup, GITVIEW-Color, GITVIEW-Monochrome and GITVIEW-Keys sections in the configuration files @file{gnuitrc.TERM}. Here is a brief description of the command line arguments: @noindent @code{-h} print this help message @noindent @code{-v} print the version number @noindent @code{-i} print the installation directory @noindent @code{-c} use ANSI colors @noindent @code{-b} don't use ANSI colors @noindent @code{-l} don't use the last screen character @node gitkeys, gitwipe, gitview, Description @section The GNUIT key sequences display utility @cindex gitkeys @code{gitkeys} is a program that displays the key sequence sent by the pressed key. This is the key sequence received by @code{GIT} tools, so this program is useful when setting up the @file{.gnuitrc.TERM} configuration files. @node gitwipe, gitmount, gitkeys, Description @section The GNUIT wipe file utility @cindex gitwipe @code{gitwipe} is an utility for wiping files. It overwrites the file contents with a random sequence of numbers and then calls @file{sync}(). Note that @code{gitwipe} does *not* remove the wiped file since (under @code{Linux} at least) the @file{sync}() system call might return before actually writing the new file contents to disk. Removing the file might be dangerous because some file systems can detect that the blocks in the removed wiped file are no longer used and never write them back to disk in order to improve performance. It is up to you to remove the file(s) at a later moment. @node gitmount, gitaction, gitwipe, Description @section The GNUIT mount utility @cindex gitmount @code{gitmount} is a script that allows you to mount a list of block devices (specified in the command line), without specifying the file system type. With a command like `gitmount fd0 cdrom' the first floppy will be mounted in @file{/mnt/fd0} and the cdrom will be mounted in @file{/mnt/cdrom}. Make sure your @file{/etc/fstab} settings are correct. You don't need to know the file system type anymore. If you want to use @code{gitmount} with the block device @file{/dev/xxx} then the directory @file{/mnt/xxx} is created if it doesn't exist. @code{gitmount} will attempt to create the necessary directories, but root permissions might be required. @node gitaction, gitunpack, gitmount, Description @section The GNUIT per file type action script @cindex gitaction @code{gitaction} is a script that executes a different action for each file type specified. It is called by the @code{gitfm} program when pressing @kbd{F2}, @kbd{ESC 2} or @kbd{^Xa}. The first parameter is the current directory name and the second one is the file name to be matched against the default patterns. The matching is done using the shell 'case' statement. If you press @kbd{F2}, @kbd{ESC 2} or @kbd{^Xa} on a @file{*.html} file, @code{gitfm} will invoke a browser to view it, if you press @kbd{F2}, @kbd{ESC 2} or @kbd{^Xa} on a @file{*.tar.gz} file, @code{gitfm} will list the tar archive contents, if you press the same keys on a @file{*.gz} file, @code{gitfm} will display its uncompressed contents on the screen, etc @dots{} If you press @kbd{F2}, @kbd{ESC 2} or @kbd{^Xa} on a @file{*.gif} file or @file{*.jpg} file and you have the @code{xzgv} utility installed, you will be able to see it. If you want to change the gif/jpeg viewer, all you need to do is to change its name in the @code{gitaction} script. There are many more file types and viewers that gitaction knows about. In addition, if you are running under GNOME, gnome-open is used, and on MacOS, open(1) is used. see(1) and metamail(1) are also used as fallbacks. If all else fails, the file is displayed using $GNUIT_PAGER. If you want to find out what the default action for each file type is (or if you want to modify it), just read/modify the @code{gitaction} script. Also, you can add a @code{.gitaction} shell script in your home directory and/or in any other directory. Before trying to match a file name, @code{gitaction} will attempt to execute @code{./.gitaction}. If that one fails to match the file name against its patterns, it backs up to @code{$HOME/.gitaction}. When this one fails too the patterns in @code{gitaction} are tried. For an example of how to write .gitaction scripts take a look at the @code{.gitaction} shell script provided as part of the distribution and installed in the @samp{$(prefix)/bin} directory. Debian users will find it in @samp{/usr/share/doc/gnuit/examples/}. @node gitunpack, gitrgrep, gitaction, Description @section Unified archive unpacking @cindex gitunpack @code{gitunpack} is a shell script that accepts a directory and a set of archives as its command line parameters, and then attempts to unpack those archives in the given directory, selecting the utility used to unpack the archives based on the archive extensions. @node gitrgrep, , gitunpack, Description @section The GIT recursive grep script @cindex gitrgrep @cindex gitregrep @cindex gitrfgrep @code{gitrgrep} is a very small script that calls @code{grep} recursively. It accepts @code{grep} like options / parameters, the only difference being that file specifications should be quoted: @example @code{gitrgrep} main '*.c' or @code{gitrgrep} errno '*.c *.h' @end example @code{gitregrep} and @code{gitrfgrep} are recursive versions of the egrep and fgrep programs. @node Customization, Limitations, Description, Top @chapter Customizing GNU Interactive Tools @menu * Environment Variables:: Environment variables used by GNUIT * Configuration Files:: GNUIT's configuration files @end menu @node Environment Variables, Configuration Files, , Customization @section Environment Variables The configuration files use shell environment variables to call the shell, editor, mail reader, html viewer, compress and virtual memory status utility. That means that if you set @var{GNUIT_SHELL}, @var{GNUIT_EDITOR}, @var{GNUIT_RMAIL}, @var{GNUIT_BROWSER}, or @var{GNUIT_VMSTAT} to some value, that value will be used instead of the default one. The defaults are: @display GNUIT_SHELL='/bin/sh' GNUIT_EDITOR='vi' GNUIT_RMAIL='emacs -f rmail' GNUIT_PAGER='more GNUIT_VMSTAT='free' GNUIT_BROWSER='lynx' @end display if the @code{configure} script is passed @samp{--enable-debian}, some of the defaults are changed as follows: @display GNUIT_EDITOR='sensible-editor' GNUIT_PAGER='sensible-pager' GNUIT_BROWSER='sensible-browser' @end display If @var{SHELL} is defined, @var{GNUIT_SHELL} will be set to that value. If @var{PAGER} is defined, @var{GNUIT_PAGER} will be set to that value. If @var{EDITOR} is defined, @var{GNUIT_EDITOR} will be set to that value. If you want to change the default settings, put something like this into your @file{.profile}: @display export GNUIT_SHELL='/usr/local/bin/bash' export GNUIT_EDITOR='emacs' export GNUIT_RMAIL='elm' export GNUIT_PAGER='less' export GNUIT_VMSTAT='vmstat' export GNUIT_BROWSER='netscape' @end display These variables used to be prefixed with @var{GIT_} (e.g. @var{GIT_PAGER}). The old names are still accepted for backwards compatibility. @vindex GNUIT_SHELL @vindex GNUIT_EDITOR @vindex GNUIT_RMAIL @vindex GNUIT_VMSTAT @vindex GNUIT_BROWSER @vindex SHELL @vindex EDITOR @node Configuration Files, , Environment Variables, Customization @section Configuration Files There is one configuration file per terminal type in @code{GNUIT}. The configuration file(s) reside in the user's home directory or (the default versions) in the directory @file{/usr/share/gnuit/}). Files in the user's home directory start with a leading ``.'' Their generic name is @file{gnuitrc.TERM}. @code{GNUIT} allows each terminal type to have its own configuration file (@var{TERM} is the value of the @var{TERM} environment variable (e.g @samp{vt102}); for the @code{Linux} console the configuration file is @file{gnuitrc.console}). @vindex TERM Since most of the key bindings are common to all the terminal types, a configuration file called @file{gnuitrc.common} is parsed before parsing the normal @file{.gnuitrc.TERM} configuration file, the later one defining only those keys that are terminal specific. However, if a key binding is redefined in the @file{gnuitrc.TERM} file, that binding will be used. If the @code{GNUIT} package have been compiled without passing the @samp{--enable-terminfo} option to the @code{configure} script and your system has a huge @samp{termcap} database (@file{/etc/termcap}), you can copy the termcap definition(s) of your terminal(s) in a file called, lets say @file{.termcap} and put it in your home directory. After that, set your @var{TERMCAP} environment variable to point to it. You should add something like this to your @file{.profile}: @display @var{TERMCAP}=@file{/home/mike/.termcap} @end display The interactive programs in the @code{GNUIT} package can run without such a file, but on systems with huge @samp{termcap} databases, copying the definitions of the most used terminals in a local @file{.termcap} file will lead to a faster start. The @file{.gnuitrc.TERM} is first searched for in the home directory then, if not found, in the directory @file{/usr/share/gnuit/}). (without the leading ``.''). The configuration file is structured in sections, each section containing variables in the following format: @display @samp{variable-name} = @samp{first-field};@samp{second-field}; ... @end display After the @samp{variable-name} at least one space or tab is required. All characters after a @samp{#} are ignored and if you comment a section name, the whole section is ignored. Section names are enclosed in rectangular brackets (@samp{[} and @samp{]}). Note that this manual don't include them while refering to section names. The @code{GNUIT} package contains three major programs: @code{gitfm}, @code{gitps} and @code{gitview}. Each one has its own sections in the configuration files. There is also a global setup section called @samp{Setup} that is used by all these programs. Note that now @code{git} has been renamed to @code{gitfm}, the corresponding sections have been renamed to @code{GITFM}, however for backwards compatibility, the old name (@code{GIT}) is still checked if the @code{GITFM} section is not found. @menu * Key Sequences:: How to write a key sequence. * Setup:: The global setup section. * gitfm Sections:: gitfm's sections. * gitps Sections:: gitps's Sections. * gitview Sections:: gitview's Sections. @end menu @node Key Sequences, Setup, , Configuration Files @subsection Writing key sequences @code{GNUIT} contains three interactive programs. Their names are: @code{gitfm} (this is the file system browser), @code{gitps} (this is the process viewer/killer and @code{gitview} (this is the ASCII/HEX file viewer). Each one of these programs has its own set of key bindings. The convention used in describing key bindings are very simple. Here there are some examples that will help you to understand them. The corresponding @code{Emacs} conventions will help you even more. @kbd{^A} means keeping the Ctrl key down and pressing the @kbd{a} key (@kbd{C-a}). The @kbd{ESC} character is represented as @kbd{^[} so that you can use the meta character (@kbd{M-} ) where available (or the @kbd{ESC} key): @kbd{^[a} corresponds to @kbd{M-a} (pressing the @kbd{ESC} key and then @kbd{a}). The @kbd{^} character is represented as @kbd{^^}. The @kbd{backspace} character is represented as @kbd{^_}. The @kbd{Ctrl-SPACE} character (@kbd{C-SPC}) is represented as @kbd{^$}. The space (@kbd{SPC}) character is represented as @kbd{^@@}. Note that the key bindings notation described here is only used in the configuration files. For the sake of readability this manual uses @kbd{ESC} for the @kbd{ESC} key, @kbd{SPC} for the @kbd{SPACE} key and @kbd{RET} for the @kbd{RETURN} (@kbd{ENTER}) key. @node Setup, gitfm Sections, Key Sequences, Configuration Files @subsection The global setup section In this section the variables have only one field. @noindent @samp{AnsiColors} This variable should be set to @samp{ON} if the terminal supports standard @samp{ANSI} color sequences. Otherwise it should be @samp{OFF}. If @samp{AnsiColors} is @samp{ON}, @samp{GITxxx-Color} sections will be used in the configuration files @file{gnuitrc.TERM}. Otherwise, @code{GNUIT} interactive programs will use the @samp{GITxxx-Monochrome} sections. @vindex AnsiColors @noindent @samp{UseLastScreenChar} This variable is used for terminals that can't write on the last character of the screen without scrolling the entire screen. If your terminal has no problem writing there (@code{Linux} console, vt100, vt102, xterm, ...) set it to @samp{ON}. Otherwise (hpterm), it should be @samp{OFF}. @vindex UseLastScreenChar @noindent @samp{StartupScrollStep} This variable specifies the scroll step initial value for both panels. @vindex StartupScrollStep @node gitfm Sections, gitps Sections, Setup, Configuration Files @subsection gitfm Sections @menu * GITFM-Setup:: gitfm's setup section. * GITFM-Color:: gitfm's color section. * GITFM-Monochrome:: gitfm's monochrome section. * GITFM-Keys:: gitfm's keys section. * GITFM-FTI:: gitfm's file type information section. @end menu @node GITFM-Setup, GITFM-Color, , gitfm Sections @subsubsection gitfm Setup In this section the variables have only one field. @noindent @samp{StartupFileDisplayMode} This variable specifies the file specific information displayed at startup. It can be any of @samp{OwnerGroup}, @samp{DateTime}, @samp{Size}, @samp{AbbrevSize}, @samp{Mode} or @samp{FullName}. Its value initially affects both panels but it can be changed separately afterward. @vindex StartupFileDisplayMode @noindent @samp{StartupFileSortMethod} This variable specifies the startup sort method. It can be any of @samp{Name}, @samp{Extension}, @samp{Size}, @samp{Date}, @samp{Mode}, @samp{OwnerId}, @samp{GroupId}, @samp{OwnerName} or @samp{GroupName}. Its value initially affects both panels but it can be changed separately afterward. @vindex StartupFileSortMethod @noindent @samp{MaxUnscaledDigits} Maximum number of digits a number may be before being scaled (e.g. to @samp{123M}). If you want number to always be scaled, either set this to @samp{0}, or set @samp{StartupFileDisplayMode} to @samp{AbbrevSize}. Note that scaling may happen anyway if the number is too large for the display field. @vindex MaxUnscaledDigits @noindent @samp{GroupDigits} If this variable is @samp{ON}, digits of file sizes will be grouped according to your locale, (e.g. @samp{123,456,789}). @vindex GroupDigits @noindent @samp{ConfirmOnExit} If this variable is @samp{ON}, the user is prompted for confirmation at exit. @vindex ConfirmOnExit @noindent @samp{HistoryFile} This variable specifies the history file name. The default value is @file{~/.githistory}. @vindex HistoryFile @noindent @samp{InfoDisplay} If this variable is @samp{OFF}, auxiliary file informations are not displayed. This can be useful if you are using a very slow terminal. @vindex InfoDisplay @noindent @samp{LeadingDotMatch} If this variable is @samp{OFF} when matching files for select-files-matching-pattern / unselect-files-matching-pattern then the leading '.' in the file name is matched only explicitly. @vindex LeadingDotMatch @noindent @samp{TypeSensitivity} If this variable is @samp{OFF}, colors are not used when displaying files. Normally, the information in the @samp{GITFM-FTI} section is used to display files with different colors, depending on their types. Note that @samp{TypeSensitivity} is automatically set to @samp{OFF} when @samp{AnsiColors} is @samp{OFF}. @xref{GITFM-FTI}, for mor information. @vindex TypeSensitivity @noindent @samp{NormalModeHelp} @noindent @samp{CommandLineModeHelp} These variables describe the status bar contents for each @code{gitfm} mode when no errors occurred. @code{gitfm} can display on the status bar a help string and/or some system information (system type, hostname, machine type and the current date) using escape characters: @display \s -> the system type \h -> the host name \m -> the machine type \d -> the current date @end display @xref{Modes}, for more information. @vindex NormalModeHelp @vindex CommandLineModeHelp @node GITFM-Color, GITFM-Monochrome, GITFM-Setup, gitfm Sections @subsubsection Using gitfm on color displays In this sections the variables have only one field. These section allows you to customize the colors of @code{gitfm}. Reading the @file{gnuitrc.TERM} configuration file is self explanatory. @node GITFM-Monochrome, GITFM-Keys, GITFM-Color, gitfm Sections @subsubsection Using gitfm on monochrome displays In this sections the variables have only one field. These section allows you to customize the appearance of @code{gitfm} on monochrome displays. Reading the @file{gnuitrc.TERM} configuration file is self explanatory. @node GITFM-Keys, GITFM-FTI, GITFM-Monochrome, gitfm Sections @subsubsection Defining keys These section describes the actions @code{gitfm} takes when a specified key is pressed. A variable can have up to 6 fields separated by ';'. Each line in this section looks like: @display @samp{key-sequence} = @samp{command-name};@samp{formatted-command};@samp{new-dir}; @samp{save-screen};@samp{pause};@samp{hide} @end display Note that you can't continue the variable fields description on the next line. @menu * key-sequence:: The key-sequence field. * command-name:: The command-name field. * formatted-command:: The formatted-command field. * new-dir:: The new-dir field. * save-screen:: The save-screen field. * pause:: The pause field. * hide:: The hide field. @end menu @node key-sequence, command-name, , GITFM-Keys @subsubsection The key-sequence field @samp{key-sequence} is the key sequence associated with the given command. You can use any key sequence that doesn't start with an ascii character (0x20 to 0x7e). Symbolic key names (@kbd{F0}, @kbd{F1}, @kbd{F2}, ... @kbd{F10}, @kbd{UP}, @kbd{DOWN}, @kbd{RIGHT}, @kbd{LEFT}, @kbd{INS}, @kbd{DEL}, @kbd{HOME}, @kbd{END}, @kbd{PGUP} and @kbd{PGDOWN}) can be used instead of the key sequence. If some keys don't have a @samp{termcap}/ @samp{terminfo} description (like the @kbd{F11}/@kbd{F12} keys on the @code{Linux} console) you can specify the key sequence in the usual way. @node command-name, formatted-command, key-sequence, GITFM-Keys @subsubsection The command-name field @samp{command-name} is a command generic name. Even if it is not always used, the @samp{command-name} must be present (if a command is associated with a @samp{key-sequence}). If it is not, no action will be taken when pressing @samp{key-sequence}. There are two types of commands in @code{gitfm}: built-in commands and user defined commands. If the @samp{command-name} section contains a built-in command specification, the other fields are ignored. Note that by convention built-in command names contain only lower case letters while user defined command names contain only upper case letters. @node formatted-command, new-dir, command-name, GITFM-Keys @subsubsection The formatted-command field @samp{formatted-command} is a shell command which can contain some scanf(3)-like format specifiers. They are used to get the current entry name, owner, group, mode, etc. Note that using uppercase @samp{format specifiers} you will be able to access the other panel path, file and directory names, etc. These are the available @samp{format specifiers}: @menu * %s:: The %s format specifier. * %f:: The %f format specifier. * %d:: The %d format specifier. * %l:: The %l format specifier. * %t:: The %t format specifier. * %z:: The %z format specifier. * %a:: The %a format specifier. * %m:: The %m format specifier. * %g:: The %g format specifier. * %o:: The %o format specifier. * %p:: The %p format specifier. * %b:: The %b format specifier. * %i:: The %i format specifier. * %?:: The %? format specifier. @end menu @node %s, %f, , formatted-command @subsubsection The %s format specifier The format of %s is: %s@{question,default_answer@}. When @code{gitfm} encounters a %s in the @samp{formatted-command} it asks the user the question @samp{question} whose default answer is @samp{default_answer} and replaces the @samp{%s@{ , @}} with the user's answer. Both @samp{question} and @samp{default_answer} can contain any other @samp{format specifiers} except %s. Note that there should be no spaces between %s and '@{'. @node %f, %d, %s, formatted-command @subsubsection The %f format specifier @code{gitfm} will replace %f with the current directory entry name only if it is a file (not a directory). @node %d, %l, %f, formatted-command @subsubsection The %d format specifier @code{gitfm} will replace %d with the current directory entry name only if it is a directory (not a file). @node %l, %t, %d, formatted-command @subsubsection The %l format specifier @code{gitfm} will replace %l with the current directory entry name only if it is a symbolic link with no target. @node %t, %z, %l, formatted-command @subsubsection The %t format specifier @code{gitfm} will replace %t with the current directory entry name only if it is a named pipe. @node %z, %a, %t, formatted-command @subsubsection The %z format specifier @code{gitfm} will replace %z with the current directory entry name only if it is a socket. @node %a, %m, %z, formatted-command @subsubsection The %a format specifier @code{gitfm} will always replace %a with the current directory entry name. @node %m, %g, %a, formatted-command @subsubsection The %m format specifier @code{gitfm} will always replace %m with the current file mode. @node %g, %o, %m, formatted-command @subsubsection The %g format specifier @code{gitfm} will always replace %g with the current file group. @node %o, %p, %g, formatted-command @subsubsection The %o format specifier @code{gitfm} will always replace %o with the current file owner. @node %p, %b, %o, formatted-command @subsubsection The %p format specifier @code{gitfm} will always replace %p with the current panel path. @node %b, %i, %p, formatted-command @subsubsection The %b format specifier @code{gitfm} will always replace %b with the current panel directory name. @node %i, %?, %b, formatted-command @subsubsection The %i format specifier @code{gitfm} will always replace %i with all the current panel selected entry names. @node %?, , %i, formatted-command @subsubsection The %? format specifier The format of %? is: %?@{confirmation@}. @code{gitfm} uses this format specifier only to ask for confirmation before expanding / executing the current command. The @samp{confirmation} string is displayed and, if the user doesn't confirm, the command is aborted. Otherwise, %?@{confirmation@} expands to a null string and the command is expanded / executed normally. @node new-dir, save-screen, formatted-command, GITFM-Keys @subsubsection The new-dir field If the @samp{formatted-command} successfully exits (exit code = 0) or it has no body and this field is present then @samp{new-dir} will become the current panel directory. The character '~' used at the beginning of the @samp{new-dir} field is replaced by the user's home directory. @node save-screen, pause, new-dir, GITFM-Keys @subsubsection The save-screen field This field is a character (usually 'y' or 'n') that tells @code{gitfm} to save ('y') or not to save ('n') the terminal's screen after executing the @samp{formatted-command}. Saving the screen is not necessary while editing or viewing a file because the information left after the editor or the viewer exits is not important. Saving the screen means that that screen will be restored before the execution of the next command. Currently this field is used only if you are working as a super user under @code{Linux} on a virtual console. Its default value is 'y'. @node pause, hide, save-screen, GITFM-Keys @subsubsection The pause field Users may wish to read the result of some commands before repainting the panels. If this field is present gitfm will wait for a key to be pressed before restoring the panels. Its default value is 'n'. @node hide, , pause, GITFM-Keys @subsubsection The hide field Some commands that don't displaying any useful information if successfully complete their execution: @code{mount}, @code{chmod}, @code{chown}, @code{chgrp}, @code{sync} ... and, if an error occurs, a line or two are sent to stderr. If this option is 'y', the stdout and stderr will be redirected to some files (@file{git.1.pid} and @file{git.2.pid}, where pid is @code{gitfm}'s pid) and only if the command's exit code is not 0, the @file{git.2.pid} file will be displayed, line by line, onto the status bar. This way the panels will not be deleted and then repainted and the command appears to be built-in. @file{git.1.pid} and @file{git.2.pid} are created in the temporary directory specified in the @code{TMPDIR} environment variable (or "/tmp" if @code{TMPDIR} is not defined). The default value of the @code{hide} field is 'n'. @node GITFM-FTI, , GITFM-Keys, gitfm Sections @subsection Setting up colors for different file types This sections contains entries of the form: @example @samp{pattern} = @samp{foreground}; @samp{background}; @samp{brightness} @end example @noindent where @samp{pattern} is a file name matching pattern, @samp{foreground}, @samp{background} and @samp{brightness} are the color specification to be used when a file whose name match the given @samp{pattern} is displayed in a panel. Colors can be turned off using the @samp{TypeSensitivity} variable in the @samp{GITFM-Setup} section. @node gitps Sections, gitview Sections, gitfm Sections, Configuration Files @subsection gitps Sections @menu * GITPS-Setup:: gitps's setup section. * GITPS-Color:: gitps's color section. * GITPS-Monochrome:: gitps's monochrome section. * GITPS-Keys:: gitps's keys section. @end menu @node GITPS-Setup, GITPS-Color, , gitps Sections @subsubsection gitps Setup In this section the variables have only one field. @noindent @samp{Help} This variable describe @code{gitps}'s status bar contents. @node GITPS-Color, GITPS-Monochrome, GITPS-Setup, gitps Sections @subsubsection Using gitps on color displays In this sections the variables have only one field. These section allows you to customize the colors of @code{gitps}. Reading the @file{gnuitrc.TERM} configuration file is self explanatory. @node GITPS-Monochrome, GITPS-Keys, GITPS-Color, gitps Sections @subsubsection Using gitps on monochrome displays In this sections the variables have only one field. These section allows you to customize the appearance of @code{gitps} on monochrome displays. Reading the @file{gnuitrc.TERM} configuration file is self explanatory. @node GITPS-Keys, , GITPS-Monochrome, gitps Sections @subsubsection Defining keys @node gitview Sections, , gitps Sections, Configuration Files @subsection gitview Sections @menu * GITVIEW-Setup:: gitview's setup section. * GITVIEW-Color:: gitview's color section. * GITVIEW-Monochrome:: gitview's monochrome section. * GITVIEW-Keys:: gitview's keys section. @end menu @node GITVIEW-Setup, GITVIEW-Color, , gitview Sections @subsubsection gitview Setup In this section the variables have only one field. @noindent @samp{Help} This variable describe @code{gitps}'s status bar contents. @node GITVIEW-Color, GITVIEW-Monochrome, GITVIEW-Setup, gitview Sections @subsubsection Using gitview on color displays In this sections the variables have only one field. These section allows you to customize the colors of @code{gitview}. Reading the @file{gnuitrc.TERM} configuration file is self explanatory. @node GITVIEW-Monochrome, GITVIEW-Keys, GITVIEW-Color, gitview Sections @subsubsection Using gitview on monochrome displays In this sections the variables have only one field. These section allows you to customize the appearance of @code{gitview} on monochrome displays. Reading the @file{gnuitrc.TERM} configuration file is self explanatory. @node GITVIEW-Keys, , GITVIEW-Monochrome, gitview Sections @subsubsection Defining keys @node Limitations, Bugs, Customization, Top @chapter GNU Interactive Tools limitations Background commands (& terminated)can be specified in the configuration file but their result (stdout and stderr redirection), will be overwritten by the result of newer commands and, if an error occurs, it will not be seen. When @code{gitfm} is compiled for @code{Linux}, the default built-in color descriptions are for color monitors, so you can't (decently) run @code{gitfm} on a b/w monitor without the @file{gnuitrc.TERM} file correctly configured. @file{gnuitrc.TERM} should be configured with @samp{AnsiColors} = OFF. However, if your system knows about the linux-m terminal type, using that may be a better solution. Job support is implemented only in @code{gitfm}. Due to the fact that the ';' character is used as a field separator in the configuration files, you can't write something like that in the @file{gnuitrc.TERM} files: ^AAA = SHOW-USERS-AND-GROUPS; more /etc/passwd; more /etc/group @noindent because 'more /etc/group' will be considered as a directory to switch to. You must write a small script instead: #! /bin/sh more /etc/passwd more /etc/group Supposing the script name is @code{show_ug}, the @file{gnuitrc.TERM} line will look like this: ^AAA = SHOW-USERS-AND-GROUPS; show_ug There is no support for appearance modes on magic-cookie terminals. @node Bugs, Copying This Manual, Limitations, Top @chapter GNU Interactive Tools bugs Any questions, comments, or bug reports, should be emailed to @samp{gnuit-dev@@gnu.org}. Please include the version number. @node Copying This Manual, , Bugs, Top @appendix Copying This Manual @include fdl.texi @node Key Index, Command Index, Distrib, Top @unnumbered Key Index @printindex ky @node Command Index, Variable Index, Key Index, Top @unnumbered Command Index @printindex fn @node Variable Index, Concept Index, Command Index, Top @unnumbered Variable Index @printindex vr @node Concept Index, Description, Variable Index, Top @unnumbered Concept Index @printindex cp @summarycontents @contents @bye gnuit-4.9.5/doc/gitunpack.10000644000175000017500000000305111146671375012426 00000000000000.\" +---------- .\" | .\" | GITUNPACK man page .\" | .\" | Copyright 1993-1999, 2006-2007 Free Software Foundation, Inc. .\" | .\" | This file is part of GNUIT (GNU Interactive Tools) .\" | .\" | GNUIT 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 3, or (at your option) any later .\" | version. .\" | .\" | GNUIT 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 GNUIT; see the file COPYING. If not, see http://www.gnu.org/licenses/ .\" | .TH gitunpack 1 .SH NAME gitunpack \- GNU Interactive Tools - Unified archive unpacking .SH SYNTAX .I gitunpack dir files... .SH DESCRIPTION .I gitunpack is a shell script that accepts a directory and a set of archives as its command line parameters, and then attempts to unpack those archives in the given directory, selecting the utility used to unpack the archives based on the archive extensions. .SH BUGS Please send bug reports to: .br .I gnuit-dev@gnu.org .SH SEE ALSO gitfm(1) gitps(1) gitview(1) gitmount(1) gitaction(1) gitrgrep(1) gitkeys(1) .SH AUTHORS .I Tudor Hulubei .br .I Andrei Pitis .br .I Ian Beckwith (Current maintainer) gnuit-4.9.5/doc/gnuit.info0000644000175000017500000060602511146671375012374 00000000000000This is gnuit.info, produced by makeinfo version 4.11 from gnuit.texinfo. INFO-DIR-SECTION Utilities START-INFO-DIR-ENTRY * gnuit: (gnuit). GNU Interactive Tools END-INFO-DIR-ENTRY GNUIT: A set of interactive tools, by Tudor Hulubei and Andrei Pitis. This file documents the GNU Interactive Tools package. Copyright (C) 1993-1998, 2006-2008 Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the license is included in the section entitled "Copying This Manual".  File: gnuit.info, Node: Top, Next: Introduction, Up: (dir) `GNUIT' is a package containing a file system browser, a process viewer/killer and an ASCII/HEX file viewer. This is edition 2.9.4, for GNU Interactive Tools version 4.9.5. * Menu: * Introduction:: An introduction to GNUIT concepts. * Distrib:: How to get the latest GNUIT distribution. * Description:: How to use GNUIT. * Customization:: How to customize GNUIT. * Limitations:: Known GNUIT limitations. * Bugs:: How to report a bug. * Copying This Manual:: The GNU Free Documentation License. * Key Index:: An item for each standard GNUIT key sequence. * Command Index:: An item for each command name. * Variable Index:: An item for each documented variable. * Concept Index:: An item for each concept.  File: gnuit.info, Node: Introduction, Next: Distrib, Prev: Top, Up: Top 1 Introduction ************** `GNUIT' is a set of interactive tools. It contains an extensible file system browser, an ascii/hex file viewer, a process viewer/killer and some other related utilities and shell scripts. It can be used to increase the speed and efficiency of most of the daily tasks such as copying and moving files and directories, invoking editors, compressing and uncompressing files, creating and expanding archives, compiling programs, sending mail, etc. It looks nice, has colors (if the standard ANSI color sequences are supported) and is user-friendly. `GNUIT' runs on a wide variety of `UNIX' systems because it uses the `GNU Autoconf' package to get system specific information. Please refer to the PLATFORMS file included in the standard distribution for a detailed list of systems on which `GNUIT' has been tested. One of the main advantages of `GNUIT' is its flexibility. It is not limited to a given set of commands. The configuration file can be easily enhanced, allowing the user to add new commands or file operations, depending on its needs or preferences. `GNUIT' also provides a shell like command prompt, just to make sure that the entire power of the `UNIX' shell commands is still there.  File: gnuit.info, Node: Distrib, Next: Key Index, Prev: Introduction, Up: Top 2 Distributing GNU Interactive Tools ************************************ `GNUIT' is "free software"; this means that everyone is free to use it and free to redistribute it on certain conditions. `GNUIT' is not in the public domain; it is copyrighted and there are restrictions on its distribution, but these restrictions are designed to permit everything that a good cooperating citizen would want to do. What is not allowed is to try to prevent others from further sharing any version of `GNUIT' that they might get from you. The precise conditions are found in the GNU General Public License that comes with `GNUIT' and also appears following this section. The easiest way to get a copy of `GNUIT' is from someone else who has it. You need not ask for our permission to do so, or tell any one else; just copy it. If you have access to the Internet, you can get the latest distribution version of `GNUIT' from host `ftp.gnu.org' using anonymous login. See the file `/pub/gnu/GETTING.GNU.SOFTWARE' on that host to find out about your options for copying and which files to use. You may also receive `GNU Interactive Tools' when you buy a computer. Computer manufacturers are free to distribute copies on the same terms that apply to everyone else. These terms require them to give you the full sources, including whatever changes they may have made, and to permit you to redistribute the GNU Interactive Tools received from them under the usual terms of the General Public License. In other words, the program must be free for you when you get it, not just free for the manufacturer.  File: gnuit.info, Node: Description, Next: Customization, Prev: Concept Index, Up: Top 3 Using GNU Interactive Tools ***************************** The `GNUIT' package contains three interactive programs and a few additional utilities. Here there is a description of each of them. * Menu: * gitfm:: A file system browser. * gitps:: A process viewer/killer. * gitview:: An ASCII/HEX file viewer. * gitkeys:: An utility for displaying key sequences. * gitwipe:: An utility for wiping files. * gitmount:: A script for mounting file systems. * gitaction:: A per file type action script. * gitunpack:: Unified archive unpacking. * gitrgrep:: A recursive grep script.  File: gnuit.info, Node: gitfm, Next: gitps, Up: Description 3.1 The GIT file system browser =============================== `gitfm' is a file system browser with some shell like features designed to make your work much easier and much efficient. It displays one or two panels, each one containing a file system directory. You can browse the directory tree with the usual cursor keys, pressing `ENTER' when you want to enter or leave a directory and `TAB' when you want to change the panels. Under the two panels there is a shell like input line which you can use to type normal shell commands. The input line can handle an unlimited number of characters and keeps a history of typed commands (using the GNU history library). Under the input line there is a status bar. You can see there the status of the currently executed command, the warnings and errors and you will be prompted if a decision has to be taken. * Menu: * Conventions:: Key binding conventions. * Command line:: The command line arguments. * Modes:: How panels can look like. * Sorting:: How files can be sorted in a panel. * Moving:: How to move the cursor in the panel. * Selecting:: How to select (mark) files in a panel. * Isearch:: How to search a file name in a panel. * Input Line:: How to use the input line. Basic editing. * Files:: How to copy/move/delete/compress/... files. * Directories:: How to operate with directories. * Compiling:: How to compile programs. * Mail:: How to send/receive ascii/binary mail. * Shell:: How to start a sub-shell. * Grep:: How to use grep/recursive grep. * Locking:: How to lock your console. * Refreshing:: How to refresh the screen contents. * Resetting:: How to reset your terminal. * Mounting:: How to mount/unmount a file system. * Sysinfo:: How to get some useful system information. * Environment:: How to look at the environment variables. * Processes:: How to view/kill processes. * Sync:: How to synchronize your file systems. * Documentation:: How to read documentation. * Exit:: How to exit GNU Interactive Tools.  File: gnuit.info, Node: Conventions, Next: Command line, Up: gitfm 3.1.1 Key binding conventions ----------------------------- `gitfm' now follows a new, easy to remember, scheme to bind commands on keys. This is only a convention, if you define new key bindings you may, or may not follow it. All the file commands start with `^C'. This prefix can be followed by some modifiers, in order to affect the default behavior of the given command. These modifiers are `b' and `r'. `b' - this modifier specifies that the command will run in background: ^CM = CHMOD; chmod %s{New mode of %i: ,%m} %i;;;;y defines a command that changes the current selected files mode in foreground, while ^CbM = B-CHMOD; chmod %s{New mode of %i: ,%m} %i&;;;;y defines a background command that does the same thing. `r' - this modifier specifies that the command will be run recursively: ^CrM = R-CHMOD; chmod -R %s{New mode of %i: ,} %i;;;;y defines a command that recursively changes the mode of the selected entries. The `b' and `r' modifiers can be combined, the resulting command running recursively and in background: ^CbrM = B-R-CHMOD; chmod -R %s{New mode of %i: ,} %i&;;;;y You should also note that for some commands (like `gzip') there is no need for a non-recursive version. Running `gzip' recursively on files is harmless. If there is a directory between these files, `gzip' will recursively compress that directory, so you can use the same key binding for recursively and non-recursively compressing. In fact, it is a matter of selecting files or directories. Unfortunately, we can't run `chmod' recursively trying to change the mode of all the files in a directory to 0644 because that directory might contain subdirectories and removing the execution permission from them is a bad idea. So, in this case, we need separate commands.  File: gnuit.info, Node: Command line, Next: Modes, Prev: Conventions, Up: gitfm 3.1.2 Command line ------------------ This is a brief description of the command line arguments. `-h' print this help message `-v' print the version number `-c' use ANSI colors `-b' don't use ANSI colors `-l' don't use the last screen character `-p' output final path at exit The `-p' option can be used to make gitfm force bash (assuming that you're using it as your shell) chdir to the last directory gitfm was in before quitting. In order to do this, you need to invoke gitfm using this function (put it into your .profile): function g { gitfm -p $ 3> /tmp/gitfm.p.$$ if test -s /tmp/gitfm.p.$$; then if test -d "`cat /tmp/gitfm.p.$$`"; then cd "`cat /tmp/gitfm.p.$$`" else cd fi fi rm -f /tmp/gitfm.p.$$ } This will not work if you suspend gitfm. Nothing bad will happen, just the chdir will not be performed.  File: gnuit.info, Node: Modes, Next: Sorting, Prev: Command line, Up: gitfm 3.1.3 Panel modes ----------------- `gitfm' has three major modes of displaying the panels. In the first (default) mode, two panels are displayed, each one using half of the screen. In the second mode, only one panel uses the entire screen. In the third mode, only the status bar and the input line are displayed, both panels being hidden. Briefly, a panel can use the entire screen or just half of it. Even when a panel is hidden, it still exists. Users can switch between these three major modes as needed: `^X 0' Enlarges the other panel to use the entire screen. It also changes the minor mode to `Enable all'. The current panel will become invisible (`enlarge-other-panel'). `^X 1' Enlarges the current panel to use the entire screen. It also changes the minor mode to `Enable all'. The other panel will become invisible (`enlarge-panel'). `^X 2' Switches back to the two panel mode (`two-panel-mode'). `^O', `ESC o' Switches to the tty mode (no panels on the screen) (`tty-mode'). A panel displays the files and subdirectories in a directory. You can optionally specify some additional information about each entry (file, directory, ...) to be displayed (a minor mode). When using the full screen mode, all the minor modes here can be used. In half screen mode, the `panel-enable-all' mode is not available. These are the panel minor modes: `ESC e o' Display the entry owner and group (`panel-enable-owner-group'). `ESC e d' Display the entry date and time (`panel-enable-date-time'). `ESC e s' Display the entry size (`panel-enable-size'). `ESC e S' Display the entry size, scaled (e.g. `123M') (`panel-enable-abbrevsize'). `ESC e m' Display the entry mode (`panel-enable-mode'). `ESC e f' Display the entry full name (`panel-enable-full-name'). `ESC e a' Display the entire information about file (`panel-enable-all'). This mode is only available if the panel has been enlarged to use the entire screen with `enlarge-panel' or `enlarge-other-panel' (`panel-enable-all'). There is another way of changing the panel minor modes: `^]', `^[]' Switches to the next panel minor mode (`panel-enable-next-mode').  File: gnuit.info, Node: Sorting, Next: Moving, Prev: Modes, Up: gitfm 3.1.4 Sorting methods --------------------- Entries in a panel can be sorted in different ways. These are the available options: `ESC s n' Display the panel entries sorted by their names (`panel-sort-by-name'). `ESC s e' Display the panel entries sorted by their extensions (`panel-sort-by-extension'). `ESC s s' Display the panel entries sorted by their sizes (`panel-sort-by-size'). `ESC s d' Display the panel entries sorted by their `last modified' stamps (`panel-sort-by-date'). `ESC s m' Display the panel entries sorted by their modes (`panel-sort-by-mode'). `ESC s o i' Display the panel entries sorted by their owner ids (`panel-sort-by-owner-id'). `ESC s g i' Display the panel entries sorted by their group ids (`panel-sort-by-group-id'). `ESC s o n' Display the panel entries sorted by their owner names (`panel-sort-by-owner-name'). `ESC s g n' Display the panel entries sorted by their group names (`panel-sort-by-group-name'). There is also another way to change the sort method: `ESC s u' Switch to the next panel sort method (`panel-sort-next-method').  File: gnuit.info, Node: Moving, Next: Selecting, Prev: Sorting, Up: gitfm 3.1.5 Moving the cursor in the panel ------------------------------------ Moving the cursor in the panel is very easy. If your keyboard has arrows, use them. If the arrow keys don't work (it might be due to a badly configured TERM environment variable), you can use the Emacs commands bindings as well. `UP', `^P' Move the cursor vertically up one entry (`previous-line'). `DOWN', `^N' Move the cursor vertically down one entry (`next-line'). `HOME', `ESC <' Move the cursor on the first entry in the panel (`beginning-of-panel'). `END', `ESC >' Move the cursor on the last entry in the panel (`end-of-panel'). `PGUP', `ESC v' Move the cursor vertically down one page (`scroll-down'). `PGDOWN', `^V' Move the cursor vertically down one page (`scroll-up'). `ESC g' Scroll the panel entries to the left (`horizontal-scroll-left'). `ESC j' Scroll the panel entries to the right (`horizontal-scroll-right'). `^X P' In order to optimize the screen output, you can modify the scroll step (`set-scroll-step'). This is the number of lines to try scrolling a panel when the cursor moves out. The `StartupScrollStep' specifies the initial scroll step, but using `set-scroll-step' you can dynamically change it. `TAB', `^I', `^X o' Move the cursor in the other panel (`other-panel'). `^X P' Switch the two panels. This command works even when `gitfm' is not in the `two panels' mode (`switch-panels').  File: gnuit.info, Node: Selecting, Next: Isearch, Prev: Moving, Up: gitfm 3.1.6 Selecting files --------------------- `INS', `^T', `^X \', `^\' Toggle the `selected' flag of the current entry (`select-entry'). `^C s' Select (marks) all the files matching at least one pattern from a space separated list of shell patterns. Spaces and \s are allowed in the patterns but they have to be escaped with a \. The user will be prompted for a pattern to match against (`select-files-matching-pattern'). `^C u' Unselect (unmarks) all the files matching at least one pattern from a space separated list of shell patterns. Spaces and \s are allowed in the patterns but they have to be escaped with a \. The user will be prompted for a pattern to match against (`unselect-files-matching-pattern'). `ESC +' Select (marks) all the files having the same extension as the current file. If the current file name doesn't have an extension or starts with a dot, no files are selected (`select-extension'). `ESC -' Unselect (unmarks) all the files having the same extension as the current file. If the current file name doesn't have an extension or starts with a dot, no files are unselected (`unselect-extension'). *Note Selecting Files::, for additional ways of selecting and unselecting files.  File: gnuit.info, Node: Isearch, Next: Input Line, Prev: Selecting, Up: gitfm 3.1.7 Incremental searching files in a panel -------------------------------------------- Users sometime need to search a file in a panel, especially when the panel contains a big number of entries. For that reason `gitfm' provides an incremental search feature. Using forward and backward incremental search, files can be very easy located. Wrapped incremental search is also provided. `^S', `^Xs' Incremental search forward a file name in the current panel (`isearch-forward'). Pressing `^S' or `^Xs' again will force `gitfm' to go to the next entry that matches the current isearched string. When the end of the panel is reached, the isearch is restarted from its beginning. `^R', `^Xr' Incremental search backward a file name in the current panel (`isearch-backward'). Pressing `^R' or `^Xr' again will force `gitfm' to go to the next entry that matches the current isearched string. When the beginning of the panel is reached, the isearch is restarted from its end.  File: gnuit.info, Node: Input Line, Next: Files, Prev: Isearch, Up: gitfm 3.1.8 Using the input line -------------------------- The input line is one of the main methods used by `gitfm' to interact with the user. All the answers the user should give in order to perform some operation and all the shell like commands are built using it. So here is a description of all the basic editing operations that the `input line' provides. They are very much inspired from `Emacs', so `Emacs' users should have no problem using them. * Menu: * Inserting Text:: Inserting text by simply typing it. * Moving Point:: How to move the cursor to the place where you want to change something. * Erasing:: Deleting and killing text. * Case Changes:: Case conversion of words. * History:: Reusing recent input line arguments. * Setting Mark:: Commands to set the mark. * Yanking:: Reinserting recently killed text. * Selecting Files:: Selecting files matching patterns.  File: gnuit.info, Node: Inserting Text, Next: Moving Point, Up: Input Line 3.1.8.1 Inserting Text ...................... Typing characters is the most usual way of inserting text into the input line. Key sequences starting with printable ascii characters are not allowed in `gitfm' so typing `a' for example results in inserting `a' at the current point position. Of course, there are some other ways of inserting text into the command line and here there is a description of most of them. `ESC RET' Copy the current entry name into the input line at the current point position (`entry-to-input-line'). `ESC ESC RET' Copy the other panel path into the input line at the current point position (`other-path-to-input-line'). `^X ^I' Copy the names of all the selected entries into the input line at the current point position (`selected-entries-to-input-line').  File: gnuit.info, Node: Moving Point, Next: Erasing, Prev: Inserting Text, Up: Input Line 3.1.8.2 Moving Point .................... `^B', `LEFT' Move the point backward one character (`backward-char'). `^F', `RIGHT' Move the point forward one character (`forward-char'). `ESC b' Move the point one word backward (`backward-word'). `ESC f' Move the point one word forward (`forward-word'). `^A' Move the cursor at the beginning of the input line (`beginning-of-line'). `^E' Move the cursor at the end of the input line (`end-of-line').  File: gnuit.info, Node: Erasing, Next: Case Changes, Prev: Moving Point, Up: Input Line 3.1.8.3 Deleting and killing text ................................. `DEL', `^D' Delete the character under the cursor (`delete-char'). `^H', `BKSPC' Delete the character before the cursor (`backward-delete-char'). `ESC BKSPC' Delete backward one word (`backward-kill-word'). `ESC d' Delete forward one word (`kill-word'). `ESC k' Delete the entire line (`kill-line'). `^U' Delete all the characters between the beginning of the input line and the point (`kill-to-beginning-of-line'). `^K' Delete all the characters between the point and the end of the input line (`kill-to-end-of-line'). `ESC SPC' Delete all the spaces around the point, leaving only one space (`just-one-space'). `ESC \' Delete all the spaces around the point (`delete-horizontal-space'). `^W' Save the region between the point and the mark into the kill "ring" and then kills it (`kill-region'). Note that there is no real kill-ring here. The so-called kill-ring has only one entry. `ESC w' Save the region between the point and the mark without killing it (`kill-ring-save').  File: gnuit.info, Node: Case Changes, Next: History, Prev: Erasing, Up: Input Line 3.1.8.4 Case conversion of words. ................................. `ESC l' Convert the following word to lower case, moving over. (`downcase-word'). `ESC u' Convert the following word to upper case, moving over. (`upcase-word'). `ESC c' Capitalize the following word, moving over. (`capitalize-word').  File: gnuit.info, Node: History, Next: Setting Mark, Prev: Case Changes, Up: Input Line 3.1.8.5 Reusing recent input line arguments ........................................... A separate history is kept for both built-in and user-defined commands. If you call a command that you have used before, you can re-edit a previously entered string in order to minimize the amount of characters needed to be typed for the new one. There is no limit on the number of strings that can be kept in the history. `ESC p' Walk backward through the history of previously entered strings (`previous-history-element'). `ESC n' Walk forward through the history of previously entered strings (`next-history-element').  File: gnuit.info, Node: Setting Mark, Next: Yanking, Prev: History, Up: Input Line 3.1.8.6 Commands to set the mark ................................ `^SPC' Set the mark at the current point position (`set-mark'). `^X ^X' Exchange the current point position with the mark one (`exchange-point-and-mark').  File: gnuit.info, Node: Yanking, Next: Selecting Files, Prev: Setting Mark, Up: Input Line 3.1.8.7 Reinserting recently killed text ........................................ `^Y' Reinsert a previously killed text at the current point position (`yank').  File: gnuit.info, Node: Selecting Files, Prev: Yanking, Up: Input Line 3.1.8.8 Selecting files matching patterns ......................................... If the very first character in the input line is a `+', what comes after it is considered a (space separated) list of shell patterns, and all the files that match at least one pattern from that list will be marked as selected. An empty list of shell patterns (i.e. the `+' by itself) will cause all the files to be selected. If the very first character in the input line is a `-', the space separated list of shell patterns that follows is used to unselect files. An empty list of shell patterns (i.e. the `-' by itself) will cause all the selected files to be unselected. Finally, if the first and only character in the input line is a `*', then all the selected files will become unselected, and all the unselected files will become selected.  File: gnuit.info, Node: Files, Next: Directories, Prev: Input Line, Up: gitfm 3.1.9 File operations --------------------- * Menu: * Copying Files:: How to copy files. * Moving Files:: How to move files. * Creating Files:: How to create new files. * Deleting Files:: How to delete files. * Linking Files:: How to create hard and symbolic links. * Renaming Files:: How to rename files. * Splitting Files:: How to split files into smaller parts. * Packing Files:: How to pack files in the min. number of bins. * Inode:: How to change a file's mode, owner, group. * Editing Files:: How to edit and create files. Default editor. * Viewing Files:: How to view files. Default viewer. * Compressing Files:: How to compress and decompress files. * Encoding Files:: How to uuencode/uudecode, mpack/munpack a file. * Encrypting Files:: How to encrypt/decrypt files with pgp. * Comparing Files:: How to compare two files. * Spell Checking Files:: How to spell check a file. * Printing Files:: How to print files. * Wiping Files:: How to wipe a file. * Searching Files:: How to search a file. * Archive Files:: How to manage tar based archive files. * DEB Packages:: How to work with DEB packages. * RPM Packages:: How to install and uninstall RPM packages. * File Types:: How to figure out the file type. * MSDOS Files:: How to access msdos floppies. * Actions:: A different action for each file type.  File: gnuit.info, Node: Copying Files, Next: Moving Files, Up: Files 3.1.9.1 Copying Files ..................... `F5', `ESC 5', `^C C' Copy the currently selected entries to the user supplied path (`copy'). `^C b C' Copy the currently selected entries to the user supplied path. The operation is performed in background (`B-COPY').  File: gnuit.info, Node: Moving Files, Next: Creating Files, Prev: Copying Files, Up: Files 3.1.9.2 Moving Files .................... `F6', `ESC 6', `^C T' Move the currently selected entries to the user supplied path (`move'). `^C b T' Move the currently selected entries to the user supplied path. The operation is performed in background (`B-MOVE').  File: gnuit.info, Node: Creating Files, Next: Deleting Files, Prev: Moving Files, Up: Files 3.1.9.3 Creating Files ...................... The easiest way to create a new file is to start an editor passing the file name as an argument. Most editors will try to create the file if the file doesn't exist. *Note Editing Files::, for more information.  File: gnuit.info, Node: Deleting Files, Next: Linking Files, Prev: Creating Files, Up: Files 3.1.9.4 Deleting Files ...................... `F8', `ESC 8', `^C D' Delete the currently selected entries (`delete'). `^C b D' Delete the currently selected entries. The operation is performed in background (`B-DELETE').  File: gnuit.info, Node: Linking Files, Next: Renaming Files, Prev: Deleting Files, Up: Files 3.1.9.5 Linking Files ..................... `^C H' Create a hard link from the current files to a user supplied file name (`LINK'). `^C b H' Create a hard link from the current files to a user supplied file name (`B-LINK'). The action is performed in background. `^C S' Create a symbolic link from the current files to a user supplied file name (`SYMLINK'). `^C b S' Create a symbolic link from the current files to a user supplied file name (`B-SYMLINK'). The action is performed in background.  File: gnuit.info, Node: Renaming Files, Next: Splitting Files, Prev: Linking Files, Up: Files 3.1.9.6 Renaming Files ...................... `^C R' Rename the current file or directory with the user supplied name (`RENAME'). `^C b R' Rename the current file or directory with the user supplied name. The operation is performed in background (`B-RENAME'). `^C n d' Change the name of all the selected entries to lowercase. (`name-downcase'). `^C n u' Change the name of all the selected entries to uppercase. (`name-upcase').  File: gnuit.info, Node: Splitting Files, Next: Packing Files, Prev: Renaming Files, Up: Files 3.1.9.7 Splitting files into smaller parts .......................................... `^C /' Split the current file into several smaller files of a given size and named based on a given prefix (`SPLIT'). `^C b /' Split the current file into several smaller files of a given size and named based on a given prefix. The operation is performed in background (`B-SPLIT').  File: gnuit.info, Node: Packing Files, Next: Inode, Prev: Splitting Files, Up: Files 3.1.9.8 Packing files into the minimum number of bins ..................................................... `^C ~' Pack the files into the smallest number of bins. This is an approximation - the problem is NP-complete and no known algorithm can guarantee a solution better than `(11/9) * OPTIMAL + 4'. To make things even worse, for large files, there is no portable way to predict how many blocks the file system implementation will require for indirect blocks, directories, etc. So keep in mind that this is only an approximation. Bin packing can be useful when you want to put a bunch of files on floppies or zip disks and you want to optimize things a little bit (`bin-packing'). `gitfm' assumes that you want to pack all the files in the current directory - if there is any selected file in that directory it will be unselected first. Then `gitfm' will ask for a bin size, and select the files that should go in the first bin. You are supposed to place those files in the first bin (e.g. a tar archive), remove them from the current directory, then run `bin-packing' again, to obtain the list of the files that should go into the second bin, etc.  File: gnuit.info, Node: Inode, Next: Editing Files, Prev: Packing Files, Up: Files 3.1.9.9 Changing a file's mode, owner and group ............................................... `^C M' Change the mode of the currently selected entries (`CHMOD'). `^C b M' Change the mode of the currently selected entries. The operation is performed in background (`B-CHMOD'). `^C r M' Recursively change the modes of the selected entries if one of them is a directory (`R-CHMOD'). `^C b r M' Recursively change the modes of the selected entries if one of them is a directory. The operation is performed in background (`B-R-CHMOD'). `^C O' Change the owner of the currently selected entries (`CHOWN'). `^C b O' Change the owner of the currently selected entries. The operation is performed in background (`B-CHOWN'). `^C r O' Recursively change the owners of the selected entries if one of them is a directory (`R-CHOWN'). `^C b r O' Recursively change the owners of the selected entries if one of them is a directory. The operation is performed in background (`B-R-CHOWN'). `^C G' Change the group of the currently selected entries (`CHGRP'). `^C b G' Change the group of the currently selected entries. The operation is performed in background (`B-CHGRP'). `^C r G' Recursively change the groups of the selected entries if one of them is a directory (`R-CHGRP'). `^C b r G' Recursively change the groups of the selected entries if one of them is a directory. The operation is performed in background (`B-R-CHGRP').  File: gnuit.info, Node: Editing Files, Next: Viewing Files, Prev: Inode, Up: Files 3.1.9.10 Editing Files ...................... `F4', `ESC 4' Call the default editor with the current file name as an argument (`EDIT'). `^X e' Call the default editor with the selected entry names as arguments (`MULTIPLE-EDIT'). `^X ^F' Create a new file by calling the default editor with the user supplied file name as an argument (`FILE-CREATE'). `^X 4 a' Call the default editor in order to edit the `ChangeLog' file (`CHANGE-LOG'). The default editor can be specified using the EDITOR or GNUIT_EDITOR environment variables. *Note Environment Variables::, for more information. $GNUIT_EDITOR used to be called $GIT_EDITOR. The old name is still accepted for backwards-compatibility.  File: gnuit.info, Node: Viewing Files, Next: Compressing Files, Prev: Editing Files, Up: Files 3.1.9.11 Viewing Files ...................... `F3', `ESC 3' Call the default viewer (`gitview') with the current file name as argument (`VIEW'). `^X v' Call the default pager (`more') with the currently selected entry names as arguments (`MULTIPLE-VIEW').  File: gnuit.info, Node: Compressing Files, Next: Encoding Files, Prev: Viewing Files, Up: Files 3.1.9.12 Compressing Files .......................... `^C z' Compress the currently selected entries with `gzip' (`COMPRESS'). `^C b z' Compress the currently selected entries with `gzip'. The operation is performed in background (`B-COMPRESS'). `^C Z' Uncompress the currently selected entries with `gunzip' (`UNCOMPRESS'). `^C b Z' Uncompress the currently selected entries with `gunzip'. The operation is performed in background (`B-UNCOMPRESS'). `^C f Z' Uncompress the currently selected entries with `gunzip' (`F-UNCOMPRESS'). Force uncompression of links. `^C b f Z' Uncompress the currently selected entries with `gunzip'. Force uncompression of links. The operation is performed in background (`BF-UNCOMPRESS'). `^C .' Compress the currently selected entries with `bzip2' (`BZIP2-COMPRESS'). `^C b .' Compress the currently selected entries with `bzip2'. The operation is performed in background (`B-BZIP2-COMPRESS'). `^C o' Uncompress the currently selected entries with `bunzip2' (`BZIP2-UNCOMPRESS'). `^C b o' Uncompress the currently selected entries with `bunzip2'. The operation is performed in background (`B-BZIP2-UNCOMPRESS').  File: gnuit.info, Node: Encoding Files, Next: Encrypting Files, Prev: Compressing Files, Up: Files 3.1.9.13 Encoding Files ....................... `^C e' Encode the currently selected file (`UUENCODE'). `^C b e' Encode the currently selected file. The operation is performed in background (`B-UUENCODE'). `^C E' Decode the currently selected file (`UUDECODE'). `^C b E' Decode the currently selected file. The operation is performed in background (`B-UUDECODE'). `^C k' Encode the currently selected file using mpack (`MIME-PACK'). `^C b k' Encode the currently selected file using mpack. The operation is performed in background (`B-MIME-PACK'). `^C K' Decode the currently selected file using munpack (`MIME-UNPACK'). `^C b K' Decode the currently selected file using munpack. The operation is performed in background (`B-MIME-UNPACK').  File: gnuit.info, Node: Encrypting Files, Next: Comparing Files, Prev: Encoding Files, Up: Files 3.1.9.14 Encrypting Files ......................... `^C p' Encrypt (using `pgp') the current file (`ENCRYPT'). `^C P' Decrypt (using `pgp') the current file (`DECRYPT').  File: gnuit.info, Node: Comparing Files, Next: Spell Checking Files, Prev: Encrypting Files, Up: Files 3.1.9.15 Comparing Files ........................ `^C =' Compare (using `diff') the current ASCII file with the other panel's current file (`DIFF'). If both entries are directories, a recursive diff is performed. `^C ESC =' Compare (using `diff') the current ASCII file with its latest backup. The latest backup is the file having the same name and a '~' at the end (`LAST-BACKUP-DIFF'). `^C B' Compare the current file with the other panel current file. A binary comparison is performed (`compare').  File: gnuit.info, Node: Spell Checking Files, Next: Printing Files, Prev: Comparing Files, Up: Files 3.1.9.16 Spell Checking Files ............................. `^X I' Run the `ispell' command with the current file name as an argument.  File: gnuit.info, Node: Printing Files, Next: Wiping Files, Prev: Spell Checking Files, Up: Files 3.1.9.17 Printing Files ....................... `^C j' Print the selected files via `lpr' to the user specified printer or to the default one if no `lpr' options are given (`PRINT-JOB'). `^C J' Print the list of active printing jobs via `lpq'. The default printer is queried if no `lpq' options are given (`PRINT-JOB-LIST').  File: gnuit.info, Node: Wiping Files, Next: Searching Files, Prev: Printing Files, Up: Files 3.1.9.18 Wiping Files ..................... `^C W' Call `gitwipe' to wipe the selected files. Asks for confirmation before actually wiping them in order to avoid errors (`WIPE'). *Note gitwipe::, for more information.  File: gnuit.info, Node: Searching Files, Next: Archive Files, Prev: Wiping Files, Up: Files 3.1.9.19 Searching Files ........................ `ESC %' Search files on the file system, starting from the current directory (`FIND'). `ESC &' Use 'locate' to search files on the file system, starting from the current directory (`LOCATE'). `^X w' Locate the binary, source, and manual page files for a command (`WHEREIS'). `^X W' Locate a command; display its pathname or alias (`WHICH').  File: gnuit.info, Node: Archive Files, Next: DEB Packages, Prev: Searching Files, Up: Files 3.1.9.20 Managing tar based archive files ......................................... `^C a' Create a `tar' archive containing all the currently selected entries (`TAR'). `^C b a' Create a `tar' archive containing all the currently selected entries. The operation is performed in background (`B-TAR'). `^C x' Create a compressed `tar' archive containing the current entry, provided it is a directory (`TAR-COMPRESS'). `^C b x' Create a compressed `tar' archive containing the current entry, provided it is directory. The operation is performed in background (`B-TAR-COMPRESS'). `^C -' Create a bzip2 compressed `tar' archive containing the current entry, provided it is a directory (`TAR-BZIP2'). `^C b -' Create a bzip2 compressed `tar' archive containing the current entry, provided it is a directory. The operation is performed in background (`B-TAR-BZIP2'). `^C X' Expand the selected archives into the current directory. The utility used is selected based on the extension of the file (`GENERIC-UNPACK'). `^C b X' Expand the selected archives into the current directory. The utility used is based on the extension of the file. The operation is performed in background (`B-GENERIC-UNPACK'). `^C V' Expand the selected archives into an user supplied current directory. The utility used is selected based on the extension of the file (`GENERIC-UNPACK-INTO'). `^C b V' Expand the selected archives into an user supplied directory. The utility used is based on the extension of the file. The operation is performed in background (`B-GENERIC-UNPACK-INTO').  File: gnuit.info, Node: DEB Packages, Next: RPM Packages, Prev: Archive Files, Up: Files 3.1.9.21 Working with DPKG .......................... `dpkg' provides commands for manipulating and querying the dpkg database, `gitfm''s DPKG commands allow quick access to most of those which operate on binary packages, files, or require package names as arguments. All commands expecting package names can also be given binary packages, the package names will be automatically extracted. Most commands use their single character `dpkg' option letter as the key command. `^C ^D i' Install the `deb' file(s) selected or pointed by the cursor (`DPKG-INSTALL'). `^C ^D R i' Recursively install the `deb' file(s) in the directories selected or pointed by the cursor (`R-DPKG-INSTALL'). `^C ^D u' Unpack the `deb' file(s) selected or pointed by the cursor, but don't configure it (`DPKG-UNPACK'). `^C ^D R u' Recursively unpack the `deb' file(s) in the directories selected or pointed by the cursor, but don't configure them (`R-DPKG-UNPACK'). `^C ^D C' Configure the unpacked package(s) selected or pointed by the cursor (`DPKG-CONFIGURE'). `^C ^D r' Remove the package(s) selected or pointed by the cursor (`DPKG-REMOVE'). `^C ^D P' Purge the package(s) selected or pointed by the cursor (`DPKG-PURGE'). `^C ^D A' Update dpkg and dselect's idea of which packages are available with information from the `deb' file(s) selected or pointed by the cursor (`DPKG-RECORDAVAIL'). `^C ^D R A' Recursively update dpkg and dselect's idea of which packages are available with information from the `deb' file(s) in the directories selected or pointed by the cursor (`R-DPKG-RECORDAVAIL'). `^C ^D h' Display quick help file for GITFM's DPKG commands. (`DPKG-HELP'). `^C ^D c' Lists the contents of the filesystem tree archive portion of the `deb' file pointed by the cursor (`DPKG-CONTENTS'). `^C ^D f' Extracts control file information from a `deb' file pointed by the cursor (`DPKG-FIELD'). You are presented with the file name and can either hit ENTER to see all fields, or add control file field names (space separated) to see only those fields. `^C ^D I' Provides information about a `deb' file pointed by the cursor (`DPKG-INFO'). `^C ^D l' List the package(s) selected or pointed by the cursor (`DPKG-LISTPKGS'). `^C ^D s' Display status details for the package(s) selected or pointed by the cursor (`DPKG-STATUS'). `^C ^D L' List files owned by the package(s) selected or pointed by the cursor (`DPKG-LISTFILES'). `^C ^D S' Find package owning file pointed to by the cursor (`DPKG-SEARCH'). `^C ^D p' Display available version details of package(s) selected or pointed by the cursor (`DPKG-PRINTAVAIL').  File: gnuit.info, Node: RPM Packages, Next: File Types, Prev: DEB Packages, Up: Files 3.1.9.22 Installing and Uninstalling RPM packages ................................................. Red Hat Linux Distributions use a very powerful package manager called `rpm'. It is used whenever you need to install/remove/upgrade/etc a software package. The packages used by `rpm' use the extension `.rpm'. `gitfm' provides default key bindings for some of the basic operations `rpm' can perform on packages: install, uninstall, upgrade and query. `^C I' Install the `rpm' package pointed by the cursor (`RPM-INSTALL'). `^C b I' Install the `rpm' package pointed by the cursor (`B-RPM-INSTALL'). The operation is performed in background. `^C i' Uninstall the `rpm' package pointed by the cursor (`RPM-UNINSTALL'). `^C b i' Uninstall the `rpm' package pointed by the cursor (`B-RPM-UNINSTALL'). The operation is performed in background. `^C N' Upgrade the `rpm' package pointed by the cursor (`RPM-UPGRADE'). `^C b N' Upgrade the `rpm' package pointed by the cursor (`B-RPM-UPGRADE'). The operation is performed in background. `^C q' Query the `rpm' package manager (`RPM-QUERY'). The default options used are `-qil'. See the `rpm' manual page for more details on using `rpm'.  File: gnuit.info, Node: File Types, Next: MSDOS Files, Prev: RPM Packages, Up: Files 3.1.9.23 File Types ................... `^C t' Print the type of a file using the `file' utility (`FILE-TYPE').  File: gnuit.info, Node: MSDOS Files, Next: Actions, Prev: File Types, Up: Files 3.1.9.24 Accessing MSDOS Files .............................. `^C m d', `^C m ^D' Change the current `MSDOS' directory to a given directory (`MTOOLS-CHDIR'). `^C m P' Put the currently selected files on a `MSDOS' floppy (`MTOOLS-PUT'). `^C b m P' Put the currently selected files on a `MSDOS' floppy (`B-MTOOLS-PUT'). The operation is performed in background. `^C m G' Get some files from a `MSDOS' floppy and put them in a given directory (`MTOOLS-GET'). `^C b m G' Get some files from a `MSDOS' floppy and put them in a given directory (`B-MTOOLS-GET'). The operation is performed in background. `^C m D' Delete files from a `MSDOS' floppy (`MTOOLS-DELETE'). `^C b m D' Delete files from a `MSDOS' floppy (`B-MTOOLS-DELETE'). The operation is performed in background. `^C m L' List files and directories on a `MSDOS' floppy (`MTOOLS-DIR'). `^C m F' Format a `MSDOS' floppy (`MTOOLS-FORMAT'). `^C b m F' Format a `MSDOS' floppy (`B-MTOOLS-FORMAT'). The operation is performed in background. `^C m M' Create a directory on a `MSDOS' floppy (`MTOOLS-MKDIR'). `^C b m M' Create a directory on a `MSDOS' floppy (`B-MTOOLS-MKDIR'). The operation is performed in background. `^C m K' Remove a directory from a `MSDOS' floppy (`MTOOLS-RMDIR'). All the files and subdirectories in that directory are removed as well. `^C b m K' Remove a directory from a `MSDOS' floppy (`B-MTOOLS-RMDIR'). All the files and subdirectories in that directory are removed as well. The operation is performed in background. `^C m R' Rename a file or directory on a `MSDOS' floppy (`MTOOLS-RENAME'). `^C b m R' Rename a file or directory on a `MSDOS' floppy (`B-MTOOLS-RENAME'). The operation is performed in background. `^C m T' Display the contents of a file located on a `MSDOS' floppy (`MTOOLS-TYPE').  File: gnuit.info, Node: Actions, Prev: MSDOS Files, Up: Files 3.1.9.25 A different action for each file type .............................................. Many files on `UNIX' systems have one or more extensions specifying their types. For example, a file that ends in `.c' is a file containing a `C' program, while a file ending in `.tar.gz' is a `tar' archive compressed with the `gzip' utility. Having a default action for each file type, binded on the same key, seems to be a good idea because you can use that key to obtain type specific information about a file or to process it in some type specific way much easier. The `GNUIT' package contains a script called `gitaction' that is used to detect the current file type and perform a type specific action. *Note gitaction::, for more information. `F2', `ESC 2', `^X a' Perform an action on the current file, depending on its type (`FILE-ACTION').  File: gnuit.info, Node: Directories, Next: Compiling, Prev: Files, Up: gitfm 3.1.10 Directory operations --------------------------- * Menu: * Creating Dirs:: How to create new directories. * Copying Dirs:: How to copy directories. * Deleting Dirs:: How to delete directories. * Moving Dirs:: How to move directories. * Renaming Dirs:: How to rename directories. * Comparing Dirs:: How to compare directories. * Dirs Usage:: Summarize directory usage. * Changing Dirs:: How to go to a new directory. * Dirs History:: How to use the directory history. * Hot Keys:: Hot keys for the most used directories.  File: gnuit.info, Node: Creating Dirs, Next: Copying Dirs, Up: Directories 3.1.10.1 Creating directories ............................. `F7', `ESC 7', `^X M' Create a new subdirectory in the current directory with the user supplied name (`make-directory').  File: gnuit.info, Node: Copying Dirs, Next: Deleting Dirs, Prev: Creating Dirs, Up: Directories 3.1.10.2 Copying directories ............................ `F5 (for directories)', `ESC 5 (for directories)', `^C C (for directories)' Copy the currently selected entries to the user supplied path (`copy'). `^C b C (for directories)' Copy the currently selected entries to the user supplied path. The operation is performed in background (`B-COPY').  File: gnuit.info, Node: Deleting Dirs, Next: Moving Dirs, Prev: Copying Dirs, Up: Directories 3.1.10.3 Deleting directories ............................. `F8 (for subdirectories)', `ESC 8 (for directories)', `^C D (for subdirectories)' Delete the currently selected entries (`delete'). `^C b D (for directories)' Delete the currently selected entries. The operation is performed in background (`B-DELETE').  File: gnuit.info, Node: Moving Dirs, Next: Renaming Dirs, Prev: Deleting Dirs, Up: Directories 3.1.10.4 Moving directories ........................... `F6 (for directories)', `ESC 6 (for directories)', `^C T (for directories)' Move the currently selected entries to the user supplied path (`move'). `^C b T (for directories)' Move the currently selected entries to the user supplied path. The operation is performed in background (`B-MOVE').  File: gnuit.info, Node: Renaming Dirs, Next: Comparing Dirs, Prev: Moving Dirs, Up: Directories 3.1.10.5 Renaming directories ............................. `^C R (for directories)' Rename the current file or directory with the user supplied name (`RENAME'). `^C b R (for directories)' Rename the current file or directory with the user supplied name. The operation is performed in background (`B-RENAME').  File: gnuit.info, Node: Comparing Dirs, Next: Dirs Usage, Prev: Renaming Dirs, Up: Directories 3.1.10.6 Comparing Directories .............................. `^C c q' Quickly compare the files in the left panel with the files in the right one. Only the file names, sizes and time stamps are considered in the comparison. `^C c t' Compare the files in the left panel with the files in the right one. The contents of each file in the current panel will be compared against the contents of its counterpart (if any) from the other panel. `^C f d' Recursively compare (using `diff -r -q') the current directory with the other panel's current directory (`FAST-DIFF'). Print on standard output the names of the files that differ. `^C d' Compare (using `diff') the current directory with the other panel current directory. For successful operation, both panels should contain the same directory (`DIR-DIFF'). `^C b d' Compare (using `diff') the current directory with the other panel current directory. For successful operation, both panels should contain the same directory. The operation is performed in background (`DIR-DIFF').  File: gnuit.info, Node: Dirs Usage, Next: Changing Dirs, Prev: Comparing Dirs, Up: Directories 3.1.10.7 Summarize directory usage .................................. `^C U' Display the output of the `du -s' command on the status line (`DIRECTORY-USAGE').  File: gnuit.info, Node: Changing Dirs, Next: Dirs History, Prev: Dirs Usage, Up: Directories 3.1.10.8 Changing directories ............................. `^X d', `^X ^D' Change the current working directory. The user is asked for a new directory name and the new directory is added to the directory history (`change-directory'). *Note Dirs History::, for more information. `ESC a c' Change the current directory of the current panel to the directory of the other panel (`adapt-current-directory'). `ESC a o' Change the current directory of the other panel to the directory of the current panel (`adapt-other-directory').  File: gnuit.info, Node: Dirs History, Next: Hot Keys, Prev: Changing Dirs, Up: Directories 3.1.10.9 Directory History .......................... Users usually work on a limited set of subdirectories. Providing a fast method of switching between a number of intensively used directories is a good idea and `gitfm' has a set of builtin commands for doing it. Usually new directories are added to the directory history when the `change-directory' built-in command is used. `gitfm' also adds the current directory to the history list when started, when the directory history is reset and when a command having a non empty `new-dir' field successfully completes its execution. *Note new-dir::, for more information. `^X ^N' Go to the next directory in the history (`next-directory'). `^X ^P' Go to the previous directory in the history (`previous-directory'). `^X ^R' Reset the entire directory history. As explained above, the current directory becomes the only directory in the history (`reset-directory-history').  File: gnuit.info, Node: Hot Keys, Prev: Dirs History, Up: Directories 3.1.10.10 Hot Keys .................. `gitfm' provides default key bindings for switching to a number of important directories as "/", "..", "$HOME", etc. `ESC /' Go to the `/' directory (`ROOT-DIR'). `ESC .' Go to the `..' directory (`up-one-dir'). `ESC h' Go to the `~' ($HOME) directory (`HOME-DIR'). `ESC i' Go to the `/usr/include' directory (`INCLUDE-DIR'). `ESC ESC 1' Go to the `/mnt/fd0' directory (`FIRST-FLOPPY-DIR'). `ESC ESC 2' Go to the `/mnt/fd1' directory (`SECOND-FLOPPY-DIR').  File: gnuit.info, Node: Compiling, Next: Mail, Prev: Directories, Up: gitfm 3.1.11 Compiling programs ------------------------- `F9', `ESC 9', `^X m' Run the `make' command in the current directory. Use -k as the default option (`MAKE'). `^X b m' Run the `make' command in background in the current directory (`B-MAKE'). *Note gitaction::, for more information.  File: gnuit.info, Node: Mail, Next: Shell, Prev: Compiling, Up: gitfm 3.1.12 Sending/receiving ascii/binary mail ------------------------------------------ `^C 2 a' Send the current current ascii file by mail to an user supplied email address (`ASCII-MAIL'). `^C b 2 a' The same as `ASCII-MAIL', the only difference being that the command runs in background (`B-ASCII-MAIL'). `^C 2 b' Send the current current binary file by mail to an user supplied list of email addresses. The file is uuencoded first (`BINARY-MAIL'). `^C b 2 b' The same as `BINARY-MAIL', the only difference being that the command runs in background (`B-BINARY-MAIL'). `^C 2 m' Send the current current binary file by mail to an user supplied list of email addresses. The file is encoded with mpack first (`MIME-MAIL'). `^C b 2 m' The same as `MIME-MAIL', the only difference being that the command runs in background (`B-MIME-MAIL'). `ESC x r m' Run the `emacs -f rmail' command. This will start the Emacs's `rmail' function so that you can read your mail (`READ-MAIL').  File: gnuit.info, Node: Shell, Next: Grep, Prev: Mail, Up: gitfm 3.1.13 Starting a sub-shell --------------------------- `^X z' Call a sub-shell as specified by the $GNUIT_SHELL environment variable (`SUB-SHELL'). $GNUIT_SHELL used to be called $GIT_SHELL. The old name is still accepted for backwards-compatibility. *Note Environment Variables::, for more information.  File: gnuit.info, Node: Grep, Next: Locking, Prev: Shell, Up: gitfm 3.1.14 Using grep and recursive grep ------------------------------------ `^X g' Search using `grep' all the selected files for a given pattern (`GREP'). `^X g' Search recursively using `gitrgrep' all the user specified files and directories for a given pattern (`RECURSIVE-GREP'). *Note gitrgrep::, for more information.  File: gnuit.info, Node: Locking, Next: Refreshing, Prev: Grep, Up: gitfm 3.1.15 Locking your console --------------------------- Having a lock feature might be a good idea and, since not all the `UNIX' systems provide one, `gitfm' tries to get around the problem ... `^X p' Prompt the user for a password and locks the console until the same password is reinserted (`lock').  File: gnuit.info, Node: Refreshing, Next: Resetting, Prev: Locking, Up: gitfm 3.1.16 Refreshing the screen contents ------------------------------------- Sometimes your screen needs to be refreshed. Just think about what happens when somebody wants to talk with you and the talk daemon writes something like this Message from Talk_Daemon@galei.cs.vu.nl at 12:15 ... talk: connection requested by andrei@galei.cs.vu.nl. talk: respond with: talk andrei@galei.cs.vu.nl on your screen. And sometimes you might also want to re-read the current directories. `gitfm' provides a built-in command for refreshing the screen contents. `^L' Re-read the directories contents and refresh the screen (`refresh').  File: gnuit.info, Node: Resetting, Next: Mounting, Prev: Refreshing, Up: gitfm 3.1.17 Resetting your terminal ------------------------------ `^X ^L' Call `reset' in order to reset the terminal to its default settings (`TTY-RESET').  File: gnuit.info, Node: Mounting, Next: Sysinfo, Prev: Resetting, Up: gitfm 3.1.18 Mounting/unmounting file systems --------------------------------------- People dealing with lots of files usually need to save/restore/copy files from/to other file systems. In order to be more efficient, `gitfm' provides a set of key bindings for mounting and unmounting file systems. *Note gitmount::, for more information. The default key bindings set has been designed to work under `Linux', but it can be easily changed for other `UNIX' systems with different device names. Reading the configuration file `gnuitrc.common' should be enough. *Note Hot Keys::, for more information. As a convention, the `/mnt' directory is used to store an empty subdirectory for each mountable file system. Each file system is actually mounted in its counterpart `/mnt' subdirectory. Try to follow this convention since the `gitmount' script is heavily based on it. *Note Customization::, for more information. `ESC m a' Call `mount'(1) in order to mount the first floppy (`/dev/fd0') in the `/mnt/fd0' directory (`MOUNT-A'). `ESC m b' Call `mount'(1) in order to mount the second floppy (`/dev/fd1') in the `/mnt/fd1' directory (`MOUNT-B'). `ESC m c' Call `mount'(1) in order to mount the cdrom (`/dev/cdrom') in the `/mnt/cdrom' directory (`MOUNT-CDROM'). `ESC m f' Call `mount'(1) in order to mount the first floppy (`/dev/fd0') in the `/mnt/floppy' directory (`MOUNT-FLOPPY'). `ESC m z' Call `mount'(1) in order to mount the zip drive (`/dev/zip') in the `/mnt/zip' directory (`MOUNT-ZIP'). `ESC m j' Call `mount'(1) in order to mount the jaz drive (`/dev/jaz') in the `/mnt/jaz' directory (`MOUNT-JAZ'). `ESC m t' Call `mount'(1) in order to mount the file systems corresponding to the selected subdirectories. For example, if you are in the `/mnt' directory and the `cdrom' and `zip' subdirectories are selected, the cdrom and the zip disk will be mounted (`MOUNT-THESE'). `ESC r a' Call `umount'(1) in order to remove (unmount) the first floppy (`/dev/fd0') (`UMOUNT-A'). `ESC r b' Call `umount'(1) in order to remove (unmount) the second floppy (`/dev/fd1') (`UMOUNT-B'). `ESC r c' Call `umount'(1) in order to remove (unmount) the cdrom (`/dev/cdrom') (`UMOUNT-CDROM'). findex UMOUNT-CDROM `ESC r f' Call `umount'(1) in order to remove (unmount) the first floppy (`/dev/fd0') (`UMOUNT-FLOPPY'). `ESC r z' Call `umount'(1) in order to remove (unmount) the zip drive (`/dev/zip') (`UMOUNT-ZIP'). `ESC r j' Call `umount'(1) in order to remove (unmount) the jaz drive (`/dev/jaz') (`UMOUNT-JAZ'). `ESC r t' Call `umount'(1) in order to remove (unmount) the file systems mounted into the selected subdirectories. For example, if the current directory is `/mnt' and the `cdrom' and `zip' subdirectories are selected, the cdrom and the zip disk will be unmounted (`UMOUNT-THESE').  File: gnuit.info, Node: Sysinfo, Next: Environment, Prev: Mounting, Up: gitfm 3.1.19 Getting some useful system information --------------------------------------------- `^X T' Call `date'(1) in order to display the current time/date (`DATE'). `ESC S f' Call `finger'(1) in order to display information about local and remote users (`FINGER'). `ESC S m' Call `mount'(1) in order to display a list of the currently mounted file systems (`MOUNTED-FILE-SYSTEMS'). `ESC S q' Call `quota'(1) in order to display a user file system disk quota and quota (`QUOTA'). `ESC S s' Call `df'(1) in order to get the status of the currently mounted file systems (`DISK-FREE-SPACE'). `ESC S u' Call `users'(1) in order to get the name of the currently logged in users (`USERS'). `ESC S v' Call `$GNUIT_VMSTAT'(1) in order to get the current virtual memory status. This is very system dependent, `Linux' uses `free', other systems use `vmstat', so the $GNUIT_VMSTAT variable is used to deal with this (`VIRTUAL-MEMORY-STATUS'). $GNUIT_VMSTAT used to be called $GIT_VMSTAT. The old name is still accepted for backwards-compatibility. *Note Environment Variables::, for more information. `ESC S w' Call `who'(1) in order to find out who is on the system (`WHO').  File: gnuit.info, Node: Environment, Next: Processes, Prev: Sysinfo, Up: gitfm 3.1.20 How to look at the environment variables ----------------------------------------------- `^X E' Call `env'(1) in order to display the current environment (`ENV'). `^X H' Call `xhost'(1) in order to add/remove hosts names to the list allowed to make connection to the X server (`XHOST').  File: gnuit.info, Node: Processes, Next: Sync, Prev: Environment, Up: gitfm 3.1.21 Viewing/killing processes -------------------------------- There are at least two kinds of `ps'(1) utilities. One that accepts (more or less) combinations of the 'a', 'u', and 'x' flags and another that accepts combinations of 'e', 'f' and 'l' flags. Since is quite difficult to test which one works fine on a given `UNIX' system, `gitfm' provides key bindings for both of them. Anyway, if your `ps'(1) fails to accept the predefined combinations, please take a look in its manual and then modify the `.gnuitrc.TERM' file as needed. Since the number of possible combinations of flags in the `ps' command line is quite big and *very* system dependent, there is no real reason to display them all here. We are only interested in giving you a starting point in your search through the `.gnuitrc.TERM' file. Note also that you can display a list of processes using `ps'(1) or browse through a list of them (killing as needed) using `gitps'. As a convention, we have used the same key sequence for a given set of `ps'(1) flags for both `ps'(1) and `gitps', the only difference being that `ps'(1) keys end in an uppercase letter. *Note gitps::, for more information. Under Linux it is possible to see a tree of processes using `pstree'(1). Here there are the default key bindings for the 'e', 'f' and 'l' `ps'(1) flags combinations: `ESC P b', `ESC P c', `ESC P e' Call `gitps' or `ps'(1) in order to browse through or display a list of currently running processes (`GITPS', `PS'). ... and the default key bindings for the 'a', 'u' and 'x' `ps'(1) flags combinations: `ESC P a', `ESC P l', `ESC P u' `ESC P x', `ESC P y' Call `gitps' or `ps'(1) in order to browse through or display a list of currently running processes (`GITPS', `PS'). `ESC P T' Call `pstree'(1) in order to display the tree of currently running processes (`PSTREE'). `^X k' Call `kill'(1) in order to kill a user specified process with a given signal (`KILL').  File: gnuit.info, Node: Sync, Next: Documentation, Prev: Processes, Up: gitfm 3.1.22 Synchronizing the file systems ------------------------------------- `^X S' Call `sync'(1) in order to synchronize all the file systems (`SYNC').  File: gnuit.info, Node: Documentation, Next: Exit, Prev: Sync, Up: gitfm 3.1.23 Reading the documentation -------------------------------- `^X q' Read a manual page. The user is prompted for its name (`MAN'). `F1', `ESC 1', `^X i' Read an info documentation. The user is prompted for the documentation name (`INFO'). `^X h' Read the html documentation using the viewer specified in GNUIT_BROWSER, or with lynx if GNUIT_BROWSER is not set (`HTML'). $GNUIT_BROWSER used to be called $GIT_BROWSER. The old name is still accepted for backwards-compatibility. `^X ^A' Show the key-bindings for commands matching a specified string (`apropos').  File: gnuit.info, Node: Exit, Prev: Documentation, Up: gitfm 3.1.24 Exiting GNU Interactive Tools ------------------------------------ `F10', `ESC 0', `^X ^C', `^X c' Exit GNU Interactive Tools (`exit').  File: gnuit.info, Node: gitps, Next: gitview, Prev: gitfm, Up: Description 3.2 The GNUIT process viewer/killer =================================== `gitps' is an interactive process viewer/killer. It calls internally the `ps'(1) utility. This is a brief description of the command line arguments. `-h' print this help message `-v' print the version number `-i' print the installation directory `-c' use ANSI colors `-b' don't use ANSI colors `-l' don't use the last screen character `-p' pass the remaining arguments to ps(1) Running `gitps' is self explanatory. Use the `arrows', `PageUp', `PageDown', `Home', `End', `^N', `^P', `^V', `ESC v', `Space' and `Backspace' to move in the list, `^L' to refresh it, `Enter' to change the default signal and `F10', `q' or `^X ^C' to leave. You can change these keys, just read the GITPS-Setup, GITPS-Color, GITPS-Monochrome and GITPS-Keys sections in the configuration files `gnuitrc.TERM'. The selected signal can also be changed by pressing its first letter (in uppercase), e.g. for `SIGTERM' press `T', or by pressing the key corresponding to the signal number. For signals > 10, prefix with `^X', and for signals greater than 20, prefix with `^C'. For instance, to select signal 15 (`SIGTERM'), press `^X5'. Keys for signal numbers are hard-coded to the versions in i386 Linux, however most correspond to POSIX. Compare signal(7) or signal(5) with `http://linux.die.net/man/7/signal'.  File: gnuit.info, Node: gitview, Next: gitkeys, Prev: gitps, Up: Description 3.3 The GNUIT ASCII/HEX file viewer =================================== `gitview' is an ASCII/HEX file viewer. Use the `arrows', `PageUp', `PageDown', `Home', `End', `^N', `^P', `^V', `ESC v', `Space' and `Backspace' to move in the file, `^L' to refresh the screen and `F10', `q' or `^X ^C' to leave. You can change these keys, just read the GITVIEW-Setup, GITVIEW-Color, GITVIEW-Monochrome and GITVIEW-Keys sections in the configuration files `gnuitrc.TERM'. Here is a brief description of the command line arguments: `-h' print this help message `-v' print the version number `-i' print the installation directory `-c' use ANSI colors `-b' don't use ANSI colors `-l' don't use the last screen character  File: gnuit.info, Node: gitkeys, Next: gitwipe, Prev: gitview, Up: Description 3.4 The GNUIT key sequences display utility =========================================== `gitkeys' is a program that displays the key sequence sent by the pressed key. This is the key sequence received by `GIT' tools, so this program is useful when setting up the `.gnuitrc.TERM' configuration files.  File: gnuit.info, Node: gitwipe, Next: gitmount, Prev: gitkeys, Up: Description 3.5 The GNUIT wipe file utility =============================== `gitwipe' is an utility for wiping files. It overwrites the file contents with a random sequence of numbers and then calls `sync'(). Note that `gitwipe' does *not* remove the wiped file since (under `Linux' at least) the `sync'() system call might return before actually writing the new file contents to disk. Removing the file might be dangerous because some file systems can detect that the blocks in the removed wiped file are no longer used and never write them back to disk in order to improve performance. It is up to you to remove the file(s) at a later moment.  File: gnuit.info, Node: gitmount, Next: gitaction, Prev: gitwipe, Up: Description 3.6 The GNUIT mount utility =========================== `gitmount' is a script that allows you to mount a list of block devices (specified in the command line), without specifying the file system type. With a command like `gitmount fd0 cdrom' the first floppy will be mounted in `/mnt/fd0' and the cdrom will be mounted in `/mnt/cdrom'. Make sure your `/etc/fstab' settings are correct. You don't need to know the file system type anymore. If you want to use `gitmount' with the block device `/dev/xxx' then the directory `/mnt/xxx' is created if it doesn't exist. `gitmount' will attempt to create the necessary directories, but root permissions might be required.  File: gnuit.info, Node: gitaction, Next: gitunpack, Prev: gitmount, Up: Description 3.7 The GNUIT per file type action script ========================================= `gitaction' is a script that executes a different action for each file type specified. It is called by the `gitfm' program when pressing `F2', `ESC 2' or `^Xa'. The first parameter is the current directory name and the second one is the file name to be matched against the default patterns. The matching is done using the shell 'case' statement. If you press `F2', `ESC 2' or `^Xa' on a `*.html' file, `gitfm' will invoke a browser to view it, if you press `F2', `ESC 2' or `^Xa' on a `*.tar.gz' file, `gitfm' will list the tar archive contents, if you press the same keys on a `*.gz' file, `gitfm' will display its uncompressed contents on the screen, etc ... If you press `F2', `ESC 2' or `^Xa' on a `*.gif' file or `*.jpg' file and you have the `xzgv' utility installed, you will be able to see it. If you want to change the gif/jpeg viewer, all you need to do is to change its name in the `gitaction' script. There are many more file types and viewers that gitaction knows about. In addition, if you are running under GNOME, gnome-open is used, and on MacOS, open(1) is used. see(1) and metamail(1) are also used as fallbacks. If all else fails, the file is displayed using $GNUIT_PAGER. If you want to find out what the default action for each file type is (or if you want to modify it), just read/modify the `gitaction' script. Also, you can add a `.gitaction' shell script in your home directory and/or in any other directory. Before trying to match a file name, `gitaction' will attempt to execute `./.gitaction'. If that one fails to match the file name against its patterns, it backs up to `$HOME/.gitaction'. When this one fails too the patterns in `gitaction' are tried. For an example of how to write .gitaction scripts take a look at the `.gitaction' shell script provided as part of the distribution and installed in the `$(prefix)/bin' directory. Debian users will find it in `/usr/share/doc/gnuit/examples/'.  File: gnuit.info, Node: gitunpack, Next: gitrgrep, Prev: gitaction, Up: Description 3.8 Unified archive unpacking ============================= `gitunpack' is a shell script that accepts a directory and a set of archives as its command line parameters, and then attempts to unpack those archives in the given directory, selecting the utility used to unpack the archives based on the archive extensions.  File: gnuit.info, Node: gitrgrep, Prev: gitunpack, Up: Description 3.9 The GIT recursive grep script ================================= `gitrgrep' is a very small script that calls `grep' recursively. It accepts `grep' like options / parameters, the only difference being that file specifications should be quoted: `gitrgrep' main '*.c' or `gitrgrep' errno '*.c *.h' `gitregrep' and `gitrfgrep' are recursive versions of the egrep and fgrep programs.  File: gnuit.info, Node: Customization, Next: Limitations, Prev: Description, Up: Top 4 Customizing GNU Interactive Tools *********************************** * Menu: * Environment Variables:: Environment variables used by GNUIT * Configuration Files:: GNUIT's configuration files  File: gnuit.info, Node: Environment Variables, Next: Configuration Files, Up: Customization 4.1 Environment Variables ========================= The configuration files use shell environment variables to call the shell, editor, mail reader, html viewer, compress and virtual memory status utility. That means that if you set GNUIT_SHELL, GNUIT_EDITOR, GNUIT_RMAIL, GNUIT_BROWSER, or GNUIT_VMSTAT to some value, that value will be used instead of the default one. The defaults are: GNUIT_SHELL='/bin/sh' GNUIT_EDITOR='vi' GNUIT_RMAIL='emacs -f rmail' GNUIT_PAGER='more GNUIT_VMSTAT='free' GNUIT_BROWSER='lynx' if the `configure' script is passed `--enable-debian', some of the defaults are changed as follows: GNUIT_EDITOR='sensible-editor' GNUIT_PAGER='sensible-pager' GNUIT_BROWSER='sensible-browser' If SHELL is defined, GNUIT_SHELL will be set to that value. If PAGER is defined, GNUIT_PAGER will be set to that value. If EDITOR is defined, GNUIT_EDITOR will be set to that value. If you want to change the default settings, put something like this into your `.profile': export GNUIT_SHELL='/usr/local/bin/bash' export GNUIT_EDITOR='emacs' export GNUIT_RMAIL='elm' export GNUIT_PAGER='less' export GNUIT_VMSTAT='vmstat' export GNUIT_BROWSER='netscape' These variables used to be prefixed with GIT_ (e.g. GIT_PAGER). The old names are still accepted for backwards compatibility.  File: gnuit.info, Node: Configuration Files, Prev: Environment Variables, Up: Customization 4.2 Configuration Files ======================= There is one configuration file per terminal type in `GNUIT'. The configuration file(s) reside in the user's home directory or (the default versions) in the directory `/usr/share/gnuit/'). Files in the user's home directory start with a leading "." Their generic name is `gnuitrc.TERM'. `GNUIT' allows each terminal type to have its own configuration file (TERM is the value of the TERM environment variable (e.g `vt102'); for the `Linux' console the configuration file is `gnuitrc.console'). Since most of the key bindings are common to all the terminal types, a configuration file called `gnuitrc.common' is parsed before parsing the normal `.gnuitrc.TERM' configuration file, the later one defining only those keys that are terminal specific. However, if a key binding is redefined in the `gnuitrc.TERM' file, that binding will be used. If the `GNUIT' package have been compiled without passing the `--enable-terminfo' option to the `configure' script and your system has a huge `termcap' database (`/etc/termcap'), you can copy the termcap definition(s) of your terminal(s) in a file called, lets say `.termcap' and put it in your home directory. After that, set your TERMCAP environment variable to point to it. You should add something like this to your `.profile': TERMCAP=`/home/mike/.termcap' The interactive programs in the `GNUIT' package can run without such a file, but on systems with huge `termcap' databases, copying the definitions of the most used terminals in a local `.termcap' file will lead to a faster start. The `.gnuitrc.TERM' is first searched for in the home directory then, if not found, in the directory `/usr/share/gnuit/'). (without the leading "."). The configuration file is structured in sections, each section containing variables in the following format: `variable-name' = `first-field';`second-field'; ... After the `variable-name' at least one space or tab is required. All characters after a `#' are ignored and if you comment a section name, the whole section is ignored. Section names are enclosed in rectangular brackets (`[' and `]'). Note that this manual don't include them while refering to section names. The `GNUIT' package contains three major programs: `gitfm', `gitps' and `gitview'. Each one has its own sections in the configuration files. There is also a global setup section called `Setup' that is used by all these programs. Note that now `git' has been renamed to `gitfm', the corresponding sections have been renamed to `GITFM', however for backwards compatibility, the old name (`GIT') is still checked if the `GITFM' section is not found. * Menu: * Key Sequences:: How to write a key sequence. * Setup:: The global setup section. * gitfm Sections:: gitfm's sections. * gitps Sections:: gitps's Sections. * gitview Sections:: gitview's Sections.  File: gnuit.info, Node: Key Sequences, Next: Setup, Up: Configuration Files 4.2.1 Writing key sequences --------------------------- `GNUIT' contains three interactive programs. Their names are: `gitfm' (this is the file system browser), `gitps' (this is the process viewer/killer and `gitview' (this is the ASCII/HEX file viewer). Each one of these programs has its own set of key bindings. The convention used in describing key bindings are very simple. Here there are some examples that will help you to understand them. The corresponding `Emacs' conventions will help you even more. `^A' means keeping the Ctrl key down and pressing the `a' key (`C-a'). The `ESC' character is represented as `^[' so that you can use the meta character (`M-' ) where available (or the `ESC' key): `^[a' corresponds to `M-a' (pressing the `ESC' key and then `a'). The `^' character is represented as `^^'. The `backspace' character is represented as `^_'. The `Ctrl-SPACE' character (`C-SPC') is represented as `^$'. The space (`SPC') character is represented as `^@'. Note that the key bindings notation described here is only used in the configuration files. For the sake of readability this manual uses `ESC' for the `ESC' key, `SPC' for the `SPACE' key and `RET' for the `RETURN' (`ENTER') key.  File: gnuit.info, Node: Setup, Next: gitfm Sections, Prev: Key Sequences, Up: Configuration Files 4.2.2 The global setup section ------------------------------ In this section the variables have only one field. `AnsiColors' This variable should be set to `ON' if the terminal supports standard `ANSI' color sequences. Otherwise it should be `OFF'. If `AnsiColors' is `ON', `GITxxx-Color' sections will be used in the configuration files `gnuitrc.TERM'. Otherwise, `GNUIT' interactive programs will use the `GITxxx-Monochrome' sections. `UseLastScreenChar' This variable is used for terminals that can't write on the last character of the screen without scrolling the entire screen. If your terminal has no problem writing there (`Linux' console, vt100, vt102, xterm, ...) set it to `ON'. Otherwise (hpterm), it should be `OFF'. `StartupScrollStep' This variable specifies the scroll step initial value for both panels.  File: gnuit.info, Node: gitfm Sections, Next: gitps Sections, Prev: Setup, Up: Configuration Files 4.2.3 gitfm Sections -------------------- * Menu: * GITFM-Setup:: gitfm's setup section. * GITFM-Color:: gitfm's color section. * GITFM-Monochrome:: gitfm's monochrome section. * GITFM-Keys:: gitfm's keys section. * GITFM-FTI:: gitfm's file type information section.  File: gnuit.info, Node: GITFM-Setup, Next: GITFM-Color, Up: gitfm Sections 4.2.3.1 gitfm Setup ................... In this section the variables have only one field. `StartupFileDisplayMode' This variable specifies the file specific information displayed at startup. It can be any of `OwnerGroup', `DateTime', `Size', `AbbrevSize', `Mode' or `FullName'. Its value initially affects both panels but it can be changed separately afterward. `StartupFileSortMethod' This variable specifies the startup sort method. It can be any of `Name', `Extension', `Size', `Date', `Mode', `OwnerId', `GroupId', `OwnerName' or `GroupName'. Its value initially affects both panels but it can be changed separately afterward. `MaxUnscaledDigits' Maximum number of digits a number may be before being scaled (e.g. to `123M'). If you want number to always be scaled, either set this to `0', or set `StartupFileDisplayMode' to `AbbrevSize'. Note that scaling may happen anyway if the number is too large for the display field. `GroupDigits' If this variable is `ON', digits of file sizes will be grouped according to your locale, (e.g. `123,456,789'). `ConfirmOnExit' If this variable is `ON', the user is prompted for confirmation at exit. `HistoryFile' This variable specifies the history file name. The default value is `~/.githistory'. `InfoDisplay' If this variable is `OFF', auxiliary file informations are not displayed. This can be useful if you are using a very slow terminal. `LeadingDotMatch' If this variable is `OFF' when matching files for select-files-matching-pattern / unselect-files-matching-pattern then the leading '.' in the file name is matched only explicitly. `TypeSensitivity' If this variable is `OFF', colors are not used when displaying files. Normally, the information in the `GITFM-FTI' section is used to display files with different colors, depending on their types. Note that `TypeSensitivity' is automatically set to `OFF' when `AnsiColors' is `OFF'. *Note GITFM-FTI::, for mor information. `NormalModeHelp' `CommandLineModeHelp' These variables describe the status bar contents for each `gitfm' mode when no errors occurred. `gitfm' can display on the status bar a help string and/or some system information (system type, hostname, machine type and the current date) using escape characters: \s -> the system type \h -> the host name \m -> the machine type \d -> the current date *Note Modes::, for more information.  File: gnuit.info, Node: GITFM-Color, Next: GITFM-Monochrome, Prev: GITFM-Setup, Up: gitfm Sections 4.2.3.2 Using gitfm on color displays ..................................... In this sections the variables have only one field. These section allows you to customize the colors of `gitfm'. Reading the `gnuitrc.TERM' configuration file is self explanatory.  File: gnuit.info, Node: GITFM-Monochrome, Next: GITFM-Keys, Prev: GITFM-Color, Up: gitfm Sections 4.2.3.3 Using gitfm on monochrome displays .......................................... In this sections the variables have only one field. These section allows you to customize the appearance of `gitfm' on monochrome displays. Reading the `gnuitrc.TERM' configuration file is self explanatory.  File: gnuit.info, Node: GITFM-Keys, Next: GITFM-FTI, Prev: GITFM-Monochrome, Up: gitfm Sections 4.2.3.4 Defining keys ..................... These section describes the actions `gitfm' takes when a specified key is pressed. A variable can have up to 6 fields separated by ';'. Each line in this section looks like: `key-sequence' = `command-name';`formatted-command';`new-dir'; `save-screen';`pause';`hide' Note that you can't continue the variable fields description on the next line. * Menu: * key-sequence:: The key-sequence field. * command-name:: The command-name field. * formatted-command:: The formatted-command field. * new-dir:: The new-dir field. * save-screen:: The save-screen field. * pause:: The pause field. * hide:: The hide field.  File: gnuit.info, Node: key-sequence, Next: command-name, Up: GITFM-Keys 4.2.3.5 The key-sequence field .............................. `key-sequence' is the key sequence associated with the given command. You can use any key sequence that doesn't start with an ascii character (0x20 to 0x7e). Symbolic key names (`F0', `F1', `F2', ... `F10', `UP', `DOWN', `RIGHT', `LEFT', `INS', `DEL', `HOME', `END', `PGUP' and `PGDOWN') can be used instead of the key sequence. If some keys don't have a `termcap'/ `terminfo' description (like the `F11'/`F12' keys on the `Linux' console) you can specify the key sequence in the usual way.  File: gnuit.info, Node: command-name, Next: formatted-command, Prev: key-sequence, Up: GITFM-Keys 4.2.3.6 The command-name field .............................. `command-name' is a command generic name. Even if it is not always used, the `command-name' must be present (if a command is associated with a `key-sequence'). If it is not, no action will be taken when pressing `key-sequence'. There are two types of commands in `gitfm': built-in commands and user defined commands. If the `command-name' section contains a built-in command specification, the other fields are ignored. Note that by convention built-in command names contain only lower case letters while user defined command names contain only upper case letters.  File: gnuit.info, Node: formatted-command, Next: new-dir, Prev: command-name, Up: GITFM-Keys 4.2.3.7 The formatted-command field ................................... `formatted-command' is a shell command which can contain some scanf(3)-like format specifiers. They are used to get the current entry name, owner, group, mode, etc. Note that using uppercase `format specifiers' you will be able to access the other panel path, file and directory names, etc. These are the available `format specifiers': * Menu: * %s:: The %s format specifier. * %f:: The %f format specifier. * %d:: The %d format specifier. * %l:: The %l format specifier. * %t:: The %t format specifier. * %z:: The %z format specifier. * %a:: The %a format specifier. * %m:: The %m format specifier. * %g:: The %g format specifier. * %o:: The %o format specifier. * %p:: The %p format specifier. * %b:: The %b format specifier. * %i:: The %i format specifier. * %?:: The %? format specifier.  File: gnuit.info, Node: %s, Next: %f, Up: formatted-command 4.2.3.8 The %s format specifier ............................... The format of %s is: %s{question,default_answer}. When `gitfm' encounters a %s in the `formatted-command' it asks the user the question `question' whose default answer is `default_answer' and replaces the `%s{ , }' with the user's answer. Both `question' and `default_answer' can contain any other `format specifiers' except %s. Note that there should be no spaces between %s and '{'.  File: gnuit.info, Node: %f, Next: %d, Prev: %s, Up: formatted-command 4.2.3.9 The %f format specifier ............................... `gitfm' will replace %f with the current directory entry name only if it is a file (not a directory).  File: gnuit.info, Node: %d, Next: %l, Prev: %f, Up: formatted-command 4.2.3.10 The %d format specifier ................................ `gitfm' will replace %d with the current directory entry name only if it is a directory (not a file).  File: gnuit.info, Node: %l, Next: %t, Prev: %d, Up: formatted-command 4.2.3.11 The %l format specifier ................................ `gitfm' will replace %l with the current directory entry name only if it is a symbolic link with no target.  File: gnuit.info, Node: %t, Next: %z, Prev: %l, Up: formatted-command 4.2.3.12 The %t format specifier ................................ `gitfm' will replace %t with the current directory entry name only if it is a named pipe.  File: gnuit.info, Node: %z, Next: %a, Prev: %t, Up: formatted-command 4.2.3.13 The %z format specifier ................................ `gitfm' will replace %z with the current directory entry name only if it is a socket.  File: gnuit.info, Node: %a, Next: %m, Prev: %z, Up: formatted-command 4.2.3.14 The %a format specifier ................................ `gitfm' will always replace %a with the current directory entry name.  File: gnuit.info, Node: %m, Next: %g, Prev: %a, Up: formatted-command 4.2.3.15 The %m format specifier ................................ `gitfm' will always replace %m with the current file mode.  File: gnuit.info, Node: %g, Next: %o, Prev: %m, Up: formatted-command 4.2.3.16 The %g format specifier ................................ `gitfm' will always replace %g with the current file group.  File: gnuit.info, Node: %o, Next: %p, Prev: %g, Up: formatted-command 4.2.3.17 The %o format specifier ................................ `gitfm' will always replace %o with the current file owner.  File: gnuit.info, Node: %p, Next: %b, Prev: %o, Up: formatted-command 4.2.3.18 The %p format specifier ................................ `gitfm' will always replace %p with the current panel path.  File: gnuit.info, Node: %b, Next: %i, Prev: %p, Up: formatted-command 4.2.3.19 The %b format specifier ................................ `gitfm' will always replace %b with the current panel directory name.  File: gnuit.info, Node: %i, Next: %?, Prev: %b, Up: formatted-command 4.2.3.20 The %i format specifier ................................ `gitfm' will always replace %i with all the current panel selected entry names.  File: gnuit.info, Node: %?, Prev: %i, Up: formatted-command 4.2.3.21 The %? format specifier ................................ The format of %? is: %?{confirmation}. `gitfm' uses this format specifier only to ask for confirmation before expanding / executing the current command. The `confirmation' string is displayed and, if the user doesn't confirm, the command is aborted. Otherwise, %?{confirmation} expands to a null string and the command is expanded / executed normally.  File: gnuit.info, Node: new-dir, Next: save-screen, Prev: formatted-command, Up: GITFM-Keys 4.2.3.22 The new-dir field .......................... If the `formatted-command' successfully exits (exit code = 0) or it has no body and this field is present then `new-dir' will become the current panel directory. The character '~' used at the beginning of the `new-dir' field is replaced by the user's home directory.  File: gnuit.info, Node: save-screen, Next: pause, Prev: new-dir, Up: GITFM-Keys 4.2.3.23 The save-screen field .............................. This field is a character (usually 'y' or 'n') that tells `gitfm' to save ('y') or not to save ('n') the terminal's screen after executing the `formatted-command'. Saving the screen is not necessary while editing or viewing a file because the information left after the editor or the viewer exits is not important. Saving the screen means that that screen will be restored before the execution of the next command. Currently this field is used only if you are working as a super user under `Linux' on a virtual console. Its default value is 'y'.  File: gnuit.info, Node: pause, Next: hide, Prev: save-screen, Up: GITFM-Keys 4.2.3.24 The pause field ........................ Users may wish to read the result of some commands before repainting the panels. If this field is present gitfm will wait for a key to be pressed before restoring the panels. Its default value is 'n'.  File: gnuit.info, Node: hide, Prev: pause, Up: GITFM-Keys 4.2.3.25 The hide field ....................... Some commands that don't displaying any useful information if successfully complete their execution: `mount', `chmod', `chown', `chgrp', `sync' ... and, if an error occurs, a line or two are sent to stderr. If this option is 'y', the stdout and stderr will be redirected to some files (`git.1.pid' and `git.2.pid', where pid is `gitfm''s pid) and only if the command's exit code is not 0, the `git.2.pid' file will be displayed, line by line, onto the status bar. This way the panels will not be deleted and then repainted and the command appears to be built-in. `git.1.pid' and `git.2.pid' are created in the temporary directory specified in the `TMPDIR' environment variable (or "/tmp" if `TMPDIR' is not defined). The default value of the `hide' field is 'n'.  File: gnuit.info, Node: GITFM-FTI, Prev: GITFM-Keys, Up: gitfm Sections 4.2.4 Setting up colors for different file types ------------------------------------------------ This sections contains entries of the form: `pattern' = `foreground'; `background'; `brightness' where `pattern' is a file name matching pattern, `foreground', `background' and `brightness' are the color specification to be used when a file whose name match the given `pattern' is displayed in a panel. Colors can be turned off using the `TypeSensitivity' variable in the `GITFM-Setup' section.  File: gnuit.info, Node: gitps Sections, Next: gitview Sections, Prev: gitfm Sections, Up: Configuration Files 4.2.5 gitps Sections -------------------- * Menu: * GITPS-Setup:: gitps's setup section. * GITPS-Color:: gitps's color section. * GITPS-Monochrome:: gitps's monochrome section. * GITPS-Keys:: gitps's keys section.  File: gnuit.info, Node: GITPS-Setup, Next: GITPS-Color, Up: gitps Sections 4.2.5.1 gitps Setup ................... In this section the variables have only one field. `Help' This variable describe `gitps''s status bar contents.  File: gnuit.info, Node: GITPS-Color, Next: GITPS-Monochrome, Prev: GITPS-Setup, Up: gitps Sections 4.2.5.2 Using gitps on color displays ..................................... In this sections the variables have only one field. These section allows you to customize the colors of `gitps'. Reading the `gnuitrc.TERM' configuration file is self explanatory.  File: gnuit.info, Node: GITPS-Monochrome, Next: GITPS-Keys, Prev: GITPS-Color, Up: gitps Sections 4.2.5.3 Using gitps on monochrome displays .......................................... In this sections the variables have only one field. These section allows you to customize the appearance of `gitps' on monochrome displays. Reading the `gnuitrc.TERM' configuration file is self explanatory.  File: gnuit.info, Node: GITPS-Keys, Prev: GITPS-Monochrome, Up: gitps Sections 4.2.5.4 Defining keys .....................  File: gnuit.info, Node: gitview Sections, Prev: gitps Sections, Up: Configuration Files 4.2.6 gitview Sections ---------------------- * Menu: * GITVIEW-Setup:: gitview's setup section. * GITVIEW-Color:: gitview's color section. * GITVIEW-Monochrome:: gitview's monochrome section. * GITVIEW-Keys:: gitview's keys section.  File: gnuit.info, Node: GITVIEW-Setup, Next: GITVIEW-Color, Up: gitview Sections 4.2.6.1 gitview Setup ..................... In this section the variables have only one field. `Help' This variable describe `gitps''s status bar contents.  File: gnuit.info, Node: GITVIEW-Color, Next: GITVIEW-Monochrome, Prev: GITVIEW-Setup, Up: gitview Sections 4.2.6.2 Using gitview on color displays ....................................... In this sections the variables have only one field. These section allows you to customize the colors of `gitview'. Reading the `gnuitrc.TERM' configuration file is self explanatory.  File: gnuit.info, Node: GITVIEW-Monochrome, Next: GITVIEW-Keys, Prev: GITVIEW-Color, Up: gitview Sections 4.2.6.3 Using gitview on monochrome displays ............................................ In this sections the variables have only one field. These section allows you to customize the appearance of `gitview' on monochrome displays. Reading the `gnuitrc.TERM' configuration file is self explanatory.  File: gnuit.info, Node: GITVIEW-Keys, Prev: GITVIEW-Monochrome, Up: gitview Sections 4.2.6.4 Defining keys .....................  File: gnuit.info, Node: Limitations, Next: Bugs, Prev: Customization, Up: Top 5 GNU Interactive Tools limitations *********************************** Background commands (& terminated)can be specified in the configuration file but their result (stdout and stderr redirection), will be overwritten by the result of newer commands and, if an error occurs, it will not be seen. When `gitfm' is compiled for `Linux', the default built-in color descriptions are for color monitors, so you can't (decently) run `gitfm' on a b/w monitor without the `gnuitrc.TERM' file correctly configured. `gnuitrc.TERM' should be configured with `AnsiColors' = OFF. However, if your system knows about the linux-m terminal type, using that may be a better solution. Job support is implemented only in `gitfm'. Due to the fact that the ';' character is used as a field separator in the configuration files, you can't write something like that in the `gnuitrc.TERM' files: ^AAA = SHOW-USERS-AND-GROUPS; more /etc/passwd; more /etc/group because 'more /etc/group' will be considered as a directory to switch to. You must write a small script instead: #! /bin/sh more /etc/passwd more /etc/group Supposing the script name is `show_ug', the `gnuitrc.TERM' line will look like this: ^AAA = SHOW-USERS-AND-GROUPS; show_ug There is no support for appearance modes on magic-cookie terminals.  File: gnuit.info, Node: Bugs, Next: Copying This Manual, Prev: Limitations, Up: Top 6 GNU Interactive Tools bugs **************************** Any questions, comments, or bug reports, should be emailed to `gnuit-dev@gnu.org'. Please include the version number.  File: gnuit.info, Node: Copying This Manual, Prev: Bugs, Up: Top Appendix A Copying This Manual ****************************** Version 1.3, 3 November 2008 Copyright (C) 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc. `http://fsf.org/' Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. 0. PREAMBLE The purpose of this License is to make a manual, textbook, or other functional and useful document "free" in the sense of freedom: to assure everyone the effective freedom to copy and redistribute it, with or without modifying it, either commercially or noncommercially. Secondarily, this License preserves for the author and publisher a way to get credit for their work, while not being considered responsible for modifications made by others. This License is a kind of "copyleft", which means that derivative works of the document must themselves be free in the same sense. It complements the GNU General Public License, which is a copyleft license designed for free software. We have designed this License in order to use it for manuals for free software, because free software needs free documentation: a free program should come with manuals providing the same freedoms that the software does. But this License is not limited to software manuals; it can be used for any textual work, regardless of subject matter or whether it is published as a printed book. We recommend this License principally for works whose purpose is instruction or reference. 1. APPLICABILITY AND DEFINITIONS This License applies to any manual or other work, in any medium, that contains a notice placed by the copyright holder saying it can be distributed under the terms of this License. Such a notice grants a world-wide, royalty-free license, unlimited in duration, to use that work under the conditions stated herein. The "Document", below, refers to any such manual or work. Any member of the public is a licensee, and is addressed as "you". You accept the license if you copy, modify or distribute the work in a way requiring permission under copyright law. A "Modified Version" of the Document means any work containing the Document or a portion of it, either copied verbatim, or with modifications and/or translated into another language. A "Secondary Section" is a named appendix or a front-matter section of the Document that deals exclusively with the relationship of the publishers or authors of the Document to the Document's overall subject (or to related matters) and contains nothing that could fall directly within that overall subject. (Thus, if the Document is in part a textbook of mathematics, a Secondary Section may not explain any mathematics.) The relationship could be a matter of historical connection with the subject or with related matters, or of legal, commercial, philosophical, ethical or political position regarding them. The "Invariant Sections" are certain Secondary Sections whose titles are designated, as being those of Invariant Sections, in the notice that says that the Document is released under this License. If a section does not fit the above definition of Secondary then it is not allowed to be designated as Invariant. The Document may contain zero Invariant Sections. If the Document does not identify any Invariant Sections then there are none. The "Cover Texts" are certain short passages of text that are listed, as Front-Cover Texts or Back-Cover Texts, in the notice that says that the Document is released under this License. A Front-Cover Text may be at most 5 words, and a Back-Cover Text may be at most 25 words. A "Transparent" copy of the Document means a machine-readable copy, represented in a format whose specification is available to the general public, that is suitable for revising the document straightforwardly with generic text editors or (for images composed of pixels) generic paint programs or (for drawings) some widely available drawing editor, and that is suitable for input to text formatters or for automatic translation to a variety of formats suitable for input to text formatters. A copy made in an otherwise Transparent file format whose markup, or absence of markup, has been arranged to thwart or discourage subsequent modification by readers is not Transparent. An image format is not Transparent if used for any substantial amount of text. A copy that is not "Transparent" is called "Opaque". Examples of suitable formats for Transparent copies include plain ASCII without markup, Texinfo input format, LaTeX input format, SGML or XML using a publicly available DTD, and standard-conforming simple HTML, PostScript or PDF designed for human modification. Examples of transparent image formats include PNG, XCF and JPG. Opaque formats include proprietary formats that can be read and edited only by proprietary word processors, SGML or XML for which the DTD and/or processing tools are not generally available, and the machine-generated HTML, PostScript or PDF produced by some word processors for output purposes only. The "Title Page" means, for a printed book, the title page itself, plus such following pages as are needed to hold, legibly, the material this License requires to appear in the title page. For works in formats which do not have any title page as such, "Title Page" means the text near the most prominent appearance of the work's title, preceding the beginning of the body of the text. The "publisher" means any person or entity that distributes copies of the Document to the public. A section "Entitled XYZ" means a named subunit of the Document whose title either is precisely XYZ or contains XYZ in parentheses following text that translates XYZ in another language. (Here XYZ stands for a specific section name mentioned below, such as "Acknowledgements", "Dedications", "Endorsements", or "History".) To "Preserve the Title" of such a section when you modify the Document means that it remains a section "Entitled XYZ" according to this definition. The Document may include Warranty Disclaimers next to the notice which states that this License applies to the Document. These Warranty Disclaimers are considered to be included by reference in this License, but only as regards disclaiming warranties: any other implication that these Warranty Disclaimers may have is void and has no effect on the meaning of this License. 2. VERBATIM COPYING You may copy and distribute the Document in any medium, either commercially or noncommercially, provided that this License, the copyright notices, and the license notice saying this License applies to the Document are reproduced in all copies, and that you add no other conditions whatsoever to those of this License. You may not use technical measures to obstruct or control the reading or further copying of the copies you make or distribute. However, you may accept compensation in exchange for copies. If you distribute a large enough number of copies you must also follow the conditions in section 3. You may also lend copies, under the same conditions stated above, and you may publicly display copies. 3. COPYING IN QUANTITY If you publish printed copies (or copies in media that commonly have printed covers) of the Document, numbering more than 100, and the Document's license notice requires Cover Texts, you must enclose the copies in covers that carry, clearly and legibly, all these Cover Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on the back cover. Both covers must also clearly and legibly identify you as the publisher of these copies. The front cover must present the full title with all words of the title equally prominent and visible. You may add other material on the covers in addition. Copying with changes limited to the covers, as long as they preserve the title of the Document and satisfy these conditions, can be treated as verbatim copying in other respects. If the required texts for either cover are too voluminous to fit legibly, you should put the first ones listed (as many as fit reasonably) on the actual cover, and continue the rest onto adjacent pages. If you publish or distribute Opaque copies of the Document numbering more than 100, you must either include a machine-readable Transparent copy along with each Opaque copy, or state in or with each Opaque copy a computer-network location from which the general network-using public has access to download using public-standard network protocols a complete Transparent copy of the Document, free of added material. If you use the latter option, you must take reasonably prudent steps, when you begin distribution of Opaque copies in quantity, to ensure that this Transparent copy will remain thus accessible at the stated location until at least one year after the last time you distribute an Opaque copy (directly or through your agents or retailers) of that edition to the public. It is requested, but not required, that you contact the authors of the Document well before redistributing any large number of copies, to give them a chance to provide you with an updated version of the Document. 4. MODIFICATIONS You may copy and distribute a Modified Version of the Document under the conditions of sections 2 and 3 above, provided that you release the Modified Version under precisely this License, with the Modified Version filling the role of the Document, thus licensing distribution and modification of the Modified Version to whoever possesses a copy of it. In addition, you must do these things in the Modified Version: A. Use in the Title Page (and on the covers, if any) a title distinct from that of the Document, and from those of previous versions (which should, if there were any, be listed in the History section of the Document). You may use the same title as a previous version if the original publisher of that version gives permission. B. List on the Title Page, as authors, one or more persons or entities responsible for authorship of the modifications in the Modified Version, together with at least five of the principal authors of the Document (all of its principal authors, if it has fewer than five), unless they release you from this requirement. C. State on the Title page the name of the publisher of the Modified Version, as the publisher. D. Preserve all the copyright notices of the Document. E. Add an appropriate copyright notice for your modifications adjacent to the other copyright notices. F. Include, immediately after the copyright notices, a license notice giving the public permission to use the Modified Version under the terms of this License, in the form shown in the Addendum below. G. Preserve in that license notice the full lists of Invariant Sections and required Cover Texts given in the Document's license notice. H. Include an unaltered copy of this License. I. Preserve the section Entitled "History", Preserve its Title, and add to it an item stating at least the title, year, new authors, and publisher of the Modified Version as given on the Title Page. If there is no section Entitled "History" in the Document, create one stating the title, year, authors, and publisher of the Document as given on its Title Page, then add an item describing the Modified Version as stated in the previous sentence. J. Preserve the network location, if any, given in the Document for public access to a Transparent copy of the Document, and likewise the network locations given in the Document for previous versions it was based on. These may be placed in the "History" section. You may omit a network location for a work that was published at least four years before the Document itself, or if the original publisher of the version it refers to gives permission. K. For any section Entitled "Acknowledgements" or "Dedications", Preserve the Title of the section, and preserve in the section all the substance and tone of each of the contributor acknowledgements and/or dedications given therein. L. Preserve all the Invariant Sections of the Document, unaltered in their text and in their titles. Section numbers or the equivalent are not considered part of the section titles. M. Delete any section Entitled "Endorsements". Such a section may not be included in the Modified Version. N. Do not retitle any existing section to be Entitled "Endorsements" or to conflict in title with any Invariant Section. O. Preserve any Warranty Disclaimers. If the Modified Version includes new front-matter sections or appendices that qualify as Secondary Sections and contain no material copied from the Document, you may at your option designate some or all of these sections as invariant. To do this, add their titles to the list of Invariant Sections in the Modified Version's license notice. These titles must be distinct from any other section titles. You may add a section Entitled "Endorsements", provided it contains nothing but endorsements of your Modified Version by various parties--for example, statements of peer review or that the text has been approved by an organization as the authoritative definition of a standard. You may add a passage of up to five words as a Front-Cover Text, and a passage of up to 25 words as a Back-Cover Text, to the end of the list of Cover Texts in the Modified Version. Only one passage of Front-Cover Text and one of Back-Cover Text may be added by (or through arrangements made by) any one entity. If the Document already includes a cover text for the same cover, previously added by you or by arrangement made by the same entity you are acting on behalf of, you may not add another; but you may replace the old one, on explicit permission from the previous publisher that added the old one. The author(s) and publisher(s) of the Document do not by this License give permission to use their names for publicity for or to assert or imply endorsement of any Modified Version. 5. COMBINING DOCUMENTS You may combine the Document with other documents released under this License, under the terms defined in section 4 above for modified versions, provided that you include in the combination all of the Invariant Sections of all of the original documents, unmodified, and list them all as Invariant Sections of your combined work in its license notice, and that you preserve all their Warranty Disclaimers. The combined work need only contain one copy of this License, and multiple identical Invariant Sections may be replaced with a single copy. If there are multiple Invariant Sections with the same name but different contents, make the title of each such section unique by adding at the end of it, in parentheses, the name of the original author or publisher of that section if known, or else a unique number. Make the same adjustment to the section titles in the list of Invariant Sections in the license notice of the combined work. In the combination, you must combine any sections Entitled "History" in the various original documents, forming one section Entitled "History"; likewise combine any sections Entitled "Acknowledgements", and any sections Entitled "Dedications". You must delete all sections Entitled "Endorsements." 6. COLLECTIONS OF DOCUMENTS You may make a collection consisting of the Document and other documents released under this License, and replace the individual copies of this License in the various documents with a single copy that is included in the collection, provided that you follow the rules of this License for verbatim copying of each of the documents in all other respects. You may extract a single document from such a collection, and distribute it individually under this License, provided you insert a copy of this License into the extracted document, and follow this License in all other respects regarding verbatim copying of that document. 7. AGGREGATION WITH INDEPENDENT WORKS A compilation of the Document or its derivatives with other separate and independent documents or works, in or on a volume of a storage or distribution medium, is called an "aggregate" if the copyright resulting from the compilation is not used to limit the legal rights of the compilation's users beyond what the individual works permit. When the Document is included in an aggregate, this License does not apply to the other works in the aggregate which are not themselves derivative works of the Document. If the Cover Text requirement of section 3 is applicable to these copies of the Document, then if the Document is less than one half of the entire aggregate, the Document's Cover Texts may be placed on covers that bracket the Document within the aggregate, or the electronic equivalent of covers if the Document is in electronic form. Otherwise they must appear on printed covers that bracket the whole aggregate. 8. TRANSLATION Translation is considered a kind of modification, so you may distribute translations of the Document under the terms of section 4. Replacing Invariant Sections with translations requires special permission from their copyright holders, but you may include translations of some or all Invariant Sections in addition to the original versions of these Invariant Sections. You may include a translation of this License, and all the license notices in the Document, and any Warranty Disclaimers, provided that you also include the original English version of this License and the original versions of those notices and disclaimers. In case of a disagreement between the translation and the original version of this License or a notice or disclaimer, the original version will prevail. If a section in the Document is Entitled "Acknowledgements", "Dedications", or "History", the requirement (section 4) to Preserve its Title (section 1) will typically require changing the actual title. 9. TERMINATION You may not copy, modify, sublicense, or distribute the Document except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, or distribute it is void, and will automatically terminate your rights under this License. However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, receipt of a copy of some or all of the same material does not give you any rights to use it. 10. FUTURE REVISIONS OF THIS LICENSE The Free Software Foundation may publish new, revised versions of the GNU Free Documentation 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. See `http://www.gnu.org/copyleft/'. Each version of the License is given a distinguishing version number. If the Document specifies that a particular numbered version of this License "or any later version" applies to it, you have the option of following the terms and conditions either of that specified version or of any later version that has been published (not as a draft) by the Free Software Foundation. If the Document does not specify a version number of this License, you may choose any version ever published (not as a draft) by the Free Software Foundation. If the Document specifies that a proxy can decide which future versions of this License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Document. 11. RELICENSING "Massive Multiauthor Collaboration Site" (or "MMC Site") means any World Wide Web server that publishes copyrightable works and also provides prominent facilities for anybody to edit those works. A public wiki that anybody can edit is an example of such a server. A "Massive Multiauthor Collaboration" (or "MMC") contained in the site means any set of copyrightable works thus published on the MMC site. "CC-BY-SA" means the Creative Commons Attribution-Share Alike 3.0 license published by Creative Commons Corporation, a not-for-profit corporation with a principal place of business in San Francisco, California, as well as future copyleft versions of that license published by that same organization. "Incorporate" means to publish or republish a Document, in whole or in part, as part of another Document. An MMC is "eligible for relicensing" if it is licensed under this License, and if all works that were first published under this License somewhere other than this MMC, and subsequently incorporated in whole or in part into the MMC, (1) had no cover texts or invariant sections, and (2) were thus incorporated prior to November 1, 2008. The operator of an MMC Site may republish an MMC contained in the site under CC-BY-SA on the same site at any time before August 1, 2009, provided the MMC is eligible for relicensing. ADDENDUM: How to use this License for your documents ==================================================== To use this License in a document you have written, include a copy of the License in the document and put the following copyright and license notices just after the title page: Copyright (C) YEAR YOUR NAME. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled ``GNU Free Documentation License''. If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts, replace the "with...Texts." line with this: with the Invariant Sections being LIST THEIR TITLES, with the Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST. If you have Invariant Sections without Cover Texts, or some other combination of the three, merge those two alternatives to suit the situation. If your document contains nontrivial examples of program code, we recommend releasing these examples in parallel under your choice of free software license, such as the GNU General Public License, to permit their use in free software.  File: gnuit.info, Node: Key Index, Next: Command Index, Prev: Distrib, Up: Top Key Index ********* [index] * Menu: * ^[]: Modes. (line 71) * ^]: Modes. (line 71) * ^A: Moving Point. (line 20) * ^B, LEFT: Moving Point. (line 8) * ^C -: Archive Files. (line 26) * ^C .: Compressing Files. (line 34) * ^C /: Splitting Files. (line 9) * ^C 2 a: Mail. (line 9) * ^C 2 b: Mail. (line 17) * ^C 2 m: Mail. (line 26) * ^C =: Comparing Files. (line 10) * ^C ^D A: DEB Packages. (line 46) * ^C ^D c: DEB Packages. (line 59) * ^C ^D C: DEB Packages. (line 33) * ^C ^D f: DEB Packages. (line 65) * ^C ^D h: DEB Packages. (line 55) * ^C ^D I: DEB Packages. (line 69) * ^C ^D i: DEB Packages. (line 17) * ^C ^D L: DEB Packages. (line 81) * ^C ^D l: DEB Packages. (line 73) * ^C ^D p: DEB Packages. (line 89) * ^C ^D P: DEB Packages. (line 41) * ^C ^D r: DEB Packages. (line 37) * ^C ^D R A: DEB Packages. (line 51) * ^C ^D R i: DEB Packages. (line 21) * ^C ^D R u: DEB Packages. (line 29) * ^C ^D S: DEB Packages. (line 85) * ^C ^D s: DEB Packages. (line 77) * ^C ^D u: DEB Packages. (line 25) * ^C a: Archive Files. (line 9) * ^C B: Comparing Files. (line 19) * ^C b -: Archive Files. (line 31) * ^C b .: Compressing Files. (line 38) * ^C b /: Splitting Files. (line 14) * ^C b 2 a: Mail. (line 13) * ^C b 2 b: Mail. (line 21) * ^C b 2 m: Mail. (line 30) * ^C b a: Archive Files. (line 13) * ^C b C: Copying Files. (line 13) * ^C b C (for directories): Copying Dirs. (line 14) * ^C b d: Comparing Dirs. (line 31) * ^C b D: Deleting Files. (line 12) * ^C b D (for directories): Deleting Dirs. (line 13) * ^C b E: Encoding Files. (line 19) * ^C b e: Encoding Files. (line 12) * ^C b f Z: Compressing Files. (line 30) * ^C b G: Inode. (line 43) * ^C b H: Linking Files. (line 13) * ^C b i: RPM Packages. (line 27) * ^C b I: RPM Packages. (line 19) * ^C b K: Encoding Files. (line 33) * ^C b k: Encoding Files. (line 26) * ^C b M: Inode. (line 12) * ^C b m D: MSDOS Files. (line 33) * ^C b m F: MSDOS Files. (line 43) * ^C b m G: MSDOS Files. (line 26) * ^C b m K: MSDOS Files. (line 59) * ^C b m M: MSDOS Files. (line 50) * ^C b m P: MSDOS Files. (line 17) * ^C b m R: MSDOS Files. (line 67) * ^C b N: RPM Packages. (line 35) * ^C b o: Compressing Files. (line 46) * ^C b O: Inode. (line 27) * ^C b R: Renaming Files. (line 13) * ^C b R (for directories): Renaming Dirs. (line 13) * ^C b r G: Inode. (line 52) * ^C b r M: Inode. (line 20) * ^C b r O: Inode. (line 36) * ^C b S: Linking Files. (line 21) * ^C b T: Moving Files. (line 13) * ^C b T (for directories): Moving Dirs. (line 14) * ^C b V: Archive Files. (line 51) * ^C b X: Archive Files. (line 41) * ^C b x: Archive Files. (line 22) * ^C b Z: Compressing Files. (line 21) * ^C b z: Compressing Files. (line 13) * ^C C (for directories): Copying Dirs. (line 10) * ^C c q: Comparing Dirs. (line 10) * ^C c t: Comparing Dirs. (line 15) * ^C d: Comparing Dirs. (line 25) * ^C D (for directories): Deleting Dirs. (line 9) * ^C E: Encoding Files. (line 15) * ^C e: Encoding Files. (line 8) * ^C ESC =: Comparing Files. (line 15) * ^C f d: Comparing Dirs. (line 20) * ^C f Z: Compressing Files. (line 25) * ^C G: Inode. (line 39) * ^C H: Linking Files. (line 9) * ^C i: RPM Packages. (line 23) * ^C I: RPM Packages. (line 15) * ^C J: Printing Files. (line 14) * ^C j: Printing Files. (line 9) * ^C K: Encoding Files. (line 29) * ^C k: Encoding Files. (line 22) * ^C M: Inode. (line 8) * ^C m D: MSDOS Files. (line 29) * ^C m d, ^C m ^D: MSDOS Files. (line 9) * ^C m F: MSDOS Files. (line 39) * ^C m G: MSDOS Files. (line 21) * ^C m K: MSDOS Files. (line 54) * ^C m L: MSDOS Files. (line 36) * ^C m M: MSDOS Files. (line 46) * ^C m P: MSDOS Files. (line 13) * ^C m R: MSDOS Files. (line 63) * ^C m T: MSDOS Files. (line 71) * ^C N: RPM Packages. (line 31) * ^C n d: Renaming Files. (line 17) * ^C n u: Renaming Files. (line 21) * ^C o: Compressing Files. (line 42) * ^C O: Inode. (line 23) * ^C P: Encrypting Files. (line 11) * ^C p: Encrypting Files. (line 8) * ^C q: RPM Packages. (line 40) * ^C R: Renaming Files. (line 9) * ^C R (for directories): Renaming Dirs. (line 9) * ^C r G: Inode. (line 47) * ^C r M: Inode. (line 16) * ^C r O: Inode. (line 31) * ^C S: Linking Files. (line 17) * ^C s: Selecting. (line 16) * ^C t: File Types. (line 9) * ^C T (for directories): Moving Dirs. (line 10) * ^C U: Dirs Usage. (line 9) * ^C u: Selecting. (line 23) * ^C V: Archive Files. (line 46) * ^C W: Wiping Files. (line 9) * ^C X: Archive Files. (line 36) * ^C x: Archive Files. (line 17) * ^C Z: Compressing Files. (line 17) * ^C z: Compressing Files. (line 9) * ^C ~: Packing Files. (line 27) * ^E: Moving Point. (line 23) * ^F, RIGHT: Moving Point. (line 11) * ^H, BKSPC: Erasing. (line 11) * ^K: Erasing. (line 28) * ^L: Refreshing. (line 20) * ^O, ESC o: Modes. (line 32) * ^R, ^Xr: Isearch. (line 25) * ^S, ^Xs: Isearch. (line 18) * ^SPC: Setting Mark. (line 8) * ^U: Erasing. (line 24) * ^W: Erasing. (line 41) * ^X 0: Modes. (line 21) * ^X 1: Modes. (line 26) * ^X 2: Modes. (line 29) * ^X 4 a: Editing Files. (line 21) * ^X ^A: Documentation. (line 24) * ^X ^F: Editing Files. (line 17) * ^X ^I: Inserting Text. (line 24) * ^X ^L: Resetting. (line 9) * ^X ^P: Dirs History. (line 23) * ^X ^R: Dirs History. (line 28) * ^X ^X: Setting Mark. (line 12) * ^X b m: Compiling. (line 13) * ^X d, ^X ^D: Changing Dirs. (line 10) * ^X E: Environment. (line 9) * ^X e: Editing Files. (line 13) * ^X G: Grep. (line 13) * ^X g: Grep. (line 9) * ^X h: Documentation. (line 20) * ^X H: Environment. (line 13) * ^X I: Spell Checking Files. (line 9) * ^X k: Processes. (line 50) * ^X N: Dirs History. (line 19) * ^X p: Locking. (line 12) * ^X P: Moving. (line 49) * ^X q: Documentation. (line 8) * ^X S: Sync. (line 9) * ^X T: Sysinfo. (line 9) * ^X v: Viewing Files. (line 13) * ^X W: Searching Files. (line 20) * ^X w: Searching Files. (line 17) * ^X z: Shell. (line 12) * ^Y: Yanking. (line 9) * DEL, ^D: Erasing. (line 8) * DOWN, ^N: Moving. (line 16) * END, ESC >: Moving. (line 23) * ESC %: Searching Files. (line 9) * ESC &: Searching Files. (line 13) * ESC +: Selecting. (line 28) * ESC -: Selecting. (line 33) * ESC .: Hot Keys. (line 14) * ESC /: Hot Keys. (line 11) * ESC 5 (for directories): Copying Dirs. (line 10) * ESC 6 (for directories): Moving Dirs. (line 10) * ESC 8 (for directories): Deleting Dirs. (line 9) * ESC \: Erasing. (line 36) * ESC a c: Changing Dirs. (line 15) * ESC a o: Changing Dirs. (line 19) * ESC b: Moving Point. (line 14) * ESC BKSPC: Erasing. (line 14) * ESC c: Case Changes. (line 17) * ESC d: Erasing. (line 17) * ESC e a: Modes. (line 66) * ESC e d: Modes. (line 48) * ESC e f: Modes. (line 60) * ESC e m: Modes. (line 57) * ESC e o: Modes. (line 45) * ESC e S: Modes. (line 54) * ESC e s: Modes. (line 51) * ESC ESC 1: Hot Keys. (line 23) * ESC ESC 2: Hot Keys. (line 26) * ESC ESC RET: Inserting Text. (line 20) * ESC f: Moving Point. (line 17) * ESC g: Moving. (line 32) * ESC h: Hot Keys. (line 17) * ESC i: Hot Keys. (line 20) * ESC j: Moving. (line 35) * ESC k: Erasing. (line 20) * ESC l: Case Changes. (line 9) * ESC m a: Mounting. (line 26) * ESC m b: Mounting. (line 30) * ESC m c: Mounting. (line 34) * ESC m f: Mounting. (line 38) * ESC m j: Mounting. (line 46) * ESC m t: Mounting. (line 52) * ESC m z: Mounting. (line 42) * ESC n: History. (line 19) * ESC p: History. (line 15) * ESC P a, ESC P l, ESC P u: Processes. (line 42) * ESC P b, ESC P c, ESC P e: Processes. (line 35) * ESC P T: Processes. (line 46) * ESC P x, ESC P y: Processes. (line 42) * ESC r a: Mounting. (line 56) * ESC r b: Mounting. (line 60) * ESC r c: Mounting. (line 64) * ESC r f: Mounting. (line 69) * ESC r j: Mounting. (line 77) * ESC r t: Mounting. (line 84) * ESC r z: Mounting. (line 73) * ESC RET: Inserting Text. (line 16) * ESC s d: Sorting. (line 24) * ESC s e: Sorting. (line 16) * ESC S f: Sysinfo. (line 13) * ESC s g i: Sorting. (line 36) * ESC s g n: Sorting. (line 44) * ESC S m: Sysinfo. (line 17) * ESC s m: Sorting. (line 28) * ESC s n: Sorting. (line 12) * ESC s o i: Sorting. (line 32) * ESC s o n: Sorting. (line 40) * ESC S q: Sysinfo. (line 21) * ESC S s: Sysinfo. (line 25) * ESC s s: Sorting. (line 20) * ESC S u: Sysinfo. (line 29) * ESC s u: Sorting. (line 49) * ESC S v: Sysinfo. (line 38) * ESC S w: Sysinfo. (line 43) * ESC SPC: Erasing. (line 32) * ESC u: Case Changes. (line 13) * ESC w: Erasing. (line 45) * ESC x r m: Mail. (line 34) * F1, ESC 1, ^X i: Documentation. (line 12) * F10, ESC 0, ^X ^C, ^X c: Exit. (line 8) * F2, ESC 2, ^X a: Actions. (line 20) * F3, ESC 3: Viewing Files. (line 9) * F4, ESC 4: Editing Files. (line 9) * F5 (for directories): Copying Dirs. (line 10) * F5, ESC 5, ^C C: Copying Files. (line 9) * F6 (for directories): Moving Dirs. (line 10) * F6, ESC 6, ^C T: Moving Files. (line 9) * F7, ESC 7, ^X M: Creating Dirs. (line 9) * F8 (for directories): Deleting Dirs. (line 9) * F8, ESC 8, ^C D: Deleting Files. (line 8) * F9, ESC 9, ^X m: Compiling. (line 9) * HOME, ESC <: Moving. (line 20) * INS, ^T, ^X \, ^\: Selecting. (line 9) * PGDOWN, ^V: Moving. (line 29) * PGUP, ESC v: Moving. (line 26) * TAB, ^I, ^X o: Moving. (line 45) * UP, ^P: Moving. (line 13)  File: gnuit.info, Node: Command Index, Next: Variable Index, Prev: Key Index, Up: Top Command Index ************* [index] * Menu: * adapt-current-directory: Changing Dirs. (line 15) * Adapt-other-directory: Changing Dirs. (line 19) * apropos: Documentation. (line 24) * ASCII-MAIL: Mail. (line 9) * B-ASCII-MAIL: Mail. (line 13) * B-BINARY-MAIL: Mail. (line 21) * B-BZIP2-COMPRESS: Compressing Files. (line 38) * B-BZIP2-UNCOMPRESS: Compressing Files. (line 46) * B-CHGRP: Inode. (line 43) * B-CHMOD: Inode. (line 12) * B-CHOWN: Inode. (line 27) * B-COMPRESS: Compressing Files. (line 13) * B-COPY: Copying Files. (line 13) * B-COPY (for directories): Copying Dirs. (line 14) * B-DELETE: Deleting Files. (line 12) * B-DELETE (for directories): Deleting Dirs. (line 13) * B-DIRR-DIFF: Comparing Dirs. (line 31) * B-GENERIC-UNPACK: Archive Files. (line 41) * B-GENERIC-UNPACK-INTO: Archive Files. (line 51) * B-LINK: Linking Files. (line 13) * B-MAKE: Compiling. (line 13) * B-MIME-MAIL: Mail. (line 30) * B-MIME-PACK: Encoding Files. (line 26) * B-MIME-UNPACK: Encoding Files. (line 33) * B-MOVE: Moving Files. (line 13) * B-MOVE (for directories): Moving Dirs. (line 14) * B-MTOOLS-DELETE: MSDOS Files. (line 33) * B-MTOOLS-FORMAT: MSDOS Files. (line 43) * B-MTOOLS-GET: MSDOS Files. (line 26) * B-MTOOLS-MKDIR: MSDOS Files. (line 50) * B-MTOOLS-PUT: MSDOS Files. (line 17) * B-MTOOLS-RENAME: MSDOS Files. (line 67) * B-MTOOLS-RMDIR: MSDOS Files. (line 59) * B-R-CHGRP: Inode. (line 52) * B-R-CHMOD: Inode. (line 20) * B-R-CHOWN: Inode. (line 36) * B-RENAME: Renaming Files. (line 13) * B-RENAME (for directories): Renaming Dirs. (line 13) * B-RPM-INSTALL: RPM Packages. (line 19) * B-RPM-UNINSTALL: RPM Packages. (line 27) * B-RPM-UPGRADE: RPM Packages. (line 35) * B-SPLIT: Splitting Files. (line 14) * B-SYMLINK: Linking Files. (line 21) * B-TAR: Archive Files. (line 13) * B-TAR-BZIP2: Archive Files. (line 31) * B-TAR-COMPRESS: Archive Files. (line 22) * B-UNCOMPRESS: Compressing Files. (line 21) * B-UUDECODE: Encoding Files. (line 19) * B-UUENCODE: Encoding Files. (line 12) * backward-char: Moving Point. (line 8) * backward-delete-char: Erasing. (line 11) * backward-kill-word: Erasing. (line 14) * backward-word: Moving Point. (line 14) * beginning-of-line: Moving Point. (line 20) * beginning-of-panel: Moving. (line 20) * BF-UNCOMPRESS: Compressing Files. (line 30) * bin-packing: Packing Files. (line 27) * BINARY-MAIL: Mail. (line 17) * BZIP2-COMPRESS: Compressing Files. (line 34) * BZIP2-UNCOMPRESS: Compressing Files. (line 42) * capitalize-word: Case Changes. (line 17) * change-directory: Changing Dirs. (line 10) * CHANGE-LOG: Editing Files. (line 21) * CHGRP: Inode. (line 39) * CHMOD: Inode. (line 8) * CHOWN: Inode. (line 23) * compare: Comparing Files. (line 19) * COMPRESS: Compressing Files. (line 9) * copy: Copying Files. (line 9) * copy (for directories): Copying Dirs. (line 10) * DATE: Sysinfo. (line 9) * DECRYPT: Encrypting Files. (line 11) * delete: Deleting Files. (line 8) * delete (for directories): Deleting Dirs. (line 9) * delete-char: Erasing. (line 8) * delete-horizontal-space: Erasing. (line 36) * DIFF: Comparing Files. (line 10) * DIRECTORY-USAGE: Dirs Usage. (line 9) * DIRR-DIFF: Comparing Dirs. (line 25) * DISK-FREE-SPACE: Sysinfo. (line 25) * downcase-word: Case Changes. (line 9) * DPKG-CONFIGURE: DEB Packages. (line 33) * DPKG-CONTENTS: DEB Packages. (line 59) * DPKG-FIELD: DEB Packages. (line 65) * DPKG-HELP: DEB Packages. (line 55) * DPKG-INFO: DEB Packages. (line 69) * DPKG-INSTALL: DEB Packages. (line 17) * DPKG-LISTFILES: DEB Packages. (line 81) * DPKG-LISTPKGS: DEB Packages. (line 73) * DPKG-PRINTAVAIL: DEB Packages. (line 89) * DPKG-PURGE: DEB Packages. (line 41) * DPKG-RECORDAVAIL: DEB Packages. (line 46) * DPKG-REMOVE: DEB Packages. (line 37) * DPKG-SEARCH: DEB Packages. (line 85) * DPKG-STATUS: DEB Packages. (line 77) * DPKG-UNPACK: DEB Packages. (line 25) * EDIT: Editing Files. (line 9) * ENCRYPT: Encrypting Files. (line 8) * end-of-line: Moving Point. (line 23) * end-of-panel: Moving. (line 23) * enlarge-other-panel: Modes. (line 21) * enlarge-panel: Modes. (line 26) * entry-to-input-line: Inserting Text. (line 16) * ENV: Environment. (line 9) * exchange-point-and-mark: Setting Mark. (line 12) * exit: Exit. (line 8) * F-UNCOMPRESS: Compressing Files. (line 25) * FAST-DIFF: Comparing Dirs. (line 20) * FILE-ACTION: Actions. (line 20) * FILE-CREATE: Editing Files. (line 17) * FILE-TYPE: File Types. (line 9) * FIND: Searching Files. (line 9) * FINGER: Sysinfo. (line 13) * FIRST-FLOPPY-DIR: Hot Keys. (line 23) * forward-char: Moving Point. (line 11) * forward-word: Moving Point. (line 17) * GENERIC-UNPACK: Archive Files. (line 36) * GENERIC-UNPACK-INTO: Archive Files. (line 46) * GITPS, PS: Processes. (line 35) * GREP: Grep. (line 9) * HOME-DIR: Hot Keys. (line 17) * horizontal-scroll-left: Moving. (line 32) * horizontal-scroll-right: Moving. (line 35) * HTML: Documentation. (line 20) * INCLUDE-DIR: Hot Keys. (line 20) * INFO: Documentation. (line 12) * isearch-backward: Isearch. (line 25) * isearch-forward: Isearch. (line 18) * ISPELL: Spell Checking Files. (line 9) * just-one-space: Erasing. (line 32) * KILL: Processes. (line 50) * kill-line: Erasing. (line 20) * kill-region: Erasing. (line 41) * kill-ring-save: Erasing. (line 45) * kill-to-beginning-of-line: Erasing. (line 24) * kill-to-end-of-line: Erasing. (line 28) * kill-word: Erasing. (line 17) * LAST-BACKUP-DIFF: Comparing Files. (line 15) * LINK: Linking Files. (line 9) * LOCATE: Searching Files. (line 13) * lock: Locking. (line 12) * MAKE: Compiling. (line 9) * make-directory: Creating Dirs. (line 9) * MAN: Documentation. (line 8) * MIME-MAIL: Mail. (line 26) * MOUNT-A: Mounting. (line 26) * MOUNT-B: Mounting. (line 30) * MOUNT-CDROM: Mounting. (line 34) * MOUNT-FLOPPY: Mounting. (line 38) * MOUNT-JAZ: Mounting. (line 46) * MOUNT-THESE: Mounting. (line 52) * MOUNT-ZIP: Mounting. (line 42) * MOUNTED-FILE-SYSTEMS: Sysinfo. (line 17) * move: Moving Files. (line 9) * move (for directories): Moving Dirs. (line 10) * MPACK: Encoding Files. (line 22) * MTOOLS-CHDIR: MSDOS Files. (line 9) * MTOOLS-DELETE: MSDOS Files. (line 29) * MTOOLS-DIR: MSDOS Files. (line 36) * MTOOLS-FORMAT: MSDOS Files. (line 39) * MTOOLS-GET: MSDOS Files. (line 21) * MTOOLS-MKDIR: MSDOS Files. (line 46) * MTOOLS-PUT: MSDOS Files. (line 13) * MTOOLS-RENAME: MSDOS Files. (line 63) * MTOOLS-RMDIR: MSDOS Files. (line 54) * MTOOLS-TYPE: MSDOS Files. (line 71) * MULTIPLE-EDIT: Editing Files. (line 13) * MULTIPLE-VIEW: Viewing Files. (line 13) * MUNPACK: Encoding Files. (line 29) * name-downcase: Renaming Files. (line 17) * name-upcase: Renaming Files. (line 21) * next-directory: Dirs History. (line 19) * next-history-element: History. (line 19) * next-line: Moving. (line 16) * other-panel: Moving. (line 45) * other-path-to-input-line: Inserting Text. (line 20) * panel-enable-abbrevsize: Modes. (line 54) * panel-enable-all: Modes. (line 66) * panel-enable-date-time: Modes. (line 48) * panel-enable-full-name: Modes. (line 60) * panel-enable-mode: Modes. (line 57) * panel-enable-next-mode: Modes. (line 71) * panel-enable-owner-group: Modes. (line 45) * panel-enable-size: Modes. (line 51) * panel-sort-by-date: Sorting. (line 24) * panel-sort-by-extension: Sorting. (line 16) * panel-sort-by-group-id: Sorting. (line 36) * panel-sort-by-group-name: Sorting. (line 44) * panel-sort-by-mode: Sorting. (line 28) * panel-sort-by-name: Sorting. (line 12) * panel-sort-by-owner-id: Sorting. (line 32) * panel-sort-by-owner-name: Sorting. (line 40) * panel-sort-by-size: Sorting. (line 20) * panel-sort-next-method: Sorting. (line 49) * previous-directory: Dirs History. (line 23) * previous-history-element: History. (line 15) * previous-line: Moving. (line 13) * PRINT-JOB: Printing Files. (line 9) * PRINT-JOB-LIST: Printing Files. (line 14) * PSTREE: Processes. (line 46) * quick-compare-panels: Comparing Dirs. (line 10) * QUOTA: Sysinfo. (line 21) * R-CHGRP: Inode. (line 47) * R-CHMOD: Inode. (line 16) * R-CHOWN: Inode. (line 31) * R-DPKG-INSTALL: DEB Packages. (line 21) * R-DPKG-RECORDAVAIL: DEB Packages. (line 51) * R-DPKG-UNPACK: DEB Packages. (line 29) * READ-MAIL: Mail. (line 34) * RECURSIVE-GREP: Grep. (line 13) * refresh: Refreshing. (line 20) * RENAME: Renaming Files. (line 9) * RENAME (for directories): Renaming Dirs. (line 9) * reset-directory-history: Dirs History. (line 28) * ROOT-DIR: Hot Keys. (line 11) * RPM-INSTALL: RPM Packages. (line 15) * RPM-QUERY: RPM Packages. (line 40) * RPM-UNINSTALL: RPM Packages. (line 23) * RPM-UPGRADE: RPM Packages. (line 31) * scroll-down: Moving. (line 26) * scroll-up: Moving. (line 29) * SECOND-FLOPPY-DIR: Hot Keys. (line 26) * select-entry: Selecting. (line 9) * select-extension: Selecting. (line 28) * select-files-matching-pattern: Selecting. (line 16) * selected-entries-to-input-line: Inserting Text. (line 24) * set-mark: Setting Mark. (line 8) * set-scroll-step: Moving. (line 42) * SPLIT: Splitting Files. (line 9) * SUB-SHELL: Shell. (line 12) * switch-panels: Moving. (line 49) * SYMLINK: Linking Files. (line 17) * SYNC: Sync. (line 9) * TAR: Archive Files. (line 9) * TAR-BZIP2: Archive Files. (line 26) * TAR-COMPRESS: Archive Files. (line 17) * thoroughly-compare-panels: Comparing Dirs. (line 15) * tty-mode: Modes. (line 32) * TTY-RESET: Resetting. (line 9) * two-panel-mode: Modes. (line 29) * UMOUNT-A: Mounting. (line 56) * UMOUNT-B: Mounting. (line 60) * UMOUNT-FLOPPY: Mounting. (line 69) * UMOUNT-JAZ: Mounting. (line 77) * UMOUNT-THESE: Mounting. (line 84) * UMOUNT-ZIP: Mounting. (line 73) * UNCOMPRESS: Compressing Files. (line 17) * unselect-extension: Selecting. (line 33) * unselect-files-matching-pattern: Selecting. (line 23) * up-one-dir: Hot Keys. (line 14) * upcase-word: Case Changes. (line 13) * USERS: Sysinfo. (line 29) * UUDECODE: Encoding Files. (line 15) * UUENCODE: Encoding Files. (line 8) * VIEW: Viewing Files. (line 9) * VIRTUAL-MEMORY-STATUS: Sysinfo. (line 38) * WHEREIS: Searching Files. (line 17) * WHICH: Searching Files. (line 20) * WHO: Sysinfo. (line 43) * WIPE: Wiping Files. (line 9) * XHOST: Environment. (line 13) * yank: Yanking. (line 9)  File: gnuit.info, Node: Variable Index, Next: Concept Index, Prev: Command Index, Up: Top Variable Index ************** [index] * Menu: * AnsiColors: Setup. (line 14) * CommandLineModeHelp: GITFM-Setup. (line 75) * ConfirmOnExit: GITFM-Setup. (line 38) * EDITOR: Environment Variables. (line 41) * GNUIT_BROWSER: Environment Variables. (line 41) * GNUIT_EDITOR: Environment Variables. (line 41) * GNUIT_RMAIL: Environment Variables. (line 41) * GNUIT_SHELL: Environment Variables. (line 41) * GNUIT_VMSTAT: Environment Variables. (line 41) * GroupDigits: GITFM-Setup. (line 33) * HistoryFile: GITFM-Setup. (line 43) * InfoDisplay: GITFM-Setup. (line 48) * LeadingDotMatch: GITFM-Setup. (line 54) * MaxUnscaledDigits: GITFM-Setup. (line 28) * NormalModeHelp: GITFM-Setup. (line 75) * SHELL: Environment Variables. (line 41) * StartupFileDisplayMode: GITFM-Setup. (line 13) * StartupFileSortMethod: GITFM-Setup. (line 20) * StartupScrollStep: Setup. (line 26) * TERM: Configuration Files. (line 14) * TypeSensitivity: GITFM-Setup. (line 62) * UseLastScreenChar: Setup. (line 21)  File: gnuit.info, Node: Concept Index, Next: Description, Prev: Variable Index, Up: Top Concept Index ************* [index] * Menu: * Adapt directory: Changing Dirs. (line 15) * Adding and removing hosts: Environment. (line 13) * Archive: Archive Files. (line 9) * Background directory copy: Copying Dirs. (line 14) * Background directory delete: Deleting Dirs. (line 13) * Background directory diff: Comparing Dirs. (line 31) * Background directory move: Moving Dirs. (line 14) * Background directory rename: Renaming Dirs. (line 13) * Background file copy: Copying Files. (line 13) * Background file delete: Deleting Files. (line 12) * Background file move: Moving Files. (line 13) * Background file rename: Renaming Files. (line 13) * Background file split: Splitting Files. (line 14) * Background make: Compiling. (line 13) * Backward char: Moving Point. (line 8) * Backward delete char: Erasing. (line 11) * Backward kill word: Erasing. (line 14) * Backward word: Moving Point. (line 14) * bash: Shell. (line 12) * Beginning of line: Moving Point. (line 20) * Beginning of panel: Moving. (line 20) * Binary comparison: Comparing Files. (line 19) * Binary files by mail: Mail. (line 17) * Browsing through the process list: Processes. (line 35) * bzip2: Compressing Files. (line 34) * Capitalize word: Case Changes. (line 17) * Change the current panel directory: Changing Dirs. (line 15) * Change the other panel directory: Changing Dirs. (line 19) * Changing directory: Changing Dirs. (line 10) * Changing the current directory: Changing Dirs. (line 10) * Changing the directory: Changing Dirs. (line 10) * Changing the file's group: Inode. (line 39) * Changing the file's mode: Inode. (line 8) * Changing the file's owner: Inode. (line 23) * Changing the group in background: Inode. (line 43) * Changing the group recursively: Inode. (line 47) * Changing the group recursively in background: Inode. (line 52) * Changing the inode's group: Inode. (line 39) * Changing the inode's mode: Inode. (line 8) * Changing the inode's owner: Inode. (line 23) * Changing the mode in background: Inode. (line 12) * Changing the mode recursively: Inode. (line 16) * Changing the mode recursively in background: Inode. (line 20) * Changing the owner in background: Inode. (line 27) * Changing the owner recursively: Inode. (line 31) * Changing the owner recursively in background: Inode. (line 36) * chdir: Changing Dirs. (line 10) * chgrp: Inode. (line 39) * chmod: Inode. (line 8) * chown: Inode. (line 23) * Comparing directories quickly: Comparing Dirs. (line 10) * Comparing directories thoroughly: Comparing Dirs. (line 15) * Comparing panels quickly: Comparing Dirs. (line 10) * Comparing panels thoroughly: Comparing Dirs. (line 15) * Compile: Compiling. (line 9) * Compiling programs: Compiling. (line 9) * compress: Compressing Files. (line 9) * Compressing directories: Compressing Files. (line 9) * Compressing directories in background: Compressing Files. (line 13) * Compressing files: Compressing Files. (line 9) * Compressing files in background: Compressing Files. (line 13) * Console lock: Locking. (line 12) * Convert to lower case: Case Changes. (line 9) * Convert to upper case: Case Changes. (line 13) * Copy entry name to input line.: Inserting Text. (line 16) * Copying directories: Copying Dirs. (line 10) * Copying directories in background: Copying Dirs. (line 14) * Copying files: Copying Files. (line 9) * Copying files in background: Copying Files. (line 13) * Create directory: Creating Dirs. (line 9) * Create file: Editing Files. (line 17) * Creating a directory: Creating Dirs. (line 9) * Creating bzip2 compressed tar archives: Archive Files. (line 26) * Creating bzip2 compressed tar archives in background: Archive Files. (line 31) * Creating compressed tar archives: Archive Files. (line 17) * Creating compressed tar archives in background: Archive Files. (line 22) * Creating tar archives: Archive Files. (line 9) * Creating tar archives in background: Archive Files. (line 13) * csh: Shell. (line 12) * Current disk quota: Sysinfo. (line 21) * Cursor backward: Moving Point. (line 8) * Cursor backward one word: Moving Point. (line 14) * Cursor down one entry: Moving. (line 16) * Cursor down one page: Moving. (line 26) * Cursor end: Moving. (line 23) * Cursor forward: Moving Point. (line 11) * Cursor forward one word: Moving Point. (line 17) * Cursor home: Moving. (line 20) * Cursor to BOL: Moving Point. (line 20) * Cursor to EOL: Moving Point. (line 23) * Cursor to the other panel: Moving. (line 45) * Cursor up one entry: Moving. (line 13) * Cursor up one page: Moving. (line 29) * date: Sysinfo. (line 9) * Date and time: Modes. (line 48) * Date, time: Modes. (line 48) * Decoding files: Encoding Files. (line 15) * Decoding files in background: Encoding Files. (line 19) * Decompressing directories: Compressing Files. (line 17) * Decompressing directories in background: Compressing Files. (line 21) * Decompressing directories/links: Compressing Files. (line 25) * Decompressing directories/links in background: Compressing Files. (line 30) * Decompressing files: Compressing Files. (line 17) * Decompressing files in background: Compressing Files. (line 21) * Decompressing files/links: Compressing Files. (line 25) * Decompressing files/links in background: Compressing Files. (line 30) * Decrypting the current file: Encrypting Files. (line 11) * Delete char: Erasing. (line 8) * Delete horizontal space: Erasing. (line 36) * Delete line: Erasing. (line 20) * Delete spaces: Erasing. (line 36) * Delete word backward: Erasing. (line 14) * Delete word forward: Erasing. (line 17) * Deleting directories: Deleting Dirs. (line 9) * Deleting directories in background: Deleting Dirs. (line 13) * Deleting files: Deleting Files. (line 8) * Deleting files in background: Deleting Files. (line 12) * diff: Comparing Files. (line 10) * Differences between ascii files: Comparing Files. (line 10) * Differences between directories: Comparing Dirs. (line 20) * Differences between file and backup: Comparing Files. (line 15) * Differences between two directories: Comparing Dirs. (line 25) * Directory copy: Copying Dirs. (line 10) * Directory delete: Deleting Dirs. (line 9) * Directory diff: Comparing Dirs. (line 20) * Directory history reset: Dirs History. (line 28) * Directory mode: Modes. (line 57) * Directory move: Moving Dirs. (line 10) * Directory rename: Renaming Dirs. (line 9) * Directory size: Modes. (line 51) * Directory usage: Dirs Usage. (line 9) * Disk free space: Sysinfo. (line 25) * Downcase file names: Renaming Files. (line 17) * Downcase word: Case Changes. (line 9) * du: Dirs Usage. (line 9) * Editing a file: Editing Files. (line 9) * Editing multiple files: Editing Files. (line 13) * Editing the ChangeLog: Editing Files. (line 21) * Emacs rmail: Mail. (line 34) * Enable all: Modes. (line 66) * Enable next mode: Modes. (line 71) * Encoding files: Encoding Files. (line 8) * Encoding files in background: Encoding Files. (line 12) * Encrypting the current file: Encrypting Files. (line 8) * End of line: Moving Point. (line 23) * End of panel: Moving. (line 23) * Enlarge other panel: Modes. (line 21) * Enlarge panel: Modes. (line 26) * Entire screen: Modes. (line 15) * env: Environment. (line 9) * Exchange point and mark: Setting Mark. (line 12) * Exiting: Exit. (line 8) * Extracting files from archives: Archive Files. (line 36) * File action: Actions. (line 20) * File copy: Copying Files. (line 9) * File create: Editing Files. (line 17) * File delete: Deleting Files. (line 8) * File edit: Editing Files. (line 9) * File mode: Modes. (line 57) * File move: Moving Files. (line 9) * File or directory mode: Modes. (line 57) * File or directory size: Modes. (line 51) * File rename: Renaming Files. (line 9) * File search: Searching Files. (line 9) * File size: Modes. (line 51) * File split: Splitting Files. (line 9) * File system status: Sysinfo. (line 25) * File view: Viewing Files. (line 9) * File wipe: Wiping Files. (line 9) * find: Searching Files. (line 9) * finger: Sysinfo. (line 13) * First entry: Moving. (line 20) * Forward char: Moving Point. (line 11) * Forward word: Moving Point. (line 17) * Free disk space: Sysinfo. (line 25) * Full directory info: Modes. (line 66) * Full directory name: Modes. (line 60) * Full file info: Modes. (line 66) * Full file name: Modes. (line 60) * Full file or directory name: Modes. (line 60) * Full info: Modes. (line 66) * Full name: Modes. (line 60) * gitaction: gitaction. (line 6) * gitfm: gitfm. (line 6) * gitkeys: gitkeys. (line 6) * gitmount: gitmount. (line 6) * gitps: gitps. (line 6) * gitregrep: gitrgrep. (line 6) * gitrfgrep: gitrgrep. (line 6) * gitrgrep: gitrgrep. (line 6) * gitunpack: gitunpack. (line 6) * gitview: gitview. (line 6) * gitwipe: gitwipe. (line 6) * Go to ..: Hot Keys. (line 14) * Go to /: Hot Keys. (line 11) * Go to the $HOME directory: Hot Keys. (line 17) * Go to the /usr/include directory: Hot Keys. (line 20) * Go to the first floppy mount point: Hot Keys. (line 23) * Go to the home directory: Hot Keys. (line 17) * Go to the include directory: Hot Keys. (line 20) * Go to the other panel: Moving. (line 45) * Go to the parent directory: Hot Keys. (line 14) * Go to the root directory: Hot Keys. (line 11) * Go to the second floppy mount point: Hot Keys. (line 26) * Go to the ~ directory: Hot Keys. (line 17) * Go up one directory: Hot Keys. (line 14) * grep: Grep. (line 9) * Group and owner: Modes. (line 45) * Group, owner: Modes. (line 45) * gunzip: Compressing Files. (line 17) * gzip: Compressing Files. (line 9) * Half screen: Modes. (line 15) * Hard links to files: Linking Files. (line 9) * Hot Keys: Hot Keys. (line 7) * Incremental search backward: Isearch. (line 25) * Incremental search forward: Isearch. (line 18) * Isearch backward: Isearch. (line 25) * Isearch forward: Isearch. (line 18) * ispell: Spell Checking Files. (line 9) * Just one space: Erasing. (line 32) * Kill line: Erasing. (line 20) * Kill region: Erasing. (line 41) * Kill ring save: Erasing. (line 45) * Kill to beginning of line: Erasing. (line 24) * Kill to end of line: Erasing. (line 28) * kill word: Erasing. (line 17) * Killing processes: Processes. (line 50) * Last backup diff: Comparing Files. (line 15) * Last entry: Moving. (line 23) * Linking files in background: Linking Files. (line 13) * locate: Searching Files. (line 13) * Locating files: Searching Files. (line 13) * Locking the console: Locking. (line 12) * Logged in users: Sysinfo. (line 29) * Looking at the environment: Environment. (line 9) * lpr: Printing Files. (line 9) * Major modes: Modes. (line 15) * make: Compiling. (line 9) * Make directory: Creating Dirs. (line 9) * Making a directory: Creating Dirs. (line 9) * Mark entry: Selecting. (line 9) * Mime encoded files by mail: Mail. (line 26) * Minor modes: Modes. (line 41) * mount: Mounting. (line 52) * Mounted file systems list: Sysinfo. (line 17) * Mounting subdirectories: Mounting. (line 52) * Mounting the cdrom: Mounting. (line 34) * Mounting the first floppy: Mounting. (line 26) * Mounting the floppy: Mounting. (line 26) * Mounting the jaz drive: Mounting. (line 46) * Mounting the second floppy: Mounting. (line 30) * Mounting the zip drive: Mounting. (line 42) * Mounting these file systems: Mounting. (line 52) * Moving directories: Moving Dirs. (line 10) * Moving directories in background: Moving Dirs. (line 14) * Moving files: Moving Files. (line 9) * Moving files in background: Moving Files. (line 13) * mpack: Encoding Files. (line 22) * Multiple edit: Editing Files. (line 13) * munpack: Encoding Files. (line 29) * Next directory history entry: Dirs History. (line 19) * Next history element: History. (line 19) * Next sort method: Sorting. (line 49) * No panels mode: Modes. (line 32) * One panel: Modes. (line 21) * Other panel path to input line: Inserting Text. (line 20) * Owner and group: Modes. (line 45) * Owner, group: Modes. (line 45) * Pack files into bins: Packing Files. (line 27) * Previous directory history entry: Dirs History. (line 23) * Previous history element: History. (line 15) * printing: Printing Files. (line 9) * Printing files: Printing Files. (line 9) * Program search: Searching Files. (line 17) * Quota: Sysinfo. (line 21) * Re-reading directories.: Refreshing. (line 20) * Reading mail: Mail. (line 34) * Reading the html documentation: Documentation. (line 20) * Reading the info documentation: Documentation. (line 12) * Reading the manual pages: Documentation. (line 8) * Recursive grep: Grep. (line 13) * Refreshing the screen.: Refreshing. (line 20) * regexp: Grep. (line 9) * Renaming directories: Renaming Dirs. (line 9) * Renaming directories in background: Renaming Dirs. (line 13) * Renaming files: Renaming Files. (line 9) * Renaming files in background: Renaming Files. (line 13) * Reset the directory history: Dirs History. (line 28) * Resetting the terminal: Resetting. (line 9) * Save and delete region: Erasing. (line 41) * Save into the kill ring: Erasing. (line 45) * Scroll left: Moving. (line 32) * Scroll right: Moving. (line 35) * Scroll step: Moving. (line 42) * Searching binaries: Searching Files. (line 20) * Searching files: Searching Files. (line 9) * Searching for key-bindings: Documentation. (line 24) * Searching patterns in files: Grep. (line 9) * Searching programs: Searching Files. (line 20) * Searching regular expressions: Grep. (line 9) * Select entry: Selecting. (line 9) * Selected entries to input line: Inserting Text. (line 24) * Selects files matching extension: Selecting. (line 28) * Selects files matching pattern: Selecting. (line 16) * Sending ascii mail: Mail. (line 9) * Sending ascii mail in background: Mail. (line 13) * Sending binary mail: Mail. (line 17) * Sending binary mail in background: Mail. (line 21) * Sending files by mail: Mail. (line 13) * Sending mail: Mail. (line 13) * Sending mime mail: Mail. (line 26) * Sending mime mail in background: Mail. (line 30) * Sending text by mail: Mail. (line 9) * Set mark: Setting Mark. (line 8) * Set the mark: Setting Mark. (line 8) * sh: Shell. (line 12) * Shell: Shell. (line 12) * Sorted by date: Sorting. (line 24) * Sorted by extension: Sorting. (line 16) * Sorted by group id: Sorting. (line 36) * Sorted by group name: Sorting. (line 44) * Sorted by mode: Sorting. (line 28) * Sorted by name: Sorting. (line 12) * Sorted by owner id: Sorting. (line 32) * Sorted by owner name: Sorting. (line 40) * Sorted by size: Sorting. (line 20) * Sorting: Sorting. (line 6) * Sorting by date: Sorting. (line 24) * Sorting by extension: Sorting. (line 16) * Sorting by group id: Sorting. (line 36) * Sorting by group name: Sorting. (line 44) * Sorting by mode: Sorting. (line 28) * Sorting by name: Sorting. (line 12) * Sorting by owner id: Sorting. (line 32) * Sorting by owner name: Sorting. (line 40) * Sorting by size: Sorting. (line 20) * Spell checking: Spell Checking Files. (line 9) * Splitting files: Splitting Files. (line 9) * Splitting files in background: Splitting Files. (line 14) * Swapping: Sysinfo. (line 38) * Switch panels: Moving. (line 49) * Symbolic links to files: Linking Files. (line 17) * sync: Sync. (line 9) * Synchronizing file systems: Sync. (line 9) * System users: Sysinfo. (line 29) * Tar archive: Archive Files. (line 9) * tcsh: Shell. (line 12) * Terminal reset: Resetting. (line 9) * Time and date: Modes. (line 48) * Time, date: Modes. (line 48) * Toggle flag: Selecting. (line 9) * Toggle panels: Moving. (line 49) * tty mode: Modes. (line 32) * Two panel mode: Modes. (line 29) * Two panels: Modes. (line 29) * Type specific file action: Actions. (line 20) * umount: Mounting. (line 56) * Uncompressing directories: Compressing Files. (line 17) * Uncompressing directories in background: Compressing Files. (line 21) * Uncompressing directories/links: Compressing Files. (line 25) * Uncompressing directories/links in background: Compressing Files. (line 30) * Uncompressing files: Compressing Files. (line 17) * Uncompressing files in background: Compressing Files. (line 21) * Uncompressing files/links: Compressing Files. (line 25) * Uncompressing files/links in background: Compressing Files. (line 30) * Unmark entry: Selecting. (line 9) * Unmounting subdirectories: Mounting. (line 84) * Unmounting the cdrom: Mounting. (line 64) * Unmounting the first floppy: Mounting. (line 56) * Unmounting the floppy: Mounting. (line 56) * Unmounting the jaz drive: Mounting. (line 77) * Unmounting the second floppy: Mounting. (line 60) * Unmounting the zip drive: Mounting. (line 73) * Unmounting these file systems: Mounting. (line 84) * Unselects files matching extension: Selecting. (line 33) * Unselects files matching pattern: Selecting. (line 23) * Upcase file names: Renaming Files. (line 21) * Upcase word: Case Changes. (line 13) * uudecode: Encoding Files. (line 15) * uuencode: Encoding Files. (line 8) * Viewing files: Viewing Files. (line 9) * Viewing multiple files: Viewing Files. (line 13) * Viewing processes: Processes. (line 35) * Viewing the process tree: Processes. (line 46) * Virtual memory status: Sysinfo. (line 38) * whereis: Searching Files. (line 17) * which: Searching Files. (line 20) * who: Sysinfo. (line 43) * Wiping files: Wiping Files. (line 9) * Wrapped incremental search: Isearch. (line 10) * Wrapped isearch: Isearch. (line 10) * Wrapped search: Isearch. (line 10) * xhost: Environment. (line 13) * Yanking, reinserting: Yanking. (line 9)  Tag Table: Node: Top793 Node: Introduction1741 Node: Distrib3065 Node: Description4753 Node: gitfm5604 Node: Conventions8128 Node: Command line10021 Node: Modes11080 Node: Sorting13456 Node: Moving14745 Node: Selecting16353 Node: Isearch17758 Node: Input Line18883 Node: Inserting Text19986 Node: Moving Point20898 Node: Erasing21495 Node: Case Changes22773 Node: History23209 Node: Setting Mark23945 Node: Yanking24280 Node: Selecting Files24554 Node: Files25471 Node: Copying Files27200 Node: Moving Files27568 Node: Creating Files27957 Node: Deleting Files28316 Node: Linking Files28662 Node: Renaming Files29317 Node: Splitting Files29906 Node: Packing Files30410 Node: Inode31751 Node: Editing Files33429 Node: Viewing Files34272 Node: Compressing Files34659 Node: Encoding Files36060 Node: Encrypting Files37003 Node: Comparing Files37296 Node: Spell Checking Files37963 Node: Printing Files38221 Node: Wiping Files38686 Node: Searching Files39022 Node: Archive Files39564 Node: DEB Packages41396 Node: RPM Packages44364 Node: File Types45748 Node: MSDOS Files45967 Node: Actions48065 Node: Directories48995 Node: Creating Dirs49760 Node: Copying Dirs50037 Node: Deleting Dirs50519 Node: Moving Dirs50958 Node: Renaming Dirs51437 Node: Comparing Dirs51880 Node: Dirs Usage53115 Node: Changing Dirs53391 Node: Dirs History54069 Node: Hot Keys55140 Node: Compiling55769 Node: Mail56170 Node: Shell57326 Node: Grep57731 Node: Locking58159 Node: Refreshing58557 Node: Resetting59294 Node: Mounting59548 Node: Sysinfo62649 Node: Environment64037 Node: Processes64446 Node: Sync66542 Node: Documentation66795 Node: Exit67511 Node: gitps67731 Node: gitview69253 Node: gitkeys70107 Node: gitwipe70496 Node: gitmount71225 Node: gitaction71989 Node: gitunpack74124 Node: gitrgrep74536 Node: Customization75019 Node: Environment Variables75322 Node: Configuration Files76820 Node: Key Sequences79911 Node: Setup81244 Node: gitfm Sections82199 Node: GITFM-Setup82653 Node: GITFM-Color85240 Node: GITFM-Monochrome85609 Node: GITFM-Keys86014 Node: key-sequence86919 Node: command-name87558 Node: formatted-command88303 Node: %s89630 Node: %f90157 Node: %d90402 Node: %l90649 Node: %t90902 Node: %z91137 Node: %a91368 Node: %m91583 Node: %g91787 Node: %o91992 Node: %p92197 Node: %b92402 Node: %i92617 Node: %?92842 Node: new-dir93334 Node: save-screen93760 Node: pause94460 Node: hide94799 Node: GITFM-FTI95679 Node: gitps Sections96260 Node: GITPS-Setup96654 Node: GITPS-Color96894 Node: GITPS-Monochrome97262 Node: GITPS-Keys97667 Node: gitview Sections97797 Node: GITVIEW-Setup98180 Node: GITVIEW-Color98430 Node: GITVIEW-Monochrome98812 Node: GITVIEW-Keys99231 Node: Limitations99367 Node: Bugs100777 Node: Copying This Manual101047 Node: Key Index126157 Node: Command Index146069 Node: Variable Index165339 Node: Concept Index167543  End Tag Table gnuit-4.9.5/doc/gitrgrep.10000644000175000017500000000312311146671375012264 00000000000000.\" +---------- .\" | .\" | GITRGREP man page .\" | .\" | Copyright 1993-1999, 2006-2007 Free Software Foundation, Inc. .\" | .\" | This file is part of GNUIT (GNU Interactive Tools) .\" | .\" | GNUIT 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 3, or (at your option) any later .\" | version. .\" | .\" | GNUIT 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 GNUIT; see the file COPYING. If not, see http://www.gnu.org/licenses/ .\" | .TH gitrgrep 1 .SH NAME gitrgrep \- GNU Interactive Tools - recursive grep .SH SYNTAX .I gitrgrep [grep-like options] .SH DESCRIPTION .I gitrgrep is a very small script that calls grep recursively. It accepts grep-like options/parameters, the only difference being that file specifications should be quoted: gitrgrep main '*.c' or gitrgrep errno '*.c *.h' .SH BUGS /bin/sh should support functions in order to run .IR gitrgrep . Use bash to be sure. Please send bug reports to .I gnuit-dev@gnu.org .SH SEE ALSO gitfm(1) gitps(1) gitview(1) gitkeys(1) gitaction(1) gitmount(1) gitunpack(1) .SH AUTHORS .I Tudor Hulubei .br .I Andrei Pitis .br .I Ian Beckwith (Current maintainer) gnuit-4.9.5/doc/gitaction.10000644000175000017500000000702211146671375012424 00000000000000.\" +---------- .\" | .\" | GITACTION man page .\" | .\" | Copyright 1993-1999, 2006-2007 Free Software Foundation, Inc. .\" | .\" | This file is part of GNUIT (GNU Interactive Tools) .\" | .\" | GNUIT 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 3, or (at your option) any later .\" | version. .\" | .\" | GNUIT 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 GNUIT; see the file COPYING. If not, see http://www.gnu.org/licenses/ .\" | .TH gitaction 1 .SH NAME gitaction \- GNU Interactive Tools - per file type action script .SH SYNTAX .I gitaction .I directory file .br .I .gitaction directory file .SH DESCRIPTION .I gitaction is a script that executes a different action for each file type specified. It is called by the .I gitfm program when pressing .B F2 or .B ^Xa (see the .B gnuitrc.TERM configuration files in the .I gnuit manual). The first parameter is the current directory name and the second one is the file name to be matched against the default patterns. The matching is done using the shell 'case' statement. If you press .B F2 or .B ^Xa on a .B "*.html" file, .I gitfm will invoke a browser to view it, if you press .B F2 or .B ^Xa on a .B "*.tar.gz" file, .I gitfm will list the tar archive contents, if you press the same keys on a .B "*.gz" file, .I gitfm will display its uncompressed contents on the screen, etc ... If you press .B F2 or .B ^Xa on a .B "*.gif" file or .B "*.jpg" file and you have the .I zgv utility installed, you will be able to see it. If you want to change the gif/jpeg viewer, all you need to do is to change its name in the .I gitaction script. There are many more file types and viewers that .I gitaction knows about. In addition, if you are running under GNOME, gnome-open is used, and on MacOS, open(1) is used. see(1) and metamail(1) are also used as fallbacks. If all else fails, the file is displayed using $GNUIT_PAGER. Feel free to change this. If you want to find out what the default action for each file type is (or if you want to modify it), just read/modify the .I gitaction script. The script can be easily enhanced. Just read it. The .I .gitaction script is a local version of the .I gitaction script. When started, .I gitaction tries to search a script called .B .gitaction in the current directory and, if it finds it, it starts it. If .IR .gitaction 's exit code is 0 ( .I .gitaction couldn't find a matching pattern), .I gitaction starts its own case statement trying to match the current file name (the second parameter) against its default patterns. The .I .gitaction script *must* be executable. An example of .I .gitaction can be found in the directory gitfm is installed into. (usually .BR /usr/local/bin or .BR /usr/bin ) Debian users can find it in .BR /usr/share/doc/gnuit/examples/ . You should copy the example to the current directory or your home directory and then modify it. .SH BUGS Please send bug reports to: .br .I gnuit-dev@gnu.org .SH SEE ALSO gitfm(1) gitps(1) gitview(1) gitmount(1) gitkeys(1) gitrgrep(1) gitunpack(1) .SH AUTHORS .I Tudor Hulubei .br .I Andrei Pitis .br .I Ian Beckwith (current maintainer). gnuit-4.9.5/doc/gitdpkgname.10000644000175000017500000000332311146671375012735 00000000000000.\" +---------- .\" | .\" | gitdpkgname man page .\" | .\" | Copyright 1993-2007 Free Software Foundation, Inc. .\" | .\" | This file is part of GNUIT (GNU Interactive Tools) .\" | .\" | GNUIT 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 3, or (at your option) any later .\" | version. .\" | .\" | GNUIT 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 GNUIT; see the file COPYING. If not, see http://www.gnu.org/licenses/ .\" | .TH gitdpkgname 1 .SH NAME gitdpkgname \- GNU Interactive Tools \- gitdpkgname helper script .SH SYNTAX .I gitdpkgname [file...] .SH DESCRIPTION gitdpkgname is a very small script that is used by gitfm(1) when using any of the ^C^D commands that expect a debian packagename. For each argument that ends in .deb, gitdpkgname queries the named package for its name and prints it. All other arguments are printed unchanged. This enables commands (e.g. ^C^DL) expecting a packagename to be given a .deb file, and the packagename will be extracted automatically. .SH SEE ALSO gitfm(1) info(1) documentation for 'gnuit', especially section 3.1.9.21: .B Working with DPKG .SH BUGS Please send bug reports to: .br .I gnuit-dev@gnu.org .SH AUTHORS .I Tudor Hulubei .br .I Andrei Pitis .br .I Ian Beckwith (Current maintainer) gnuit-4.9.5/doc/fdl.texi0000644000175000017500000005601511146671375012027 00000000000000@c The GNU Free Documentation License. @center Version 1.3, 3 November 2008 @c This file is intended to be included within another document, @c hence no sectioning command or @node. @display Copyright @copyright{} 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc. @uref{http://fsf.org/} Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. @end display @enumerate 0 @item PREAMBLE The purpose of this License is to make a manual, textbook, or other functional and useful document @dfn{free} in the sense of freedom: to assure everyone the effective freedom to copy and redistribute it, with or without modifying it, either commercially or noncommercially. Secondarily, this License preserves for the author and publisher a way to get credit for their work, while not being considered responsible for modifications made by others. This License is a kind of ``copyleft'', which means that derivative works of the document must themselves be free in the same sense. It complements the GNU General Public License, which is a copyleft license designed for free software. We have designed this License in order to use it for manuals for free software, because free software needs free documentation: a free program should come with manuals providing the same freedoms that the software does. But this License is not limited to software manuals; it can be used for any textual work, regardless of subject matter or whether it is published as a printed book. We recommend this License principally for works whose purpose is instruction or reference. @item APPLICABILITY AND DEFINITIONS This License applies to any manual or other work, in any medium, that contains a notice placed by the copyright holder saying it can be distributed under the terms of this License. Such a notice grants a world-wide, royalty-free license, unlimited in duration, to use that work under the conditions stated herein. The ``Document'', below, refers to any such manual or work. Any member of the public is a licensee, and is addressed as ``you''. You accept the license if you copy, modify or distribute the work in a way requiring permission under copyright law. A ``Modified Version'' of the Document means any work containing the Document or a portion of it, either copied verbatim, or with modifications and/or translated into another language. A ``Secondary Section'' is a named appendix or a front-matter section of the Document that deals exclusively with the relationship of the publishers or authors of the Document to the Document's overall subject (or to related matters) and contains nothing that could fall directly within that overall subject. (Thus, if the Document is in part a textbook of mathematics, a Secondary Section may not explain any mathematics.) The relationship could be a matter of historical connection with the subject or with related matters, or of legal, commercial, philosophical, ethical or political position regarding them. The ``Invariant Sections'' are certain Secondary Sections whose titles are designated, as being those of Invariant Sections, in the notice that says that the Document is released under this License. If a section does not fit the above definition of Secondary then it is not allowed to be designated as Invariant. The Document may contain zero Invariant Sections. If the Document does not identify any Invariant Sections then there are none. The ``Cover Texts'' are certain short passages of text that are listed, as Front-Cover Texts or Back-Cover Texts, in the notice that says that the Document is released under this License. A Front-Cover Text may be at most 5 words, and a Back-Cover Text may be at most 25 words. A ``Transparent'' copy of the Document means a machine-readable copy, represented in a format whose specification is available to the general public, that is suitable for revising the document straightforwardly with generic text editors or (for images composed of pixels) generic paint programs or (for drawings) some widely available drawing editor, and that is suitable for input to text formatters or for automatic translation to a variety of formats suitable for input to text formatters. A copy made in an otherwise Transparent file format whose markup, or absence of markup, has been arranged to thwart or discourage subsequent modification by readers is not Transparent. An image format is not Transparent if used for any substantial amount of text. A copy that is not ``Transparent'' is called ``Opaque''. Examples of suitable formats for Transparent copies include plain @sc{ascii} without markup, Texinfo input format, La@TeX{} input format, @acronym{SGML} or @acronym{XML} using a publicly available @acronym{DTD}, and standard-conforming simple @acronym{HTML}, PostScript or @acronym{PDF} designed for human modification. Examples of transparent image formats include @acronym{PNG}, @acronym{XCF} and @acronym{JPG}. Opaque formats include proprietary formats that can be read and edited only by proprietary word processors, @acronym{SGML} or @acronym{XML} for which the @acronym{DTD} and/or processing tools are not generally available, and the machine-generated @acronym{HTML}, PostScript or @acronym{PDF} produced by some word processors for output purposes only. The ``Title Page'' means, for a printed book, the title page itself, plus such following pages as are needed to hold, legibly, the material this License requires to appear in the title page. For works in formats which do not have any title page as such, ``Title Page'' means the text near the most prominent appearance of the work's title, preceding the beginning of the body of the text. The ``publisher'' means any person or entity that distributes copies of the Document to the public. A section ``Entitled XYZ'' means a named subunit of the Document whose title either is precisely XYZ or contains XYZ in parentheses following text that translates XYZ in another language. (Here XYZ stands for a specific section name mentioned below, such as ``Acknowledgements'', ``Dedications'', ``Endorsements'', or ``History''.) To ``Preserve the Title'' of such a section when you modify the Document means that it remains a section ``Entitled XYZ'' according to this definition. The Document may include Warranty Disclaimers next to the notice which states that this License applies to the Document. These Warranty Disclaimers are considered to be included by reference in this License, but only as regards disclaiming warranties: any other implication that these Warranty Disclaimers may have is void and has no effect on the meaning of this License. @item VERBATIM COPYING You may copy and distribute the Document in any medium, either commercially or noncommercially, provided that this License, the copyright notices, and the license notice saying this License applies to the Document are reproduced in all copies, and that you add no other conditions whatsoever to those of this License. You may not use technical measures to obstruct or control the reading or further copying of the copies you make or distribute. However, you may accept compensation in exchange for copies. If you distribute a large enough number of copies you must also follow the conditions in section 3. You may also lend copies, under the same conditions stated above, and you may publicly display copies. @item COPYING IN QUANTITY If you publish printed copies (or copies in media that commonly have printed covers) of the Document, numbering more than 100, and the Document's license notice requires Cover Texts, you must enclose the copies in covers that carry, clearly and legibly, all these Cover Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on the back cover. Both covers must also clearly and legibly identify you as the publisher of these copies. The front cover must present the full title with all words of the title equally prominent and visible. You may add other material on the covers in addition. Copying with changes limited to the covers, as long as they preserve the title of the Document and satisfy these conditions, can be treated as verbatim copying in other respects. If the required texts for either cover are too voluminous to fit legibly, you should put the first ones listed (as many as fit reasonably) on the actual cover, and continue the rest onto adjacent pages. If you publish or distribute Opaque copies of the Document numbering more than 100, you must either include a machine-readable Transparent copy along with each Opaque copy, or state in or with each Opaque copy a computer-network location from which the general network-using public has access to download using public-standard network protocols a complete Transparent copy of the Document, free of added material. If you use the latter option, you must take reasonably prudent steps, when you begin distribution of Opaque copies in quantity, to ensure that this Transparent copy will remain thus accessible at the stated location until at least one year after the last time you distribute an Opaque copy (directly or through your agents or retailers) of that edition to the public. It is requested, but not required, that you contact the authors of the Document well before redistributing any large number of copies, to give them a chance to provide you with an updated version of the Document. @item MODIFICATIONS You may copy and distribute a Modified Version of the Document under the conditions of sections 2 and 3 above, provided that you release the Modified Version under precisely this License, with the Modified Version filling the role of the Document, thus licensing distribution and modification of the Modified Version to whoever possesses a copy of it. In addition, you must do these things in the Modified Version: @enumerate A @item Use in the Title Page (and on the covers, if any) a title distinct from that of the Document, and from those of previous versions (which should, if there were any, be listed in the History section of the Document). You may use the same title as a previous version if the original publisher of that version gives permission. @item List on the Title Page, as authors, one or more persons or entities responsible for authorship of the modifications in the Modified Version, together with at least five of the principal authors of the Document (all of its principal authors, if it has fewer than five), unless they release you from this requirement. @item State on the Title page the name of the publisher of the Modified Version, as the publisher. @item Preserve all the copyright notices of the Document. @item Add an appropriate copyright notice for your modifications adjacent to the other copyright notices. @item Include, immediately after the copyright notices, a license notice giving the public permission to use the Modified Version under the terms of this License, in the form shown in the Addendum below. @item Preserve in that license notice the full lists of Invariant Sections and required Cover Texts given in the Document's license notice. @item Include an unaltered copy of this License. @item Preserve the section Entitled ``History'', Preserve its Title, and add to it an item stating at least the title, year, new authors, and publisher of the Modified Version as given on the Title Page. If there is no section Entitled ``History'' in the Document, create one stating the title, year, authors, and publisher of the Document as given on its Title Page, then add an item describing the Modified Version as stated in the previous sentence. @item Preserve the network location, if any, given in the Document for public access to a Transparent copy of the Document, and likewise the network locations given in the Document for previous versions it was based on. These may be placed in the ``History'' section. You may omit a network location for a work that was published at least four years before the Document itself, or if the original publisher of the version it refers to gives permission. @item For any section Entitled ``Acknowledgements'' or ``Dedications'', Preserve the Title of the section, and preserve in the section all the substance and tone of each of the contributor acknowledgements and/or dedications given therein. @item Preserve all the Invariant Sections of the Document, unaltered in their text and in their titles. Section numbers or the equivalent are not considered part of the section titles. @item Delete any section Entitled ``Endorsements''. Such a section may not be included in the Modified Version. @item Do not retitle any existing section to be Entitled ``Endorsements'' or to conflict in title with any Invariant Section. @item Preserve any Warranty Disclaimers. @end enumerate If the Modified Version includes new front-matter sections or appendices that qualify as Secondary Sections and contain no material copied from the Document, you may at your option designate some or all of these sections as invariant. To do this, add their titles to the list of Invariant Sections in the Modified Version's license notice. These titles must be distinct from any other section titles. You may add a section Entitled ``Endorsements'', provided it contains nothing but endorsements of your Modified Version by various parties---for example, statements of peer review or that the text has been approved by an organization as the authoritative definition of a standard. You may add a passage of up to five words as a Front-Cover Text, and a passage of up to 25 words as a Back-Cover Text, to the end of the list of Cover Texts in the Modified Version. Only one passage of Front-Cover Text and one of Back-Cover Text may be added by (or through arrangements made by) any one entity. If the Document already includes a cover text for the same cover, previously added by you or by arrangement made by the same entity you are acting on behalf of, you may not add another; but you may replace the old one, on explicit permission from the previous publisher that added the old one. The author(s) and publisher(s) of the Document do not by this License give permission to use their names for publicity for or to assert or imply endorsement of any Modified Version. @item COMBINING DOCUMENTS You may combine the Document with other documents released under this License, under the terms defined in section 4 above for modified versions, provided that you include in the combination all of the Invariant Sections of all of the original documents, unmodified, and list them all as Invariant Sections of your combined work in its license notice, and that you preserve all their Warranty Disclaimers. The combined work need only contain one copy of this License, and multiple identical Invariant Sections may be replaced with a single copy. If there are multiple Invariant Sections with the same name but different contents, make the title of each such section unique by adding at the end of it, in parentheses, the name of the original author or publisher of that section if known, or else a unique number. Make the same adjustment to the section titles in the list of Invariant Sections in the license notice of the combined work. In the combination, you must combine any sections Entitled ``History'' in the various original documents, forming one section Entitled ``History''; likewise combine any sections Entitled ``Acknowledgements'', and any sections Entitled ``Dedications''. You must delete all sections Entitled ``Endorsements.'' @item COLLECTIONS OF DOCUMENTS You may make a collection consisting of the Document and other documents released under this License, and replace the individual copies of this License in the various documents with a single copy that is included in the collection, provided that you follow the rules of this License for verbatim copying of each of the documents in all other respects. You may extract a single document from such a collection, and distribute it individually under this License, provided you insert a copy of this License into the extracted document, and follow this License in all other respects regarding verbatim copying of that document. @item AGGREGATION WITH INDEPENDENT WORKS A compilation of the Document or its derivatives with other separate and independent documents or works, in or on a volume of a storage or distribution medium, is called an ``aggregate'' if the copyright resulting from the compilation is not used to limit the legal rights of the compilation's users beyond what the individual works permit. When the Document is included in an aggregate, this License does not apply to the other works in the aggregate which are not themselves derivative works of the Document. If the Cover Text requirement of section 3 is applicable to these copies of the Document, then if the Document is less than one half of the entire aggregate, the Document's Cover Texts may be placed on covers that bracket the Document within the aggregate, or the electronic equivalent of covers if the Document is in electronic form. Otherwise they must appear on printed covers that bracket the whole aggregate. @item TRANSLATION Translation is considered a kind of modification, so you may distribute translations of the Document under the terms of section 4. Replacing Invariant Sections with translations requires special permission from their copyright holders, but you may include translations of some or all Invariant Sections in addition to the original versions of these Invariant Sections. You may include a translation of this License, and all the license notices in the Document, and any Warranty Disclaimers, provided that you also include the original English version of this License and the original versions of those notices and disclaimers. In case of a disagreement between the translation and the original version of this License or a notice or disclaimer, the original version will prevail. If a section in the Document is Entitled ``Acknowledgements'', ``Dedications'', or ``History'', the requirement (section 4) to Preserve its Title (section 1) will typically require changing the actual title. @item TERMINATION You may not copy, modify, sublicense, or distribute the Document except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, or distribute it is void, and will automatically terminate your rights under this License. However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, receipt of a copy of some or all of the same material does not give you any rights to use it. @item FUTURE REVISIONS OF THIS LICENSE The Free Software Foundation may publish new, revised versions of the GNU Free Documentation 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. See @uref{http://www.gnu.org/copyleft/}. Each version of the License is given a distinguishing version number. If the Document specifies that a particular numbered version of this License ``or any later version'' applies to it, you have the option of following the terms and conditions either of that specified version or of any later version that has been published (not as a draft) by the Free Software Foundation. If the Document does not specify a version number of this License, you may choose any version ever published (not as a draft) by the Free Software Foundation. If the Document specifies that a proxy can decide which future versions of this License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Document. @item RELICENSING ``Massive Multiauthor Collaboration Site'' (or ``MMC Site'') means any World Wide Web server that publishes copyrightable works and also provides prominent facilities for anybody to edit those works. A public wiki that anybody can edit is an example of such a server. A ``Massive Multiauthor Collaboration'' (or ``MMC'') contained in the site means any set of copyrightable works thus published on the MMC site. ``CC-BY-SA'' means the Creative Commons Attribution-Share Alike 3.0 license published by Creative Commons Corporation, a not-for-profit corporation with a principal place of business in San Francisco, California, as well as future copyleft versions of that license published by that same organization. ``Incorporate'' means to publish or republish a Document, in whole or in part, as part of another Document. An MMC is ``eligible for relicensing'' if it is licensed under this License, and if all works that were first published under this License somewhere other than this MMC, and subsequently incorporated in whole or in part into the MMC, (1) had no cover texts or invariant sections, and (2) were thus incorporated prior to November 1, 2008. The operator of an MMC Site may republish an MMC contained in the site under CC-BY-SA on the same site at any time before August 1, 2009, provided the MMC is eligible for relicensing. @end enumerate @page @heading ADDENDUM: How to use this License for your documents To use this License in a document you have written, include a copy of the License in the document and put the following copyright and license notices just after the title page: @smallexample @group Copyright (C) @var{year} @var{your name}. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled ``GNU Free Documentation License''. @end group @end smallexample If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts, replace the ``with@dots{}Texts.'' line with this: @smallexample @group with the Invariant Sections being @var{list their titles}, with the Front-Cover Texts being @var{list}, and with the Back-Cover Texts being @var{list}. @end group @end smallexample If you have Invariant Sections without Cover Texts, or some other combination of the three, merge those two alternatives to suit the situation. If your document contains nontrivial examples of program code, we recommend releasing these examples in parallel under your choice of free software license, such as the GNU General Public License, to permit their use in free software. @c Local Variables: @c ispell-local-pdict: "ispell-dict" @c End: gnuit-4.9.5/doc/gitkeys.10000644000175000017500000000276611146671375012134 00000000000000.\" +---------- .\" | .\" | GITKEYS man page .\" | .\" | Copyright 1993-1999, 2006-2007 Free Software Foundation, Inc. .\" | .\" | This file is part of GNUIT (GNU Interactive Tools) .\" | .\" | GNUIT 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 3, or (at your option) any later .\" | version. .\" | .\" | GNUIT 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 GNUIT; see the file COPYING. If not, see http://www.gnu.org/licenses/ .\" | .TH gitkeys 1 .SH NAME gitkeys \- GNU Interactive Tools - Display key sequence utility .SH SYNTAX .I gitkeys .SH DESCRIPTION .I gitkeys is a program that displays the key sequence sent by the pressed key. This is the key sequence received by GNUIT tools, so this program is useful when setting up the .gitrc.TERM configuration files. .SH BUGS Please send bug reports to: .br .I Ian Beckwith .SH SEE ALSO gitfm(1) gitps(1) gitview(1) gitmount(1) gitaction(1) gitrgrep(1) gitunpack(1) .SH AUTHORS .I Tudor Hulubei .br .I Andrei Pitis .br .I Ian Beckwith (Current maintainer) gnuit-4.9.5/doc/texinfo.tex0000644000175000017500000070156311146671375012572 00000000000000% texinfo.tex -- TeX macros to handle Texinfo files. % % Load plain if necessary, i.e., if running under initex. \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi % \def\texinfoversion{2005-07-05.19} % % Copyright (C) 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995, % 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software % Foundation, Inc. % % This texinfo.tex file 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 texinfo.tex file 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 texinfo.tex file; see the file COPYING. If not, write % to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, % Boston, MA 02110-1301, USA. % % As a special exception, when this file is read by TeX when processing % a Texinfo source document, you may use the result without % restriction. (This has been our intent since Texinfo was invented.) % % Please try the latest version of texinfo.tex before submitting bug % reports; you can get the latest version from: % http://www.gnu.org/software/texinfo/ (the Texinfo home page), or % ftp://tug.org/tex/texinfo.tex % (and all CTAN mirrors, see http://www.ctan.org). % The texinfo.tex in any given distribution could well be out % of date, so if that's what you're using, please check. % % Send bug reports to bug-texinfo@gnu.org. Please include including a % complete document in each bug report with which we can reproduce the % problem. Patches are, of course, greatly appreciated. % % To process a Texinfo manual with TeX, it's most reliable to use the % texi2dvi shell script that comes with the distribution. For a simple % manual foo.texi, however, you can get away with this: % tex foo.texi % texindex foo.?? % tex foo.texi % tex foo.texi % dvips foo.dvi -o # or whatever; this makes foo.ps. % The extra TeX runs get the cross-reference information correct. % Sometimes one run after texindex suffices, and sometimes you need more % than two; texi2dvi does it as many times as necessary. % % It is possible to adapt texinfo.tex for other languages, to some % extent. You can get the existing language-specific files from the % full Texinfo distribution. % % The GNU Texinfo home page is http://www.gnu.org/software/texinfo. \message{Loading texinfo [version \texinfoversion]:} % If in a .fmt file, print the version number % and turn on active characters that we couldn't do earlier because % they might have appeared in the input file name. \everyjob{\message{[Texinfo version \texinfoversion]}% \catcode`+=\active \catcode`\_=\active} \message{Basics,} \chardef\other=12 % We never want plain's \outer definition of \+ in Texinfo. % For @tex, we can use \tabalign. \let\+ = \relax % Save some plain tex macros whose names we will redefine. \let\ptexb=\b \let\ptexbullet=\bullet \let\ptexc=\c \let\ptexcomma=\, \let\ptexdot=\. \let\ptexdots=\dots \let\ptexend=\end \let\ptexequiv=\equiv \let\ptexexclam=\! \let\ptexfootnote=\footnote \let\ptexgtr=> \let\ptexhat=^ \let\ptexi=\i \let\ptexindent=\indent \let\ptexinsert=\insert \let\ptexlbrace=\{ \let\ptexless=< \let\ptexnewwrite\newwrite \let\ptexnoindent=\noindent \let\ptexplus=+ \let\ptexrbrace=\} \let\ptexslash=\/ \let\ptexstar=\* \let\ptext=\t % If this character appears in an error message or help string, it % starts a new line in the output. \newlinechar = `^^J % Use TeX 3.0's \inputlineno to get the line number, for better error % messages, but if we're using an old version of TeX, don't do anything. % \ifx\inputlineno\thisisundefined \let\linenumber = \empty % Pre-3.0. \else \def\linenumber{l.\the\inputlineno:\space} \fi % Set up fixed words for English if not already set. \ifx\putwordAppendix\undefined \gdef\putwordAppendix{Appendix}\fi \ifx\putwordChapter\undefined \gdef\putwordChapter{Chapter}\fi \ifx\putwordfile\undefined \gdef\putwordfile{file}\fi \ifx\putwordin\undefined \gdef\putwordin{in}\fi \ifx\putwordIndexIsEmpty\undefined \gdef\putwordIndexIsEmpty{(Index is empty)}\fi \ifx\putwordIndexNonexistent\undefined \gdef\putwordIndexNonexistent{(Index is nonexistent)}\fi \ifx\putwordInfo\undefined \gdef\putwordInfo{Info}\fi \ifx\putwordInstanceVariableof\undefined \gdef\putwordInstanceVariableof{Instance Variable of}\fi \ifx\putwordMethodon\undefined \gdef\putwordMethodon{Method on}\fi \ifx\putwordNoTitle\undefined \gdef\putwordNoTitle{No Title}\fi \ifx\putwordof\undefined \gdef\putwordof{of}\fi \ifx\putwordon\undefined \gdef\putwordon{on}\fi \ifx\putwordpage\undefined \gdef\putwordpage{page}\fi \ifx\putwordsection\undefined \gdef\putwordsection{section}\fi \ifx\putwordSection\undefined \gdef\putwordSection{Section}\fi \ifx\putwordsee\undefined \gdef\putwordsee{see}\fi \ifx\putwordSee\undefined \gdef\putwordSee{See}\fi \ifx\putwordShortTOC\undefined \gdef\putwordShortTOC{Short Contents}\fi \ifx\putwordTOC\undefined \gdef\putwordTOC{Table of Contents}\fi % \ifx\putwordMJan\undefined \gdef\putwordMJan{January}\fi \ifx\putwordMFeb\undefined \gdef\putwordMFeb{February}\fi \ifx\putwordMMar\undefined \gdef\putwordMMar{March}\fi \ifx\putwordMApr\undefined \gdef\putwordMApr{April}\fi \ifx\putwordMMay\undefined \gdef\putwordMMay{May}\fi \ifx\putwordMJun\undefined \gdef\putwordMJun{June}\fi \ifx\putwordMJul\undefined \gdef\putwordMJul{July}\fi \ifx\putwordMAug\undefined \gdef\putwordMAug{August}\fi \ifx\putwordMSep\undefined \gdef\putwordMSep{September}\fi \ifx\putwordMOct\undefined \gdef\putwordMOct{October}\fi \ifx\putwordMNov\undefined \gdef\putwordMNov{November}\fi \ifx\putwordMDec\undefined \gdef\putwordMDec{December}\fi % \ifx\putwordDefmac\undefined \gdef\putwordDefmac{Macro}\fi \ifx\putwordDefspec\undefined \gdef\putwordDefspec{Special Form}\fi \ifx\putwordDefvar\undefined \gdef\putwordDefvar{Variable}\fi \ifx\putwordDefopt\undefined \gdef\putwordDefopt{User Option}\fi \ifx\putwordDeffunc\undefined \gdef\putwordDeffunc{Function}\fi % In some macros, we cannot use the `\? notation---the left quote is % in some cases the escape char. \chardef\backChar = `\\ \chardef\colonChar = `\: \chardef\commaChar = `\, \chardef\dotChar = `\. \chardef\exclamChar= `\! \chardef\plusChar = `\+ \chardef\questChar = `\? \chardef\semiChar = `\; \chardef\underChar = `\_ \chardef\spaceChar = `\ % \chardef\spacecat = 10 \def\spaceisspace{\catcode\spaceChar=\spacecat} {% for help with debugging. % example usage: \expandafter\show\activebackslash \catcode`\! = 0 \catcode`\\ = \active !global!def!activebackslash{\} } % Ignore a token. % \def\gobble#1{} % The following is used inside several \edef's. \def\makecsname#1{\expandafter\noexpand\csname#1\endcsname} % Hyphenation fixes. \hyphenation{ Flor-i-da Ghost-script Ghost-view Mac-OS Post-Script ap-pen-dix bit-map bit-maps data-base data-bases eshell fall-ing half-way long-est man-u-script man-u-scripts mini-buf-fer mini-buf-fers over-view par-a-digm par-a-digms rath-er rec-tan-gu-lar ro-bot-ics se-vere-ly set-up spa-ces spell-ing spell-ings stand-alone strong-est time-stamp time-stamps which-ever white-space wide-spread wrap-around } % Margin to add to right of even pages, to left of odd pages. \newdimen\bindingoffset \newdimen\normaloffset \newdimen\pagewidth \newdimen\pageheight % For a final copy, take out the rectangles % that mark overfull boxes (in case you have decided % that the text looks ok even though it passes the margin). % \def\finalout{\overfullrule=0pt} % @| inserts a changebar to the left of the current line. It should % surround any changed text. This approach does *not* work if the % change spans more than two lines of output. To handle that, we would % have adopt a much more difficult approach (putting marks into the main % vertical list for the beginning and end of each change). % \def\|{% % \vadjust can only be used in horizontal mode. \leavevmode % % Append this vertical mode material after the current line in the output. \vadjust{% % We want to insert a rule with the height and depth of the current % leading; that is exactly what \strutbox is supposed to record. \vskip-\baselineskip % % \vadjust-items are inserted at the left edge of the type. So % the \llap here moves out into the left-hand margin. \llap{% % % For a thicker or thinner bar, change the `1pt'. \vrule height\baselineskip width1pt % % This is the space between the bar and the text. \hskip 12pt }% }% } % Sometimes it is convenient to have everything in the transcript file % and nothing on the terminal. We don't just call \tracingall here, % since that produces some useless output on the terminal. We also make % some effort to order the tracing commands to reduce output in the log % file; cf. trace.sty in LaTeX. % \def\gloggingall{\begingroup \globaldefs = 1 \loggingall \endgroup}% \def\loggingall{% \tracingstats2 \tracingpages1 \tracinglostchars2 % 2 gives us more in etex \tracingparagraphs1 \tracingoutput1 \tracingmacros2 \tracingrestores1 \showboxbreadth\maxdimen \showboxdepth\maxdimen \ifx\eTeXversion\undefined\else % etex gives us more logging \tracingscantokens1 \tracingifs1 \tracinggroups1 \tracingnesting2 \tracingassigns1 \fi \tracingcommands3 % 3 gives us more in etex \errorcontextlines16 }% % add check for \lastpenalty to plain's definitions. If the last thing % we did was a \nobreak, we don't want to insert more space. % \def\smallbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\smallskipamount \removelastskip\penalty-50\smallskip\fi\fi} \def\medbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\medskipamount \removelastskip\penalty-100\medskip\fi\fi} \def\bigbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\bigskipamount \removelastskip\penalty-200\bigskip\fi\fi} % For @cropmarks command. % Do @cropmarks to get crop marks. % \newif\ifcropmarks \let\cropmarks = \cropmarkstrue % % Dimensions to add cropmarks at corners. % Added by P. A. MacKay, 12 Nov. 1986 % \newdimen\outerhsize \newdimen\outervsize % set by the paper size routines \newdimen\cornerlong \cornerlong=1pc \newdimen\cornerthick \cornerthick=.3pt \newdimen\topandbottommargin \topandbottommargin=.75in % Main output routine. \chardef\PAGE = 255 \output = {\onepageout{\pagecontents\PAGE}} \newbox\headlinebox \newbox\footlinebox % \onepageout takes a vbox as an argument. Note that \pagecontents % does insertions, but you have to call it yourself. \def\onepageout#1{% \ifcropmarks \hoffset=0pt \else \hoffset=\normaloffset \fi % \ifodd\pageno \advance\hoffset by \bindingoffset \else \advance\hoffset by -\bindingoffset\fi % % Do this outside of the \shipout so @code etc. will be expanded in % the headline as they should be, not taken literally (outputting ''code). \setbox\headlinebox = \vbox{\let\hsize=\pagewidth \makeheadline}% \setbox\footlinebox = \vbox{\let\hsize=\pagewidth \makefootline}% % {% % Have to do this stuff outside the \shipout because we want it to % take effect in \write's, yet the group defined by the \vbox ends % before the \shipout runs. % \indexdummies % don't expand commands in the output. \shipout\vbox{% % Do this early so pdf references go to the beginning of the page. \ifpdfmakepagedest \pdfdest name{\the\pageno} xyz\fi % \ifcropmarks \vbox to \outervsize\bgroup \hsize = \outerhsize \vskip-\topandbottommargin \vtop to0pt{% \line{\ewtop\hfil\ewtop}% \nointerlineskip \line{% \vbox{\moveleft\cornerthick\nstop}% \hfill \vbox{\moveright\cornerthick\nstop}% }% \vss}% \vskip\topandbottommargin \line\bgroup \hfil % center the page within the outer (page) hsize. \ifodd\pageno\hskip\bindingoffset\fi \vbox\bgroup \fi % \unvbox\headlinebox \pagebody{#1}% \ifdim\ht\footlinebox > 0pt % Only leave this space if the footline is nonempty. % (We lessened \vsize for it in \oddfootingxxx.) % The \baselineskip=24pt in plain's \makefootline has no effect. \vskip 2\baselineskip \unvbox\footlinebox \fi % \ifcropmarks \egroup % end of \vbox\bgroup \hfil\egroup % end of (centering) \line\bgroup \vskip\topandbottommargin plus1fill minus1fill \boxmaxdepth = \cornerthick \vbox to0pt{\vss \line{% \vbox{\moveleft\cornerthick\nsbot}% \hfill \vbox{\moveright\cornerthick\nsbot}% }% \nointerlineskip \line{\ewbot\hfil\ewbot}% }% \egroup % \vbox from first cropmarks clause \fi }% end of \shipout\vbox }% end of group with \indexdummies \advancepageno \ifnum\outputpenalty>-20000 \else\dosupereject\fi } \newinsert\margin \dimen\margin=\maxdimen \def\pagebody#1{\vbox to\pageheight{\boxmaxdepth=\maxdepth #1}} {\catcode`\@ =11 \gdef\pagecontents#1{\ifvoid\topins\else\unvbox\topins\fi % marginal hacks, juha@viisa.uucp (Juha Takala) \ifvoid\margin\else % marginal info is present \rlap{\kern\hsize\vbox to\z@{\kern1pt\box\margin \vss}}\fi \dimen@=\dp#1 \unvbox#1 \ifvoid\footins\else\vskip\skip\footins\footnoterule \unvbox\footins\fi \ifr@ggedbottom \kern-\dimen@ \vfil \fi} } % Here are the rules for the cropmarks. Note that they are % offset so that the space between them is truly \outerhsize or \outervsize % (P. A. MacKay, 12 November, 1986) % \def\ewtop{\vrule height\cornerthick depth0pt width\cornerlong} \def\nstop{\vbox {\hrule height\cornerthick depth\cornerlong width\cornerthick}} \def\ewbot{\vrule height0pt depth\cornerthick width\cornerlong} \def\nsbot{\vbox {\hrule height\cornerlong depth\cornerthick width\cornerthick}} % Parse an argument, then pass it to #1. The argument is the rest of % the input line (except we remove a trailing comment). #1 should be a % macro which expects an ordinary undelimited TeX argument. % \def\parsearg{\parseargusing{}} \def\parseargusing#1#2{% \def\next{#2}% \begingroup \obeylines \spaceisspace #1% \parseargline\empty% Insert the \empty token, see \finishparsearg below. } {\obeylines % \gdef\parseargline#1^^M{% \endgroup % End of the group started in \parsearg. \argremovecomment #1\comment\ArgTerm% }% } % First remove any @comment, then any @c comment. \def\argremovecomment#1\comment#2\ArgTerm{\argremovec #1\c\ArgTerm} \def\argremovec#1\c#2\ArgTerm{\argcheckspaces#1\^^M\ArgTerm} % Each occurence of `\^^M' or `\^^M' is replaced by a single space. % % \argremovec might leave us with trailing space, e.g., % @end itemize @c foo % This space token undergoes the same procedure and is eventually removed % by \finishparsearg. % \def\argcheckspaces#1\^^M{\argcheckspacesX#1\^^M \^^M} \def\argcheckspacesX#1 \^^M{\argcheckspacesY#1\^^M} \def\argcheckspacesY#1\^^M#2\^^M#3\ArgTerm{% \def\temp{#3}% \ifx\temp\empty % We cannot use \next here, as it holds the macro to run; % thus we reuse \temp. \let\temp\finishparsearg \else \let\temp\argcheckspaces \fi % Put the space token in: \temp#1 #3\ArgTerm } % If a _delimited_ argument is enclosed in braces, they get stripped; so % to get _exactly_ the rest of the line, we had to prevent such situation. % We prepended an \empty token at the very beginning and we expand it now, % just before passing the control to \next. % (Similarily, we have to think about #3 of \argcheckspacesY above: it is % either the null string, or it ends with \^^M---thus there is no danger % that a pair of braces would be stripped. % % But first, we have to remove the trailing space token. % \def\finishparsearg#1 \ArgTerm{\expandafter\next\expandafter{#1}} % \parseargdef\foo{...} % is roughly equivalent to % \def\foo{\parsearg\Xfoo} % \def\Xfoo#1{...} % % Actually, I use \csname\string\foo\endcsname, ie. \\foo, as it is my % favourite TeX trick. --kasal, 16nov03 \def\parseargdef#1{% \expandafter \doparseargdef \csname\string#1\endcsname #1% } \def\doparseargdef#1#2{% \def#2{\parsearg#1}% \def#1##1% } % Several utility definitions with active space: { \obeyspaces \gdef\obeyedspace{ } % Make each space character in the input produce a normal interword % space in the output. Don't allow a line break at this space, as this % is used only in environments like @example, where each line of input % should produce a line of output anyway. % \gdef\sepspaces{\obeyspaces\let =\tie} % If an index command is used in an @example environment, any spaces % therein should become regular spaces in the raw index file, not the % expansion of \tie (\leavevmode \penalty \@M \ ). \gdef\unsepspaces{\let =\space} } \def\flushcr{\ifx\par\lisppar \def\next##1{}\else \let\next=\relax \fi \next} % Define the framework for environments in texinfo.tex. It's used like this: % % \envdef\foo{...} % \def\Efoo{...} % % It's the responsibility of \envdef to insert \begingroup before the % actual body; @end closes the group after calling \Efoo. \envdef also % defines \thisenv, so the current environment is known; @end checks % whether the environment name matches. The \checkenv macro can also be % used to check whether the current environment is the one expected. % % Non-false conditionals (@iftex, @ifset) don't fit into this, so they % are not treated as enviroments; they don't open a group. (The % implementation of @end takes care not to call \endgroup in this % special case.) % At runtime, environments start with this: \def\startenvironment#1{\begingroup\def\thisenv{#1}} % initialize \let\thisenv\empty % ... but they get defined via ``\envdef\foo{...}'': \long\def\envdef#1#2{\def#1{\startenvironment#1#2}} \def\envparseargdef#1#2{\parseargdef#1{\startenvironment#1#2}} % Check whether we're in the right environment: \def\checkenv#1{% \def\temp{#1}% \ifx\thisenv\temp \else \badenverr \fi } % Evironment mismatch, #1 expected: \def\badenverr{% \errhelp = \EMsimple \errmessage{This command can appear only \inenvironment\temp, not \inenvironment\thisenv}% } \def\inenvironment#1{% \ifx#1\empty out of any environment% \else in environment \expandafter\string#1% \fi } % @end foo executes the definition of \Efoo. % But first, it executes a specialized version of \checkenv % \parseargdef\end{% \if 1\csname iscond.#1\endcsname \else % The general wording of \badenverr may not be ideal, but... --kasal, 06nov03 \expandafter\checkenv\csname#1\endcsname \csname E#1\endcsname \endgroup \fi } \newhelp\EMsimple{Press RETURN to continue.} %% Simple single-character @ commands % @@ prints an @ % Kludge this until the fonts are right (grr). \def\@{{\tt\char64}} % This is turned off because it was never documented % and you can use @w{...} around a quote to suppress ligatures. %% Define @` and @' to be the same as ` and ' %% but suppressing ligatures. %\def\`{{`}} %\def\'{{'}} % Used to generate quoted braces. \def\mylbrace {{\tt\char123}} \def\myrbrace {{\tt\char125}} \let\{=\mylbrace \let\}=\myrbrace \begingroup % Definitions to produce \{ and \} commands for indices, % and @{ and @} for the aux/toc files. \catcode`\{ = \other \catcode`\} = \other \catcode`\[ = 1 \catcode`\] = 2 \catcode`\! = 0 \catcode`\\ = \other !gdef!lbracecmd[\{]% !gdef!rbracecmd[\}]% !gdef!lbraceatcmd[@{]% !gdef!rbraceatcmd[@}]% !endgroup % @comma{} to avoid , parsing problems. \let\comma = , % Accents: @, @dotaccent @ringaccent @ubaraccent @udotaccent % Others are defined by plain TeX: @` @' @" @^ @~ @= @u @v @H. \let\, = \c \let\dotaccent = \. \def\ringaccent#1{{\accent23 #1}} \let\tieaccent = \t \let\ubaraccent = \b \let\udotaccent = \d % Other special characters: @questiondown @exclamdown @ordf @ordm % Plain TeX defines: @AA @AE @O @OE @L (plus lowercase versions) @ss. \def\questiondown{?`} \def\exclamdown{!`} \def\ordf{\leavevmode\raise1ex\hbox{\selectfonts\lllsize \underbar{a}}} \def\ordm{\leavevmode\raise1ex\hbox{\selectfonts\lllsize \underbar{o}}} % Dotless i and dotless j, used for accents. \def\imacro{i} \def\jmacro{j} \def\dotless#1{% \def\temp{#1}% \ifx\temp\imacro \ptexi \else\ifx\temp\jmacro \j \else \errmessage{@dotless can be used only with i or j}% \fi\fi } % The \TeX{} logo, as in plain, but resetting the spacing so that a % period following counts as ending a sentence. (Idea found in latex.) % \edef\TeX{\TeX \spacefactor=1000 } % @LaTeX{} logo. Not quite the same results as the definition in % latex.ltx, since we use a different font for the raised A; it's most % convenient for us to use an explicitly smaller font, rather than using % the \scriptstyle font (since we don't reset \scriptstyle and % \scriptscriptstyle). % \def\LaTeX{% L\kern-.36em {\setbox0=\hbox{T}% \vbox to \ht0{\hbox{\selectfonts\lllsize A}\vss}}% \kern-.15em \TeX } % Be sure we're in horizontal mode when doing a tie, since we make space % equivalent to this in @example-like environments. Otherwise, a space % at the beginning of a line will start with \penalty -- and % since \penalty is valid in vertical mode, we'd end up putting the % penalty on the vertical list instead of in the new paragraph. {\catcode`@ = 11 % Avoid using \@M directly, because that causes trouble % if the definition is written into an index file. \global\let\tiepenalty = \@M \gdef\tie{\leavevmode\penalty\tiepenalty\ } } % @: forces normal size whitespace following. \def\:{\spacefactor=1000 } % @* forces a line break. \def\*{\hfil\break\hbox{}\ignorespaces} % @/ allows a line break. \let\/=\allowbreak % @. is an end-of-sentence period. \def\.{.\spacefactor=\endofsentencespacefactor\space} % @! is an end-of-sentence bang. \def\!{!\spacefactor=\endofsentencespacefactor\space} % @? is an end-of-sentence query. \def\?{?\spacefactor=\endofsentencespacefactor\space} % @frenchspacing on|off says whether to put extra space after punctuation. % \def\onword{on} \def\offword{off} % \parseargdef\frenchspacing{% \def\temp{#1}% \ifx\temp\onword \plainfrenchspacing \else\ifx\temp\offword \plainnonfrenchspacing \else \errhelp = \EMsimple \errmessage{Unknown @frenchspacing option `\temp', must be on/off}% \fi\fi } % @w prevents a word break. Without the \leavevmode, @w at the % beginning of a paragraph, when TeX is still in vertical mode, would % produce a whole line of output instead of starting the paragraph. \def\w#1{\leavevmode\hbox{#1}} % @group ... @end group forces ... to be all on one page, by enclosing % it in a TeX vbox. We use \vtop instead of \vbox to construct the box % to keep its height that of a normal line. According to the rules for % \topskip (p.114 of the TeXbook), the glue inserted is % max (\topskip - \ht (first item), 0). If that height is large, % therefore, no glue is inserted, and the space between the headline and % the text is small, which looks bad. % % Another complication is that the group might be very large. This can % cause the glue on the previous page to be unduly stretched, because it % does not have much material. In this case, it's better to add an % explicit \vfill so that the extra space is at the bottom. The % threshold for doing this is if the group is more than \vfilllimit % percent of a page (\vfilllimit can be changed inside of @tex). % \newbox\groupbox \def\vfilllimit{0.7} % \envdef\group{% \ifnum\catcode`\^^M=\active \else \errhelp = \groupinvalidhelp \errmessage{@group invalid in context where filling is enabled}% \fi \startsavinginserts % \setbox\groupbox = \vtop\bgroup % Do @comment since we are called inside an environment such as % @example, where each end-of-line in the input causes an % end-of-line in the output. We don't want the end-of-line after % the `@group' to put extra space in the output. Since @group % should appear on a line by itself (according to the Texinfo % manual), we don't worry about eating any user text. \comment } % % The \vtop produces a box with normal height and large depth; thus, TeX puts % \baselineskip glue before it, and (when the next line of text is done) % \lineskip glue after it. Thus, space below is not quite equal to space % above. But it's pretty close. \def\Egroup{% % To get correct interline space between the last line of the group % and the first line afterwards, we have to propagate \prevdepth. \endgraf % Not \par, as it may have been set to \lisppar. \global\dimen1 = \prevdepth \egroup % End the \vtop. % \dimen0 is the vertical size of the group's box. \dimen0 = \ht\groupbox \advance\dimen0 by \dp\groupbox % \dimen2 is how much space is left on the page (more or less). \dimen2 = \pageheight \advance\dimen2 by -\pagetotal % if the group doesn't fit on the current page, and it's a big big % group, force a page break. \ifdim \dimen0 > \dimen2 \ifdim \pagetotal < \vfilllimit\pageheight \page \fi \fi \box\groupbox \prevdepth = \dimen1 \checkinserts } % % TeX puts in an \escapechar (i.e., `@') at the beginning of the help % message, so this ends up printing `@group can only ...'. % \newhelp\groupinvalidhelp{% group can only be used in environments such as @example,^^J% where each line of input produces a line of output.} % @need space-in-mils % forces a page break if there is not space-in-mils remaining. \newdimen\mil \mil=0.001in % Old definition--didn't work. %\parseargdef\need{\par % %% This method tries to make TeX break the page naturally %% if the depth of the box does not fit. %{\baselineskip=0pt% %\vtop to #1\mil{\vfil}\kern -#1\mil\nobreak %\prevdepth=-1000pt %}} \parseargdef\need{% % Ensure vertical mode, so we don't make a big box in the middle of a % paragraph. \par % % If the @need value is less than one line space, it's useless. \dimen0 = #1\mil \dimen2 = \ht\strutbox \advance\dimen2 by \dp\strutbox \ifdim\dimen0 > \dimen2 % % Do a \strut just to make the height of this box be normal, so the % normal leading is inserted relative to the preceding line. % And a page break here is fine. \vtop to #1\mil{\strut\vfil}% % % TeX does not even consider page breaks if a penalty added to the % main vertical list is 10000 or more. But in order to see if the % empty box we just added fits on the page, we must make it consider % page breaks. On the other hand, we don't want to actually break the % page after the empty box. So we use a penalty of 9999. % % There is an extremely small chance that TeX will actually break the % page at this \penalty, if there are no other feasible breakpoints in % sight. (If the user is using lots of big @group commands, which % almost-but-not-quite fill up a page, TeX will have a hard time doing % good page breaking, for example.) However, I could not construct an % example where a page broke at this \penalty; if it happens in a real % document, then we can reconsider our strategy. \penalty9999 % % Back up by the size of the box, whether we did a page break or not. \kern -#1\mil % % Do not allow a page break right after this kern. \nobreak \fi } % @br forces paragraph break (and is undocumented). \let\br = \par % @page forces the start of a new page. % \def\page{\par\vfill\supereject} % @exdent text.... % outputs text on separate line in roman font, starting at standard page margin % This records the amount of indent in the innermost environment. % That's how much \exdent should take out. \newskip\exdentamount % This defn is used inside fill environments such as @defun. \parseargdef\exdent{\hfil\break\hbox{\kern -\exdentamount{\rm#1}}\hfil\break} % This defn is used inside nofill environments such as @example. \parseargdef\nofillexdent{{\advance \leftskip by -\exdentamount \leftline{\hskip\leftskip{\rm#1}}}} % @inmargin{WHICH}{TEXT} puts TEXT in the WHICH margin next to the current % paragraph. For more general purposes, use the \margin insertion % class. WHICH is `l' or `r'. % \newskip\inmarginspacing \inmarginspacing=1cm \def\strutdepth{\dp\strutbox} % \def\doinmargin#1#2{\strut\vadjust{% \nobreak \kern-\strutdepth \vtop to \strutdepth{% \baselineskip=\strutdepth \vss % if you have multiple lines of stuff to put here, you'll need to % make the vbox yourself of the appropriate size. \ifx#1l% \llap{\ignorespaces #2\hskip\inmarginspacing}% \else \rlap{\hskip\hsize \hskip\inmarginspacing \ignorespaces #2}% \fi \null }% }} \def\inleftmargin{\doinmargin l} \def\inrightmargin{\doinmargin r} % % @inmargin{TEXT [, RIGHT-TEXT]} % (if RIGHT-TEXT is given, use TEXT for left page, RIGHT-TEXT for right; % else use TEXT for both). % \def\inmargin#1{\parseinmargin #1,,\finish} \def\parseinmargin#1,#2,#3\finish{% not perfect, but better than nothing. \setbox0 = \hbox{\ignorespaces #2}% \ifdim\wd0 > 0pt \def\lefttext{#1}% have both texts \def\righttext{#2}% \else \def\lefttext{#1}% have only one text \def\righttext{#1}% \fi % \ifodd\pageno \def\temp{\inrightmargin\righttext}% odd page -> outside is right margin \else \def\temp{\inleftmargin\lefttext}% \fi \temp } % @include file insert text of that file as input. % \def\include{\parseargusing\filenamecatcodes\includezzz} \def\includezzz#1{% \pushthisfilestack \def\thisfile{#1}% {% \makevalueexpandable \def\temp{\input #1 }% \expandafter }\temp \popthisfilestack } \def\filenamecatcodes{% \catcode`\\=\other \catcode`~=\other \catcode`^=\other \catcode`_=\other \catcode`|=\other \catcode`<=\other \catcode`>=\other \catcode`+=\other \catcode`-=\other } \def\pushthisfilestack{% \expandafter\pushthisfilestackX\popthisfilestack\StackTerm } \def\pushthisfilestackX{% \expandafter\pushthisfilestackY\thisfile\StackTerm } \def\pushthisfilestackY #1\StackTerm #2\StackTerm {% \gdef\popthisfilestack{\gdef\thisfile{#1}\gdef\popthisfilestack{#2}}% } \def\popthisfilestack{\errthisfilestackempty} \def\errthisfilestackempty{\errmessage{Internal error: the stack of filenames is empty.}} \def\thisfile{} % @center line % outputs that line, centered. % \parseargdef\center{% \ifhmode \let\next\centerH \else \let\next\centerV \fi \next{\hfil \ignorespaces#1\unskip \hfil}% } \def\centerH#1{% {% \hfil\break \advance\hsize by -\leftskip \advance\hsize by -\rightskip \line{#1}% \break }% } \def\centerV#1{\line{\kern\leftskip #1\kern\rightskip}} % @sp n outputs n lines of vertical space \parseargdef\sp{\vskip #1\baselineskip} % @comment ...line which is ignored... % @c is the same as @comment % @ignore ... @end ignore is another way to write a comment \def\comment{\begingroup \catcode`\^^M=\other% \catcode`\@=\other \catcode`\{=\other \catcode`\}=\other% \commentxxx} {\catcode`\^^M=\other \gdef\commentxxx#1^^M{\endgroup}} \let\c=\comment % @paragraphindent NCHARS % We'll use ems for NCHARS, close enough. % NCHARS can also be the word `asis' or `none'. % We cannot feasibly implement @paragraphindent asis, though. % \def\asisword{asis} % no translation, these are keywords \def\noneword{none} % \parseargdef\paragraphindent{% \def\temp{#1}% \ifx\temp\asisword \else \ifx\temp\noneword \defaultparindent = 0pt \else \defaultparindent = #1em \fi \fi \parindent = \defaultparindent } % @exampleindent NCHARS % We'll use ems for NCHARS like @paragraphindent. % It seems @exampleindent asis isn't necessary, but % I preserve it to make it similar to @paragraphindent. \parseargdef\exampleindent{% \def\temp{#1}% \ifx\temp\asisword \else \ifx\temp\noneword \lispnarrowing = 0pt \else \lispnarrowing = #1em \fi \fi } % @firstparagraphindent WORD % If WORD is `none', then suppress indentation of the first paragraph % after a section heading. If WORD is `insert', then do indent at such % paragraphs. % % The paragraph indentation is suppressed or not by calling % \suppressfirstparagraphindent, which the sectioning commands do. % We switch the definition of this back and forth according to WORD. % By default, we suppress indentation. % \def\suppressfirstparagraphindent{\dosuppressfirstparagraphindent} \def\insertword{insert} % \parseargdef\firstparagraphindent{% \def\temp{#1}% \ifx\temp\noneword \let\suppressfirstparagraphindent = \dosuppressfirstparagraphindent \else\ifx\temp\insertword \let\suppressfirstparagraphindent = \relax \else \errhelp = \EMsimple \errmessage{Unknown @firstparagraphindent option `\temp'}% \fi\fi } % Here is how we actually suppress indentation. Redefine \everypar to % \kern backwards by \parindent, and then reset itself to empty. % % We also make \indent itself not actually do anything until the next % paragraph. % \gdef\dosuppressfirstparagraphindent{% \gdef\indent{% \restorefirstparagraphindent \indent }% \gdef\noindent{% \restorefirstparagraphindent \noindent }% \global\everypar = {% \kern -\parindent \restorefirstparagraphindent }% } \gdef\restorefirstparagraphindent{% \global \let \indent = \ptexindent \global \let \noindent = \ptexnoindent \global \everypar = {}% } % @asis just yields its argument. Used with @table, for example. % \def\asis#1{#1} % @math outputs its argument in math mode. % % One complication: _ usually means subscripts, but it could also mean % an actual _ character, as in @math{@var{some_variable} + 1}. So make % _ active, and distinguish by seeing if the current family is \slfam, % which is what @var uses. { \catcode\underChar = \active \gdef\mathunderscore{% \catcode\underChar=\active \def_{\ifnum\fam=\slfam \_\else\sb\fi}% } } % Another complication: we want \\ (and @\) to output a \ character. % FYI, plain.tex uses \\ as a temporary control sequence (why?), but % this is not advertised and we don't care. Texinfo does not % otherwise define @\. % % The \mathchar is class=0=ordinary, family=7=ttfam, position=5C=\. \def\mathbackslash{\ifnum\fam=\ttfam \mathchar"075C \else\backslash \fi} % \def\math{% \tex \mathunderscore \let\\ = \mathbackslash \mathactive $\finishmath } \def\finishmath#1{#1$\endgroup} % Close the group opened by \tex. % Some active characters (such as <) are spaced differently in math. % We have to reset their definitions in case the @math was an argument % to a command which sets the catcodes (such as @item or @section). % { \catcode`^ = \active \catcode`< = \active \catcode`> = \active \catcode`+ = \active \gdef\mathactive{% \let^ = \ptexhat \let< = \ptexless \let> = \ptexgtr \let+ = \ptexplus } } % @bullet and @minus need the same treatment as @math, just above. \def\bullet{$\ptexbullet$} \def\minus{$-$} % @dots{} outputs an ellipsis using the current font. % We do .5em per period so that it has the same spacing in a typewriter % font as three actual period characters. % \def\dots{% \leavevmode \hbox to 1.5em{% \hskip 0pt plus 0.25fil .\hfil.\hfil.% \hskip 0pt plus 0.5fil }% } % @enddots{} is an end-of-sentence ellipsis. % \def\enddots{% \dots \spacefactor=\endofsentencespacefactor } % @comma{} is so commas can be inserted into text without messing up % Texinfo's parsing. % \let\comma = , % @refill is a no-op. \let\refill=\relax % If working on a large document in chapters, it is convenient to % be able to disable indexing, cross-referencing, and contents, for test runs. % This is done with @novalidate (before @setfilename). % \newif\iflinks \linkstrue % by default we want the aux files. \let\novalidate = \linksfalse % @setfilename is done at the beginning of every texinfo file. % So open here the files we need to have open while reading the input. % This makes it possible to make a .fmt file for texinfo. \def\setfilename{% \fixbackslash % Turn off hack to swallow `\input texinfo'. \iflinks \tryauxfile % Open the new aux file. TeX will close it automatically at exit. \immediate\openout\auxfile=\jobname.aux \fi % \openindices needs to do some work in any case. \openindices \let\setfilename=\comment % Ignore extra @setfilename cmds. % % If texinfo.cnf is present on the system, read it. % Useful for site-wide @afourpaper, etc. \openin 1 texinfo.cnf \ifeof 1 \else \input texinfo.cnf \fi \closein 1 % \comment % Ignore the actual filename. } % Called from \setfilename. % \def\openindices{% \newindex{cp}% \newcodeindex{fn}% \newcodeindex{vr}% \newcodeindex{tp}% \newcodeindex{ky}% \newcodeindex{pg}% } % @bye. \outer\def\bye{\pagealignmacro\tracingstats=1\ptexend} \message{pdf,} % adobe `portable' document format \newcount\tempnum \newcount\lnkcount \newtoks\filename \newcount\filenamelength \newcount\pgn \newtoks\toksA \newtoks\toksB \newtoks\toksC \newtoks\toksD \newbox\boxA \newcount\countA \newif\ifpdf \newif\ifpdfmakepagedest % when pdftex is run in dvi mode, \pdfoutput is defined (so \pdfoutput=1 % can be set). So we test for \relax and 0 as well as \undefined, % borrowed from ifpdf.sty. \ifx\pdfoutput\undefined \else \ifx\pdfoutput\relax \else \ifcase\pdfoutput \else \pdftrue \fi \fi \fi % PDF uses PostScript string constants for the names of xref targets, to % for display in the outlines, and in other places. Thus, we have to % double any backslashes. Otherwise, a name like "\node" will be % interpreted as a newline (\n), followed by o, d, e. Not good. % http://www.ntg.nl/pipermail/ntg-pdftex/2004-July/000654.html % (and related messages, the final outcome is that it is up to the TeX % user to double the backslashes and otherwise make the string valid, so % that's we do). % double active backslashes. % {\catcode`\@=0 \catcode`\\=\active @gdef@activebackslash{@catcode`@\=@active @otherbackslash} @gdef@activebackslashdouble{% @catcode@backChar=@active @let\=@doublebackslash} } % To handle parens, we must adopt a different approach, since parens are % not active characters. hyperref.dtx (which has the same problem as % us) handles it with this amazing macro to replace tokens. I've % tinkered with it a little for texinfo, but it's definitely from there. % % #1 is the tokens to replace. % #2 is the replacement. % #3 is the control sequence with the string. % \def\HyPsdSubst#1#2#3{% \def\HyPsdReplace##1#1##2\END{% ##1% \ifx\\##2\\% \else #2% \HyReturnAfterFi{% \HyPsdReplace##2\END }% \fi }% \xdef#3{\expandafter\HyPsdReplace#3#1\END}% } \long\def\HyReturnAfterFi#1\fi{\fi#1} % #1 is a control sequence in which to do the replacements. \def\backslashparens#1{% \xdef#1{#1}% redefine it as its expansion; the definition is simply % \lastnode when called from \setref -> \pdfmkdest. \HyPsdSubst{(}{\backslashlparen}{#1}% \HyPsdSubst{)}{\backslashrparen}{#1}% } {\catcode\exclamChar = 0 \catcode\backChar = \other !gdef!backslashlparen{\(}% !gdef!backslashrparen{\)}% } \ifpdf \input pdfcolor \pdfcatalog{/PageMode /UseOutlines}% \def\dopdfimage#1#2#3{% \def\imagewidth{#2}% \def\imageheight{#3}% % without \immediate, pdftex seg faults when the same image is % included twice. (Version 3.14159-pre-1.0-unofficial-20010704.) \ifnum\pdftexversion < 14 \immediate\pdfimage \else \immediate\pdfximage \fi \ifx\empty\imagewidth\else width \imagewidth \fi \ifx\empty\imageheight\else height \imageheight \fi \ifnum\pdftexversion<13 #1.pdf% \else {#1.pdf}% \fi \ifnum\pdftexversion < 14 \else \pdfrefximage \pdflastximage \fi} \def\pdfmkdest#1{{% % We have to set dummies so commands such as @code, and characters % such as \, aren't expanded when present in a section title. \atdummies \activebackslashdouble \def\pdfdestname{#1}% \backslashparens\pdfdestname \pdfdest name{\pdfdestname} xyz% }}% % % used to mark target names; must be expandable. \def\pdfmkpgn#1{#1}% % \let\linkcolor = \Blue % was Cyan, but that seems light? \def\endlink{\Black\pdfendlink} % Adding outlines to PDF; macros for calculating structure of outlines % come from Petr Olsak \def\expnumber#1{\expandafter\ifx\csname#1\endcsname\relax 0% \else \csname#1\endcsname \fi} \def\advancenumber#1{\tempnum=\expnumber{#1}\relax \advance\tempnum by 1 \expandafter\xdef\csname#1\endcsname{\the\tempnum}} % % #1 is the section text, which is what will be displayed in the % outline by the pdf viewer. #2 is the pdf expression for the number % of subentries (or empty, for subsubsections). #3 is the node text, % which might be empty if this toc entry had no corresponding node. % #4 is the page number % \def\dopdfoutline#1#2#3#4{% % Generate a link to the node text if that exists; else, use the % page number. We could generate a destination for the section % text in the case where a section has no node, but it doesn't % seem worth the trouble, since most documents are normally structured. \def\pdfoutlinedest{#3}% \ifx\pdfoutlinedest\empty \def\pdfoutlinedest{#4}% \else % Doubled backslashes in the name. {\activebackslashdouble \xdef\pdfoutlinedest{#3}% \backslashparens\pdfoutlinedest}% \fi % % Also double the backslashes in the display string. {\activebackslashdouble \xdef\pdfoutlinetext{#1}% \backslashparens\pdfoutlinetext}% % \pdfoutline goto name{\pdfmkpgn{\pdfoutlinedest}}#2{\pdfoutlinetext}% } % \def\pdfmakeoutlines{% \begingroup % Thanh's hack / proper braces in bookmarks \edef\mylbrace{\iftrue \string{\else}\fi}\let\{=\mylbrace \edef\myrbrace{\iffalse{\else\string}\fi}\let\}=\myrbrace % % Read toc silently, to get counts of subentries for \pdfoutline. \def\numchapentry##1##2##3##4{% \def\thischapnum{##2}% \def\thissecnum{0}% \def\thissubsecnum{0}% }% \def\numsecentry##1##2##3##4{% \advancenumber{chap\thischapnum}% \def\thissecnum{##2}% \def\thissubsecnum{0}% }% \def\numsubsecentry##1##2##3##4{% \advancenumber{sec\thissecnum}% \def\thissubsecnum{##2}% }% \def\numsubsubsecentry##1##2##3##4{% \advancenumber{subsec\thissubsecnum}% }% \def\thischapnum{0}% \def\thissecnum{0}% \def\thissubsecnum{0}% % % use \def rather than \let here because we redefine \chapentry et % al. a second time, below. \def\appentry{\numchapentry}% \def\appsecentry{\numsecentry}% \def\appsubsecentry{\numsubsecentry}% \def\appsubsubsecentry{\numsubsubsecentry}% \def\unnchapentry{\numchapentry}% \def\unnsecentry{\numsecentry}% \def\unnsubsecentry{\numsubsecentry}% \def\unnsubsubsecentry{\numsubsubsecentry}% \readdatafile{toc}% % % Read toc second time, this time actually producing the outlines. % The `-' means take the \expnumber as the absolute number of % subentries, which we calculated on our first read of the .toc above. % % We use the node names as the destinations. \def\numchapentry##1##2##3##4{% \dopdfoutline{##1}{count-\expnumber{chap##2}}{##3}{##4}}% \def\numsecentry##1##2##3##4{% \dopdfoutline{##1}{count-\expnumber{sec##2}}{##3}{##4}}% \def\numsubsecentry##1##2##3##4{% \dopdfoutline{##1}{count-\expnumber{subsec##2}}{##3}{##4}}% \def\numsubsubsecentry##1##2##3##4{% count is always zero \dopdfoutline{##1}{}{##3}{##4}}% % % PDF outlines are displayed using system fonts, instead of % document fonts. Therefore we cannot use special characters, % since the encoding is unknown. For example, the eogonek from % Latin 2 (0xea) gets translated to a | character. Info from % Staszek Wawrykiewicz, 19 Jan 2004 04:09:24 +0100. % % xx to do this right, we have to translate 8-bit characters to % their "best" equivalent, based on the @documentencoding. Right % now, I guess we'll just let the pdf reader have its way. \indexnofonts \setupdatafile \activebackslash \input \jobname.toc \endgroup } % \def\skipspaces#1{\def\PP{#1}\def\D{|}% \ifx\PP\D\let\nextsp\relax \else\let\nextsp\skipspaces \ifx\p\space\else\addtokens{\filename}{\PP}% \advance\filenamelength by 1 \fi \fi \nextsp} \def\getfilename#1{\filenamelength=0\expandafter\skipspaces#1|\relax} \ifnum\pdftexversion < 14 \let \startlink \pdfannotlink \else \let \startlink \pdfstartlink \fi \def\pdfurl#1{% \begingroup \normalturnoffactive\def\@{@}% \makevalueexpandable \leavevmode\Red \startlink attr{/Border [0 0 0]}% user{/Subtype /Link /A << /S /URI /URI (#1) >>}% \endgroup} \def\pdfgettoks#1.{\setbox\boxA=\hbox{\toksA={#1.}\toksB={}\maketoks}} \def\addtokens#1#2{\edef\addtoks{\noexpand#1={\the#1#2}}\addtoks} \def\adn#1{\addtokens{\toksC}{#1}\global\countA=1\let\next=\maketoks} \def\poptoks#1#2|ENDTOKS|{\let\first=#1\toksD={#1}\toksA={#2}} \def\maketoks{% \expandafter\poptoks\the\toksA|ENDTOKS|\relax \ifx\first0\adn0 \else\ifx\first1\adn1 \else\ifx\first2\adn2 \else\ifx\first3\adn3 \else\ifx\first4\adn4 \else\ifx\first5\adn5 \else\ifx\first6\adn6 \else\ifx\first7\adn7 \else\ifx\first8\adn8 \else\ifx\first9\adn9 \else \ifnum0=\countA\else\makelink\fi \ifx\first.\let\next=\done\else \let\next=\maketoks \addtokens{\toksB}{\the\toksD} \ifx\first,\addtokens{\toksB}{\space}\fi \fi \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi \next} \def\makelink{\addtokens{\toksB}% {\noexpand\pdflink{\the\toksC}}\toksC={}\global\countA=0} \def\pdflink#1{% \startlink attr{/Border [0 0 0]} goto name{\pdfmkpgn{#1}} \linkcolor #1\endlink} \def\done{\edef\st{\global\noexpand\toksA={\the\toksB}}\st} \else \let\pdfmkdest = \gobble \let\pdfurl = \gobble \let\endlink = \relax \let\linkcolor = \relax \let\pdfmakeoutlines = \relax \fi % \ifx\pdfoutput \message{fonts,} % Change the current font style to #1, remembering it in \curfontstyle. % For now, we do not accumulate font styles: @b{@i{foo}} prints foo in % italics, not bold italics. % \def\setfontstyle#1{% \def\curfontstyle{#1}% not as a control sequence, because we are \edef'd. \csname ten#1\endcsname % change the current font } % Select #1 fonts with the current style. % \def\selectfonts#1{\csname #1fonts\endcsname \csname\curfontstyle\endcsname} \def\rm{\fam=0 \setfontstyle{rm}} \def\it{\fam=\itfam \setfontstyle{it}} \def\sl{\fam=\slfam \setfontstyle{sl}} \def\bf{\fam=\bffam \setfontstyle{bf}}\def\bfstylename{bf} \def\tt{\fam=\ttfam \setfontstyle{tt}} % Texinfo sort of supports the sans serif font style, which plain TeX does not. % So we set up a \sf. \newfam\sffam \def\sf{\fam=\sffam \setfontstyle{sf}} \let\li = \sf % Sometimes we call it \li, not \sf. % We don't need math for this font style. \def\ttsl{\setfontstyle{ttsl}} % Default leading. \newdimen\textleading \textleading = 13.2pt % Set the baselineskip to #1, and the lineskip and strut size % correspondingly. There is no deep meaning behind these magic numbers % used as factors; they just match (closely enough) what Knuth defined. % \def\lineskipfactor{.08333} \def\strutheightpercent{.70833} \def\strutdepthpercent {.29167} % \def\setleading#1{% \normalbaselineskip = #1\relax \normallineskip = \lineskipfactor\normalbaselineskip \normalbaselines \setbox\strutbox =\hbox{% \vrule width0pt height\strutheightpercent\baselineskip depth \strutdepthpercent \baselineskip }% } % Set the font macro #1 to the font named #2, adding on the % specified font prefix (normally `cm'). % #3 is the font's design size, #4 is a scale factor \def\setfont#1#2#3#4{\font#1=\fontprefix#2#3 scaled #4} % Use cm as the default font prefix. % To specify the font prefix, you must define \fontprefix % before you read in texinfo.tex. \ifx\fontprefix\undefined \def\fontprefix{cm} \fi % Support font families that don't use the same naming scheme as CM. \def\rmshape{r} \def\rmbshape{bx} %where the normal face is bold \def\bfshape{b} \def\bxshape{bx} \def\ttshape{tt} \def\ttbshape{tt} \def\ttslshape{sltt} \def\itshape{ti} \def\itbshape{bxti} \def\slshape{sl} \def\slbshape{bxsl} \def\sfshape{ss} \def\sfbshape{ss} \def\scshape{csc} \def\scbshape{csc} % Text fonts (11.2pt, magstep1). \def\textnominalsize{11pt} \edef\mainmagstep{\magstephalf} \setfont\textrm\rmshape{10}{\mainmagstep} \setfont\texttt\ttshape{10}{\mainmagstep} \setfont\textbf\bfshape{10}{\mainmagstep} \setfont\textit\itshape{10}{\mainmagstep} \setfont\textsl\slshape{10}{\mainmagstep} \setfont\textsf\sfshape{10}{\mainmagstep} \setfont\textsc\scshape{10}{\mainmagstep} \setfont\textttsl\ttslshape{10}{\mainmagstep} \font\texti=cmmi10 scaled \mainmagstep \font\textsy=cmsy10 scaled \mainmagstep % A few fonts for @defun names and args. \setfont\defbf\bfshape{10}{\magstep1} \setfont\deftt\ttshape{10}{\magstep1} \setfont\defttsl\ttslshape{10}{\magstep1} \def\df{\let\tentt=\deftt \let\tenbf = \defbf \let\tenttsl=\defttsl \bf} % Fonts for indices, footnotes, small examples (9pt). \def\smallnominalsize{9pt} \setfont\smallrm\rmshape{9}{1000} \setfont\smalltt\ttshape{9}{1000} \setfont\smallbf\bfshape{10}{900} \setfont\smallit\itshape{9}{1000} \setfont\smallsl\slshape{9}{1000} \setfont\smallsf\sfshape{9}{1000} \setfont\smallsc\scshape{10}{900} \setfont\smallttsl\ttslshape{10}{900} \font\smalli=cmmi9 \font\smallsy=cmsy9 % Fonts for small examples (8pt). \def\smallernominalsize{8pt} \setfont\smallerrm\rmshape{8}{1000} \setfont\smallertt\ttshape{8}{1000} \setfont\smallerbf\bfshape{10}{800} \setfont\smallerit\itshape{8}{1000} \setfont\smallersl\slshape{8}{1000} \setfont\smallersf\sfshape{8}{1000} \setfont\smallersc\scshape{10}{800} \setfont\smallerttsl\ttslshape{10}{800} \font\smalleri=cmmi8 \font\smallersy=cmsy8 % Fonts for title page (20.4pt): \def\titlenominalsize{20pt} \setfont\titlerm\rmbshape{12}{\magstep3} \setfont\titleit\itbshape{10}{\magstep4} \setfont\titlesl\slbshape{10}{\magstep4} \setfont\titlett\ttbshape{12}{\magstep3} \setfont\titlettsl\ttslshape{10}{\magstep4} \setfont\titlesf\sfbshape{17}{\magstep1} \let\titlebf=\titlerm \setfont\titlesc\scbshape{10}{\magstep4} \font\titlei=cmmi12 scaled \magstep3 \font\titlesy=cmsy10 scaled \magstep4 \def\authorrm{\secrm} \def\authortt{\sectt} % Chapter (and unnumbered) fonts (17.28pt). \def\chapnominalsize{17pt} \setfont\chaprm\rmbshape{12}{\magstep2} \setfont\chapit\itbshape{10}{\magstep3} \setfont\chapsl\slbshape{10}{\magstep3} \setfont\chaptt\ttbshape{12}{\magstep2} \setfont\chapttsl\ttslshape{10}{\magstep3} \setfont\chapsf\sfbshape{17}{1000} \let\chapbf=\chaprm \setfont\chapsc\scbshape{10}{\magstep3} \font\chapi=cmmi12 scaled \magstep2 \font\chapsy=cmsy10 scaled \magstep3 % Section fonts (14.4pt). \def\secnominalsize{14pt} \setfont\secrm\rmbshape{12}{\magstep1} \setfont\secit\itbshape{10}{\magstep2} \setfont\secsl\slbshape{10}{\magstep2} \setfont\sectt\ttbshape{12}{\magstep1} \setfont\secttsl\ttslshape{10}{\magstep2} \setfont\secsf\sfbshape{12}{\magstep1} \let\secbf\secrm \setfont\secsc\scbshape{10}{\magstep2} \font\seci=cmmi12 scaled \magstep1 \font\secsy=cmsy10 scaled \magstep2 % Subsection fonts (13.15pt). \def\ssecnominalsize{13pt} \setfont\ssecrm\rmbshape{12}{\magstephalf} \setfont\ssecit\itbshape{10}{1315} \setfont\ssecsl\slbshape{10}{1315} \setfont\ssectt\ttbshape{12}{\magstephalf} \setfont\ssecttsl\ttslshape{10}{1315} \setfont\ssecsf\sfbshape{12}{\magstephalf} \let\ssecbf\ssecrm \setfont\ssecsc\scbshape{10}{1315} \font\sseci=cmmi12 scaled \magstephalf \font\ssecsy=cmsy10 scaled 1315 % Reduced fonts for @acro in text (10pt). \def\reducednominalsize{10pt} \setfont\reducedrm\rmshape{10}{1000} \setfont\reducedtt\ttshape{10}{1000} \setfont\reducedbf\bfshape{10}{1000} \setfont\reducedit\itshape{10}{1000} \setfont\reducedsl\slshape{10}{1000} \setfont\reducedsf\sfshape{10}{1000} \setfont\reducedsc\scshape{10}{1000} \setfont\reducedttsl\ttslshape{10}{1000} \font\reducedi=cmmi10 \font\reducedsy=cmsy10 % In order for the font changes to affect most math symbols and letters, % we have to define the \textfont of the standard families. Since % texinfo doesn't allow for producing subscripts and superscripts except % in the main text, we don't bother to reset \scriptfont and % \scriptscriptfont (which would also require loading a lot more fonts). % \def\resetmathfonts{% \textfont0=\tenrm \textfont1=\teni \textfont2=\tensy \textfont\itfam=\tenit \textfont\slfam=\tensl \textfont\bffam=\tenbf \textfont\ttfam=\tentt \textfont\sffam=\tensf } % The font-changing commands redefine the meanings of \tenSTYLE, instead % of just \STYLE. We do this because \STYLE needs to also set the % current \fam for math mode. Our \STYLE (e.g., \rm) commands hardwire % \tenSTYLE to set the current font. % % Each font-changing command also sets the names \lsize (one size lower) % and \lllsize (three sizes lower). These relative commands are used in % the LaTeX logo and acronyms. % % This all needs generalizing, badly. % \def\textfonts{% \let\tenrm=\textrm \let\tenit=\textit \let\tensl=\textsl \let\tenbf=\textbf \let\tentt=\texttt \let\smallcaps=\textsc \let\tensf=\textsf \let\teni=\texti \let\tensy=\textsy \let\tenttsl=\textttsl \def\curfontsize{text}% \def\lsize{reduced}\def\lllsize{smaller}% \resetmathfonts \setleading{\textleading}} \def\titlefonts{% \let\tenrm=\titlerm \let\tenit=\titleit \let\tensl=\titlesl \let\tenbf=\titlebf \let\tentt=\titlett \let\smallcaps=\titlesc \let\tensf=\titlesf \let\teni=\titlei \let\tensy=\titlesy \let\tenttsl=\titlettsl \def\curfontsize{title}% \def\lsize{chap}\def\lllsize{subsec}% \resetmathfonts \setleading{25pt}} \def\titlefont#1{{\titlefonts\rm #1}} \def\chapfonts{% \let\tenrm=\chaprm \let\tenit=\chapit \let\tensl=\chapsl \let\tenbf=\chapbf \let\tentt=\chaptt \let\smallcaps=\chapsc \let\tensf=\chapsf \let\teni=\chapi \let\tensy=\chapsy \let\tenttsl=\chapttsl \def\curfontsize{chap}% \def\lsize{sec}\def\lllsize{text}% \resetmathfonts \setleading{19pt}} \def\secfonts{% \let\tenrm=\secrm \let\tenit=\secit \let\tensl=\secsl \let\tenbf=\secbf \let\tentt=\sectt \let\smallcaps=\secsc \let\tensf=\secsf \let\teni=\seci \let\tensy=\secsy \let\tenttsl=\secttsl \def\curfontsize{sec}% \def\lsize{subsec}\def\lllsize{reduced}% \resetmathfonts \setleading{16pt}} \def\subsecfonts{% \let\tenrm=\ssecrm \let\tenit=\ssecit \let\tensl=\ssecsl \let\tenbf=\ssecbf \let\tentt=\ssectt \let\smallcaps=\ssecsc \let\tensf=\ssecsf \let\teni=\sseci \let\tensy=\ssecsy \let\tenttsl=\ssecttsl \def\curfontsize{ssec}% \def\lsize{text}\def\lllsize{small}% \resetmathfonts \setleading{15pt}} \let\subsubsecfonts = \subsecfonts \def\reducedfonts{% \let\tenrm=\reducedrm \let\tenit=\reducedit \let\tensl=\reducedsl \let\tenbf=\reducedbf \let\tentt=\reducedtt \let\reducedcaps=\reducedsc \let\tensf=\reducedsf \let\teni=\reducedi \let\tensy=\reducedsy \let\tenttsl=\reducedttsl \def\curfontsize{reduced}% \def\lsize{small}\def\lllsize{smaller}% \resetmathfonts \setleading{10.5pt}} \def\smallfonts{% \let\tenrm=\smallrm \let\tenit=\smallit \let\tensl=\smallsl \let\tenbf=\smallbf \let\tentt=\smalltt \let\smallcaps=\smallsc \let\tensf=\smallsf \let\teni=\smalli \let\tensy=\smallsy \let\tenttsl=\smallttsl \def\curfontsize{small}% \def\lsize{smaller}\def\lllsize{smaller}% \resetmathfonts \setleading{10.5pt}} \def\smallerfonts{% \let\tenrm=\smallerrm \let\tenit=\smallerit \let\tensl=\smallersl \let\tenbf=\smallerbf \let\tentt=\smallertt \let\smallcaps=\smallersc \let\tensf=\smallersf \let\teni=\smalleri \let\tensy=\smallersy \let\tenttsl=\smallerttsl \def\curfontsize{smaller}% \def\lsize{smaller}\def\lllsize{smaller}% \resetmathfonts \setleading{9.5pt}} % Set the fonts to use with the @small... environments. \let\smallexamplefonts = \smallfonts % About \smallexamplefonts. If we use \smallfonts (9pt), @smallexample % can fit this many characters: % 8.5x11=86 smallbook=72 a4=90 a5=69 % If we use \scriptfonts (8pt), then we can fit this many characters: % 8.5x11=90+ smallbook=80 a4=90+ a5=77 % For me, subjectively, the few extra characters that fit aren't worth % the additional smallness of 8pt. So I'm making the default 9pt. % % By the way, for comparison, here's what fits with @example (10pt): % 8.5x11=71 smallbook=60 a4=75 a5=58 % % I wish the USA used A4 paper. % --karl, 24jan03. % Set up the default fonts, so we can use them for creating boxes. % \textfonts \rm % Define these so they can be easily changed for other fonts. \def\angleleft{$\langle$} \def\angleright{$\rangle$} % Count depth in font-changes, for error checks \newcount\fontdepth \fontdepth=0 % Fonts for short table of contents. \setfont\shortcontrm\rmshape{12}{1000} \setfont\shortcontbf\bfshape{10}{\magstep1} % no cmb12 \setfont\shortcontsl\slshape{12}{1000} \setfont\shortconttt\ttshape{12}{1000} %% Add scribe-like font environments, plus @l for inline lisp (usually sans %% serif) and @ii for TeX italic % \smartitalic{ARG} outputs arg in italics, followed by an italic correction % unless the following character is such as not to need one. \def\smartitalicx{\ifx\next,\else\ifx\next-\else\ifx\next.\else \ptexslash\fi\fi\fi} \def\smartslanted#1{{\ifusingtt\ttsl\sl #1}\futurelet\next\smartitalicx} \def\smartitalic#1{{\ifusingtt\ttsl\it #1}\futurelet\next\smartitalicx} % like \smartslanted except unconditionally uses \ttsl. % @var is set to this for defun arguments. \def\ttslanted#1{{\ttsl #1}\futurelet\next\smartitalicx} % like \smartslanted except unconditionally use \sl. We never want % ttsl for book titles, do we? \def\cite#1{{\sl #1}\futurelet\next\smartitalicx} \let\i=\smartitalic \let\slanted=\smartslanted \let\var=\smartslanted \let\dfn=\smartslanted \let\emph=\smartitalic % @b, explicit bold. \def\b#1{{\bf #1}} \let\strong=\b % @sansserif, explicit sans. \def\sansserif#1{{\sf #1}} % We can't just use \exhyphenpenalty, because that only has effect at % the end of a paragraph. Restore normal hyphenation at the end of the % group within which \nohyphenation is presumably called. % \def\nohyphenation{\hyphenchar\font = -1 \aftergroup\restorehyphenation} \def\restorehyphenation{\hyphenchar\font = `- } % Set sfcode to normal for the chars that usually have another value. % Can't use plain's \frenchspacing because it uses the `\x notation, and % sometimes \x has an active definition that messes things up. % \catcode`@=11 \def\plainfrenchspacing{% \sfcode\dotChar =\@m \sfcode\questChar=\@m \sfcode\exclamChar=\@m \sfcode\colonChar=\@m \sfcode\semiChar =\@m \sfcode\commaChar =\@m \def\endofsentencespacefactor{1000}% for @. and friends } \def\plainnonfrenchspacing{% \sfcode`\.3000\sfcode`\?3000\sfcode`\!3000 \sfcode`\:2000\sfcode`\;1500\sfcode`\,1250 \def\endofsentencespacefactor{3000}% for @. and friends } \catcode`@=\other \def\endofsentencespacefactor{3000}% default \def\t#1{% {\tt \rawbackslash \plainfrenchspacing #1}% \null } \def\samp#1{`\tclose{#1}'\null} \setfont\keyrm\rmshape{8}{1000} \font\keysy=cmsy9 \def\key#1{{\keyrm\textfont2=\keysy \leavevmode\hbox{% \raise0.4pt\hbox{\angleleft}\kern-.08em\vtop{% \vbox{\hrule\kern-0.4pt \hbox{\raise0.4pt\hbox{\vphantom{\angleleft}}#1}}% \kern-0.4pt\hrule}% \kern-.06em\raise0.4pt\hbox{\angleright}}}} % The old definition, with no lozenge: %\def\key #1{{\ttsl \nohyphenation \uppercase{#1}}\null} \def\ctrl #1{{\tt \rawbackslash \hat}#1} % @file, @option are the same as @samp. \let\file=\samp \let\option=\samp % @code is a modification of @t, % which makes spaces the same size as normal in the surrounding text. \def\tclose#1{% {% % Change normal interword space to be same as for the current font. \spaceskip = \fontdimen2\font % % Switch to typewriter. \tt % % But `\ ' produces the large typewriter interword space. \def\ {{\spaceskip = 0pt{} }}% % % Turn off hyphenation. \nohyphenation % \rawbackslash \plainfrenchspacing #1% }% \null } % We *must* turn on hyphenation at `-' and `_' in @code. % Otherwise, it is too hard to avoid overfull hboxes % in the Emacs manual, the Library manual, etc. % Unfortunately, TeX uses one parameter (\hyphenchar) to control % both hyphenation at - and hyphenation within words. % We must therefore turn them both off (\tclose does that) % and arrange explicitly to hyphenate at a dash. % -- rms. { \catcode`\-=\active \catcode`\_=\active % \global\def\code{\begingroup \catcode`\-=\active \catcode`\_=\active \ifallowcodebreaks \let-\codedash \let_\codeunder \else \let-\realdash \let_\realunder \fi \codex } } \def\realdash{-} \def\codedash{-\discretionary{}{}{}} \def\codeunder{% % this is all so @math{@code{var_name}+1} can work. In math mode, _ % is "active" (mathcode"8000) and \normalunderscore (or \char95, etc.) % will therefore expand the active definition of _, which is us % (inside @code that is), therefore an endless loop. \ifusingtt{\ifmmode \mathchar"075F % class 0=ordinary, family 7=ttfam, pos 0x5F=_. \else\normalunderscore \fi \discretionary{}{}{}}% {\_}% } \def\codex #1{\tclose{#1}\endgroup} % An additional complication: the above will allow breaks after, e.g., % each of the four underscores in __typeof__. This is undesirable in % some manuals, especially if they don't have long identifiers in % general. @allowcodebreaks provides a way to control this. % \newif\ifallowcodebreaks \allowcodebreakstrue \def\keywordtrue{true} \def\keywordfalse{false} \parseargdef\allowcodebreaks{% \def\txiarg{#1}% \ifx\txiarg\keywordtrue \allowcodebreakstrue \else\ifx\txiarg\keywordfalse \allowcodebreaksfalse \else \errhelp = \EMsimple \errmessage{Unknown @allowcodebreaks option `\txiarg'}% \fi\fi } % @kbd is like @code, except that if the argument is just one @key command, % then @kbd has no effect. % @kbdinputstyle -- arg is `distinct' (@kbd uses slanted tty font always), % `example' (@kbd uses ttsl only inside of @example and friends), % or `code' (@kbd uses normal tty font always). \parseargdef\kbdinputstyle{% \def\txiarg{#1}% \ifx\txiarg\worddistinct \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\ttsl}% \else\ifx\txiarg\wordexample \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\tt}% \else\ifx\txiarg\wordcode \gdef\kbdexamplefont{\tt}\gdef\kbdfont{\tt}% \else \errhelp = \EMsimple \errmessage{Unknown @kbdinputstyle option `\txiarg'}% \fi\fi\fi } \def\worddistinct{distinct} \def\wordexample{example} \def\wordcode{code} % Default is `distinct.' \kbdinputstyle distinct \def\xkey{\key} \def\kbdfoo#1#2#3\par{\def\one{#1}\def\three{#3}\def\threex{??}% \ifx\one\xkey\ifx\threex\three \key{#2}% \else{\tclose{\kbdfont\look}}\fi \else{\tclose{\kbdfont\look}}\fi} % For @indicateurl, @env, @command quotes seem unnecessary, so use \code. \let\indicateurl=\code \let\env=\code \let\command=\code % @uref (abbreviation for `urlref') takes an optional (comma-separated) % second argument specifying the text to display and an optional third % arg as text to display instead of (rather than in addition to) the url % itself. First (mandatory) arg is the url. Perhaps eventually put in % a hypertex \special here. % \def\uref#1{\douref #1,,,\finish} \def\douref#1,#2,#3,#4\finish{\begingroup \unsepspaces \pdfurl{#1}% \setbox0 = \hbox{\ignorespaces #3}% \ifdim\wd0 > 0pt \unhbox0 % third arg given, show only that \else \setbox0 = \hbox{\ignorespaces #2}% \ifdim\wd0 > 0pt \ifpdf \unhbox0 % PDF: 2nd arg given, show only it \else \unhbox0\ (\code{#1})% DVI: 2nd arg given, show both it and url \fi \else \code{#1}% only url given, so show it \fi \fi \endlink \endgroup} % @url synonym for @uref, since that's how everyone uses it. % \let\url=\uref % rms does not like angle brackets --karl, 17may97. % So now @email is just like @uref, unless we are pdf. % %\def\email#1{\angleleft{\tt #1}\angleright} \ifpdf \def\email#1{\doemail#1,,\finish} \def\doemail#1,#2,#3\finish{\begingroup \unsepspaces \pdfurl{mailto:#1}% \setbox0 = \hbox{\ignorespaces #2}% \ifdim\wd0>0pt\unhbox0\else\code{#1}\fi \endlink \endgroup} \else \let\email=\uref \fi % Check if we are currently using a typewriter font. Since all the % Computer Modern typewriter fonts have zero interword stretch (and % shrink), and it is reasonable to expect all typewriter fonts to have % this property, we can check that font parameter. % \def\ifmonospace{\ifdim\fontdimen3\font=0pt } % Typeset a dimension, e.g., `in' or `pt'. The only reason for the % argument is to make the input look right: @dmn{pt} instead of @dmn{}pt. % \def\dmn#1{\thinspace #1} \def\kbd#1{\def\look{#1}\expandafter\kbdfoo\look??\par} % @l was never documented to mean ``switch to the Lisp font'', % and it is not used as such in any manual I can find. We need it for % Polish suppressed-l. --karl, 22sep96. %\def\l#1{{\li #1}\null} % Explicit font changes: @r, @sc, undocumented @ii. \def\r#1{{\rm #1}} % roman font \def\sc#1{{\smallcaps#1}} % smallcaps font \def\ii#1{{\it #1}} % italic font % @acronym for "FBI", "NATO", and the like. % We print this one point size smaller, since it's intended for % all-uppercase. % \def\acronym#1{\doacronym #1,,\finish} \def\doacronym#1,#2,#3\finish{% {\selectfonts\lsize #1}% \def\temp{#2}% \ifx\temp\empty \else \space ({\unsepspaces \ignorespaces \temp \unskip})% \fi } % @abbr for "Comput. J." and the like. % No font change, but don't do end-of-sentence spacing. % \def\abbr#1{\doabbr #1,,\finish} \def\doabbr#1,#2,#3\finish{% {\plainfrenchspacing #1}% \def\temp{#2}% \ifx\temp\empty \else \space ({\unsepspaces \ignorespaces \temp \unskip})% \fi } % @pounds{} is a sterling sign, which Knuth put in the CM italic font. % \def\pounds{{\it\$}} % @euro{} comes from a separate font, depending on the current style. % We use the free feym* fonts from the eurosym package by Henrik % Theiling, which support regular, slanted, bold and bold slanted (and % "outlined" (blackboard board, sort of) versions, which we don't need). % It is available from http://www.ctan.org/tex-archive/fonts/eurosym. % % Although only regular is the truly official Euro symbol, we ignore % that. The Euro is designed to be slightly taller than the regular % font height. % % feymr - regular % feymo - slanted % feybr - bold % feybo - bold slanted % % There is no good (free) typewriter version, to my knowledge. % A feymr10 euro is ~7.3pt wide, while a normal cmtt10 char is ~5.25pt wide. % Hmm. % % Also doesn't work in math. Do we need to do math with euro symbols? % Hope not. % % \def\euro{{\eurofont e}} \def\eurofont{% % We set the font at each command, rather than predefining it in % \textfonts and the other font-switching commands, so that % installations which never need the symbol don't have to have the % font installed. % % There is only one designed size (nominal 10pt), so we always scale % that to the current nominal size. % % By the way, simply using "at 1em" works for cmr10 and the like, but % does not work for cmbx10 and other extended/shrunken fonts. % \def\eurosize{\csname\curfontsize nominalsize\endcsname}% % \ifx\curfontstyle\bfstylename % bold: \font\thiseurofont = \ifusingit{feybo10}{feybr10} at \eurosize \else % regular: \font\thiseurofont = \ifusingit{feymo10}{feymr10} at \eurosize \fi \thiseurofont } % @registeredsymbol - R in a circle. The font for the R should really % be smaller yet, but lllsize is the best we can do for now. % Adapted from the plain.tex definition of \copyright. % \def\registeredsymbol{% $^{{\ooalign{\hfil\raise.07ex\hbox{\selectfonts\lllsize R}% \hfil\crcr\Orb}}% }$% } % Laurent Siebenmann reports \Orb undefined with: % Textures 1.7.7 (preloaded format=plain 93.10.14) (68K) 16 APR 2004 02:38 % so we'll define it if necessary. % \ifx\Orb\undefined \def\Orb{\mathhexbox20D} \fi \message{page headings,} \newskip\titlepagetopglue \titlepagetopglue = 1.5in \newskip\titlepagebottomglue \titlepagebottomglue = 2pc % First the title page. Must do @settitle before @titlepage. \newif\ifseenauthor \newif\iffinishedtitlepage % Do an implicit @contents or @shortcontents after @end titlepage if the % user says @setcontentsaftertitlepage or @setshortcontentsaftertitlepage. % \newif\ifsetcontentsaftertitlepage \let\setcontentsaftertitlepage = \setcontentsaftertitlepagetrue \newif\ifsetshortcontentsaftertitlepage \let\setshortcontentsaftertitlepage = \setshortcontentsaftertitlepagetrue \parseargdef\shorttitlepage{\begingroup\hbox{}\vskip 1.5in \chaprm \centerline{#1}% \endgroup\page\hbox{}\page} \envdef\titlepage{% % Open one extra group, as we want to close it in the middle of \Etitlepage. \begingroup \parindent=0pt \textfonts % Leave some space at the very top of the page. \vglue\titlepagetopglue % No rule at page bottom unless we print one at the top with @title. \finishedtitlepagetrue % % Most title ``pages'' are actually two pages long, with space % at the top of the second. We don't want the ragged left on the second. \let\oldpage = \page \def\page{% \iffinishedtitlepage\else \finishtitlepage \fi \let\page = \oldpage \page \null }% } \def\Etitlepage{% \iffinishedtitlepage\else \finishtitlepage \fi % It is important to do the page break before ending the group, % because the headline and footline are only empty inside the group. % If we use the new definition of \page, we always get a blank page % after the title page, which we certainly don't want. \oldpage \endgroup % % Need this before the \...aftertitlepage checks so that if they are % in effect the toc pages will come out with page numbers. \HEADINGSon % % If they want short, they certainly want long too. \ifsetshortcontentsaftertitlepage \shortcontents \contents \global\let\shortcontents = \relax \global\let\contents = \relax \fi % \ifsetcontentsaftertitlepage \contents \global\let\contents = \relax \global\let\shortcontents = \relax \fi } \def\finishtitlepage{% \vskip4pt \hrule height 2pt width \hsize \vskip\titlepagebottomglue \finishedtitlepagetrue } %%% Macros to be used within @titlepage: \let\subtitlerm=\tenrm \def\subtitlefont{\subtitlerm \normalbaselineskip = 13pt \normalbaselines} \def\authorfont{\authorrm \normalbaselineskip = 16pt \normalbaselines \let\tt=\authortt} \parseargdef\title{% \checkenv\titlepage \leftline{\titlefonts\rm #1} % print a rule at the page bottom also. \finishedtitlepagefalse \vskip4pt \hrule height 4pt width \hsize \vskip4pt } \parseargdef\subtitle{% \checkenv\titlepage {\subtitlefont \rightline{#1}}% } % @author should come last, but may come many times. % It can also be used inside @quotation. % \parseargdef\author{% \def\temp{\quotation}% \ifx\thisenv\temp \def\quotationauthor{#1}% printed in \Equotation. \else \checkenv\titlepage \ifseenauthor\else \vskip 0pt plus 1filll \seenauthortrue \fi {\authorfont \leftline{#1}}% \fi } %%% Set up page headings and footings. \let\thispage=\folio \newtoks\evenheadline % headline on even pages \newtoks\oddheadline % headline on odd pages \newtoks\evenfootline % footline on even pages \newtoks\oddfootline % footline on odd pages % Now make TeX use those variables \headline={{\textfonts\rm \ifodd\pageno \the\oddheadline \else \the\evenheadline \fi}} \footline={{\textfonts\rm \ifodd\pageno \the\oddfootline \else \the\evenfootline \fi}\HEADINGShook} \let\HEADINGShook=\relax % Commands to set those variables. % For example, this is what @headings on does % @evenheading @thistitle|@thispage|@thischapter % @oddheading @thischapter|@thispage|@thistitle % @evenfooting @thisfile|| % @oddfooting ||@thisfile \def\evenheading{\parsearg\evenheadingxxx} \def\evenheadingxxx #1{\evenheadingyyy #1\|\|\|\|\finish} \def\evenheadingyyy #1\|#2\|#3\|#4\finish{% \global\evenheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}} \def\oddheading{\parsearg\oddheadingxxx} \def\oddheadingxxx #1{\oddheadingyyy #1\|\|\|\|\finish} \def\oddheadingyyy #1\|#2\|#3\|#4\finish{% \global\oddheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}} \parseargdef\everyheading{\oddheadingxxx{#1}\evenheadingxxx{#1}}% \def\evenfooting{\parsearg\evenfootingxxx} \def\evenfootingxxx #1{\evenfootingyyy #1\|\|\|\|\finish} \def\evenfootingyyy #1\|#2\|#3\|#4\finish{% \global\evenfootline={\rlap{\centerline{#2}}\line{#1\hfil#3}}} \def\oddfooting{\parsearg\oddfootingxxx} \def\oddfootingxxx #1{\oddfootingyyy #1\|\|\|\|\finish} \def\oddfootingyyy #1\|#2\|#3\|#4\finish{% \global\oddfootline = {\rlap{\centerline{#2}}\line{#1\hfil#3}}% % % Leave some space for the footline. Hopefully ok to assume % @evenfooting will not be used by itself. \global\advance\pageheight by -\baselineskip \global\advance\vsize by -\baselineskip } \parseargdef\everyfooting{\oddfootingxxx{#1}\evenfootingxxx{#1}} % @headings double turns headings on for double-sided printing. % @headings single turns headings on for single-sided printing. % @headings off turns them off. % @headings on same as @headings double, retained for compatibility. % @headings after turns on double-sided headings after this page. % @headings doubleafter turns on double-sided headings after this page. % @headings singleafter turns on single-sided headings after this page. % By default, they are off at the start of a document, % and turned `on' after @end titlepage. \def\headings #1 {\csname HEADINGS#1\endcsname} \def\HEADINGSoff{% \global\evenheadline={\hfil} \global\evenfootline={\hfil} \global\oddheadline={\hfil} \global\oddfootline={\hfil}} \HEADINGSoff % When we turn headings on, set the page number to 1. % For double-sided printing, put current file name in lower left corner, % chapter name on inside top of right hand pages, document % title on inside top of left hand pages, and page numbers on outside top % edge of all pages. \def\HEADINGSdouble{% \global\pageno=1 \global\evenfootline={\hfil} \global\oddfootline={\hfil} \global\evenheadline={\line{\folio\hfil\thistitle}} \global\oddheadline={\line{\thischapter\hfil\folio}} \global\let\contentsalignmacro = \chapoddpage } \let\contentsalignmacro = \chappager % For single-sided printing, chapter title goes across top left of page, % page number on top right. \def\HEADINGSsingle{% \global\pageno=1 \global\evenfootline={\hfil} \global\oddfootline={\hfil} \global\evenheadline={\line{\thischapter\hfil\folio}} \global\oddheadline={\line{\thischapter\hfil\folio}} \global\let\contentsalignmacro = \chappager } \def\HEADINGSon{\HEADINGSdouble} \def\HEADINGSafter{\let\HEADINGShook=\HEADINGSdoublex} \let\HEADINGSdoubleafter=\HEADINGSafter \def\HEADINGSdoublex{% \global\evenfootline={\hfil} \global\oddfootline={\hfil} \global\evenheadline={\line{\folio\hfil\thistitle}} \global\oddheadline={\line{\thischapter\hfil\folio}} \global\let\contentsalignmacro = \chapoddpage } \def\HEADINGSsingleafter{\let\HEADINGShook=\HEADINGSsinglex} \def\HEADINGSsinglex{% \global\evenfootline={\hfil} \global\oddfootline={\hfil} \global\evenheadline={\line{\thischapter\hfil\folio}} \global\oddheadline={\line{\thischapter\hfil\folio}} \global\let\contentsalignmacro = \chappager } % Subroutines used in generating headings % This produces Day Month Year style of output. % Only define if not already defined, in case a txi-??.tex file has set % up a different format (e.g., txi-cs.tex does this). \ifx\today\undefined \def\today{% \number\day\space \ifcase\month \or\putwordMJan\or\putwordMFeb\or\putwordMMar\or\putwordMApr \or\putwordMMay\or\putwordMJun\or\putwordMJul\or\putwordMAug \or\putwordMSep\or\putwordMOct\or\putwordMNov\or\putwordMDec \fi \space\number\year} \fi % @settitle line... specifies the title of the document, for headings. % It generates no output of its own. \def\thistitle{\putwordNoTitle} \def\settitle{\parsearg{\gdef\thistitle}} \message{tables,} % Tables -- @table, @ftable, @vtable, @item(x). % default indentation of table text \newdimen\tableindent \tableindent=.8in % default indentation of @itemize and @enumerate text \newdimen\itemindent \itemindent=.3in % margin between end of table item and start of table text. \newdimen\itemmargin \itemmargin=.1in % used internally for \itemindent minus \itemmargin \newdimen\itemmax % Note @table, @ftable, and @vtable define @item, @itemx, etc., with % these defs. % They also define \itemindex % to index the item name in whatever manner is desired (perhaps none). \newif\ifitemxneedsnegativevskip \def\itemxpar{\par\ifitemxneedsnegativevskip\nobreak\vskip-\parskip\nobreak\fi} \def\internalBitem{\smallbreak \parsearg\itemzzz} \def\internalBitemx{\itemxpar \parsearg\itemzzz} \def\itemzzz #1{\begingroup % \advance\hsize by -\rightskip \advance\hsize by -\tableindent \setbox0=\hbox{\itemindicate{#1}}% \itemindex{#1}% \nobreak % This prevents a break before @itemx. % % If the item text does not fit in the space we have, put it on a line % by itself, and do not allow a page break either before or after that % line. We do not start a paragraph here because then if the next % command is, e.g., @kindex, the whatsit would get put into the % horizontal list on a line by itself, resulting in extra blank space. \ifdim \wd0>\itemmax % % Make this a paragraph so we get the \parskip glue and wrapping, % but leave it ragged-right. \begingroup \advance\leftskip by-\tableindent \advance\hsize by\tableindent \advance\rightskip by0pt plus1fil \leavevmode\unhbox0\par \endgroup % % We're going to be starting a paragraph, but we don't want the % \parskip glue -- logically it's part of the @item we just started. \nobreak \vskip-\parskip % % Stop a page break at the \parskip glue coming up. However, if % what follows is an environment such as @example, there will be no % \parskip glue; then the negative vskip we just inserted would % cause the example and the item to crash together. So we use this % bizarre value of 10001 as a signal to \aboveenvbreak to insert % \parskip glue after all. Section titles are handled this way also. % \penalty 10001 \endgroup \itemxneedsnegativevskipfalse \else % The item text fits into the space. Start a paragraph, so that the % following text (if any) will end up on the same line. \noindent % Do this with kerns and \unhbox so that if there is a footnote in % the item text, it can migrate to the main vertical list and % eventually be printed. \nobreak\kern-\tableindent \dimen0 = \itemmax \advance\dimen0 by \itemmargin \advance\dimen0 by -\wd0 \unhbox0 \nobreak\kern\dimen0 \endgroup \itemxneedsnegativevskiptrue \fi } \def\item{\errmessage{@item while not in a list environment}} \def\itemx{\errmessage{@itemx while not in a list environment}} % @table, @ftable, @vtable. \envdef\table{% \let\itemindex\gobble \tablecheck{table}% } \envdef\ftable{% \def\itemindex ##1{\doind {fn}{\code{##1}}}% \tablecheck{ftable}% } \envdef\vtable{% \def\itemindex ##1{\doind {vr}{\code{##1}}}% \tablecheck{vtable}% } \def\tablecheck#1{% \ifnum \the\catcode`\^^M=\active \endgroup \errmessage{This command won't work in this context; perhaps the problem is that we are \inenvironment\thisenv}% \def\next{\doignore{#1}}% \else \let\next\tablex \fi \next } \def\tablex#1{% \def\itemindicate{#1}% \parsearg\tabley } \def\tabley#1{% {% \makevalueexpandable \edef\temp{\noexpand\tablez #1\space\space\space}% \expandafter }\temp \endtablez } \def\tablez #1 #2 #3 #4\endtablez{% \aboveenvbreak \ifnum 0#1>0 \advance \leftskip by #1\mil \fi \ifnum 0#2>0 \tableindent=#2\mil \fi \ifnum 0#3>0 \advance \rightskip by #3\mil \fi \itemmax=\tableindent \advance \itemmax by -\itemmargin \advance \leftskip by \tableindent \exdentamount=\tableindent \parindent = 0pt \parskip = \smallskipamount \ifdim \parskip=0pt \parskip=2pt \fi \let\item = \internalBitem \let\itemx = \internalBitemx } \def\Etable{\endgraf\afterenvbreak} \let\Eftable\Etable \let\Evtable\Etable \let\Eitemize\Etable \let\Eenumerate\Etable % This is the counter used by @enumerate, which is really @itemize \newcount \itemno \envdef\itemize{\parsearg\doitemize} \def\doitemize#1{% \aboveenvbreak \itemmax=\itemindent \advance\itemmax by -\itemmargin \advance\leftskip by \itemindent \exdentamount=\itemindent \parindent=0pt \parskip=\smallskipamount \ifdim\parskip=0pt \parskip=2pt \fi \def\itemcontents{#1}% % @itemize with no arg is equivalent to @itemize @bullet. \ifx\itemcontents\empty\def\itemcontents{\bullet}\fi \let\item=\itemizeitem } % Definition of @item while inside @itemize and @enumerate. % \def\itemizeitem{% \advance\itemno by 1 % for enumerations {\let\par=\endgraf \smallbreak}% reasonable place to break {% % If the document has an @itemize directly after a section title, a % \nobreak will be last on the list, and \sectionheading will have % done a \vskip-\parskip. In that case, we don't want to zero % parskip, or the item text will crash with the heading. On the % other hand, when there is normal text preceding the item (as there % usually is), we do want to zero parskip, or there would be too much % space. In that case, we won't have a \nobreak before. At least % that's the theory. \ifnum\lastpenalty<10000 \parskip=0in \fi \noindent \hbox to 0pt{\hss \itemcontents \kern\itemmargin}% \vadjust{\penalty 1200}}% not good to break after first line of item. \flushcr } % \splitoff TOKENS\endmark defines \first to be the first token in % TOKENS, and \rest to be the remainder. % \def\splitoff#1#2\endmark{\def\first{#1}\def\rest{#2}}% % Allow an optional argument of an uppercase letter, lowercase letter, % or number, to specify the first label in the enumerated list. No % argument is the same as `1'. % \envparseargdef\enumerate{\enumeratey #1 \endenumeratey} \def\enumeratey #1 #2\endenumeratey{% % If we were given no argument, pretend we were given `1'. \def\thearg{#1}% \ifx\thearg\empty \def\thearg{1}\fi % % Detect if the argument is a single token. If so, it might be a % letter. Otherwise, the only valid thing it can be is a number. % (We will always have one token, because of the test we just made. % This is a good thing, since \splitoff doesn't work given nothing at % all -- the first parameter is undelimited.) \expandafter\splitoff\thearg\endmark \ifx\rest\empty % Only one token in the argument. It could still be anything. % A ``lowercase letter'' is one whose \lccode is nonzero. % An ``uppercase letter'' is one whose \lccode is both nonzero, and % not equal to itself. % Otherwise, we assume it's a number. % % We need the \relax at the end of the \ifnum lines to stop TeX from % continuing to look for a . % \ifnum\lccode\expandafter`\thearg=0\relax \numericenumerate % a number (we hope) \else % It's a letter. \ifnum\lccode\expandafter`\thearg=\expandafter`\thearg\relax \lowercaseenumerate % lowercase letter \else \uppercaseenumerate % uppercase letter \fi \fi \else % Multiple tokens in the argument. We hope it's a number. \numericenumerate \fi } % An @enumerate whose labels are integers. The starting integer is % given in \thearg. % \def\numericenumerate{% \itemno = \thearg \startenumeration{\the\itemno}% } % The starting (lowercase) letter is in \thearg. \def\lowercaseenumerate{% \itemno = \expandafter`\thearg \startenumeration{% % Be sure we're not beyond the end of the alphabet. \ifnum\itemno=0 \errmessage{No more lowercase letters in @enumerate; get a bigger alphabet}% \fi \char\lccode\itemno }% } % The starting (uppercase) letter is in \thearg. \def\uppercaseenumerate{% \itemno = \expandafter`\thearg \startenumeration{% % Be sure we're not beyond the end of the alphabet. \ifnum\itemno=0 \errmessage{No more uppercase letters in @enumerate; get a bigger alphabet} \fi \char\uccode\itemno }% } % Call \doitemize, adding a period to the first argument and supplying the % common last two arguments. Also subtract one from the initial value in % \itemno, since @item increments \itemno. % \def\startenumeration#1{% \advance\itemno by -1 \doitemize{#1.}\flushcr } % @alphaenumerate and @capsenumerate are abbreviations for giving an arg % to @enumerate. % \def\alphaenumerate{\enumerate{a}} \def\capsenumerate{\enumerate{A}} \def\Ealphaenumerate{\Eenumerate} \def\Ecapsenumerate{\Eenumerate} % @multitable macros % Amy Hendrickson, 8/18/94, 3/6/96 % % @multitable ... @end multitable will make as many columns as desired. % Contents of each column will wrap at width given in preamble. Width % can be specified either with sample text given in a template line, % or in percent of \hsize, the current width of text on page. % Table can continue over pages but will only break between lines. % To make preamble: % % Either define widths of columns in terms of percent of \hsize: % @multitable @columnfractions .25 .3 .45 % @item ... % % Numbers following @columnfractions are the percent of the total % current hsize to be used for each column. You may use as many % columns as desired. % Or use a template: % @multitable {Column 1 template} {Column 2 template} {Column 3 template} % @item ... % using the widest term desired in each column. % Each new table line starts with @item, each subsequent new column % starts with @tab. Empty columns may be produced by supplying @tab's % with nothing between them for as many times as empty columns are needed, % ie, @tab@tab@tab will produce two empty columns. % @item, @tab do not need to be on their own lines, but it will not hurt % if they are. % Sample multitable: % @multitable {Column 1 template} {Column 2 template} {Column 3 template} % @item first col stuff @tab second col stuff @tab third col % @item % first col stuff % @tab % second col stuff % @tab % third col % @item first col stuff @tab second col stuff % @tab Many paragraphs of text may be used in any column. % % They will wrap at the width determined by the template. % @item@tab@tab This will be in third column. % @end multitable % Default dimensions may be reset by user. % @multitableparskip is vertical space between paragraphs in table. % @multitableparindent is paragraph indent in table. % @multitablecolmargin is horizontal space to be left between columns. % @multitablelinespace is space to leave between table items, baseline % to baseline. % 0pt means it depends on current normal line spacing. % \newskip\multitableparskip \newskip\multitableparindent \newdimen\multitablecolspace \newskip\multitablelinespace \multitableparskip=0pt \multitableparindent=6pt \multitablecolspace=12pt \multitablelinespace=0pt % Macros used to set up halign preamble: % \let\endsetuptable\relax \def\xendsetuptable{\endsetuptable} \let\columnfractions\relax \def\xcolumnfractions{\columnfractions} \newif\ifsetpercent % #1 is the @columnfraction, usually a decimal number like .5, but might % be just 1. We just use it, whatever it is. % \def\pickupwholefraction#1 {% \global\advance\colcount by 1 \expandafter\xdef\csname col\the\colcount\endcsname{#1\hsize}% \setuptable } \newcount\colcount \def\setuptable#1{% \def\firstarg{#1}% \ifx\firstarg\xendsetuptable \let\go = \relax \else \ifx\firstarg\xcolumnfractions \global\setpercenttrue \else \ifsetpercent \let\go\pickupwholefraction \else \global\advance\colcount by 1 \setbox0=\hbox{#1\unskip\space}% Add a normal word space as a % separator; typically that is always in the input, anyway. \expandafter\xdef\csname col\the\colcount\endcsname{\the\wd0}% \fi \fi \ifx\go\pickupwholefraction % Put the argument back for the \pickupwholefraction call, so % we'll always have a period there to be parsed. \def\go{\pickupwholefraction#1}% \else \let\go = \setuptable \fi% \fi \go } % multitable-only commands. % % @headitem starts a heading row, which we typeset in bold. % Assignments have to be global since we are inside the implicit group % of an alignment entry. Note that \everycr resets \everytab. \def\headitem{\checkenv\multitable \crcr \global\everytab={\bf}\the\everytab}% % % A \tab used to include \hskip1sp. But then the space in a template % line is not enough. That is bad. So let's go back to just `&' until % we encounter the problem it was intended to solve again. % --karl, nathan@acm.org, 20apr99. \def\tab{\checkenv\multitable &\the\everytab}% % @multitable ... @end multitable definitions: % \newtoks\everytab % insert after every tab. % \envdef\multitable{% \vskip\parskip \startsavinginserts % % @item within a multitable starts a normal row. % We use \def instead of \let so that if one of the multitable entries % contains an @itemize, we don't choke on the \item (seen as \crcr aka % \endtemplate) expanding \doitemize. \def\item{\crcr}% % \tolerance=9500 \hbadness=9500 \setmultitablespacing \parskip=\multitableparskip \parindent=\multitableparindent \overfullrule=0pt \global\colcount=0 % \everycr = {% \noalign{% \global\everytab={}% \global\colcount=0 % Reset the column counter. % Check for saved footnotes, etc. \checkinserts % Keeps underfull box messages off when table breaks over pages. %\filbreak % Maybe so, but it also creates really weird page breaks when the % table breaks over pages. Wouldn't \vfil be better? Wait until the % problem manifests itself, so it can be fixed for real --karl. }% }% % \parsearg\domultitable } \def\domultitable#1{% % To parse everything between @multitable and @item: \setuptable#1 \endsetuptable % % This preamble sets up a generic column definition, which will % be used as many times as user calls for columns. % \vtop will set a single line and will also let text wrap and % continue for many paragraphs if desired. \halign\bgroup &% \global\advance\colcount by 1 \multistrut \vtop{% % Use the current \colcount to find the correct column width: \hsize=\expandafter\csname col\the\colcount\endcsname % % In order to keep entries from bumping into each other % we will add a \leftskip of \multitablecolspace to all columns after % the first one. % % If a template has been used, we will add \multitablecolspace % to the width of each template entry. % % If the user has set preamble in terms of percent of \hsize we will % use that dimension as the width of the column, and the \leftskip % will keep entries from bumping into each other. Table will start at % left margin and final column will justify at right margin. % % Make sure we don't inherit \rightskip from the outer environment. \rightskip=0pt \ifnum\colcount=1 % The first column will be indented with the surrounding text. \advance\hsize by\leftskip \else \ifsetpercent \else % If user has not set preamble in terms of percent of \hsize % we will advance \hsize by \multitablecolspace. \advance\hsize by \multitablecolspace \fi % In either case we will make \leftskip=\multitablecolspace: \leftskip=\multitablecolspace \fi % Ignoring space at the beginning and end avoids an occasional spurious % blank line, when TeX decides to break the line at the space before the % box from the multistrut, so the strut ends up on a line by itself. % For example: % @multitable @columnfractions .11 .89 % @item @code{#} % @tab Legal holiday which is valid in major parts of the whole country. % Is automatically provided with highlighting sequences respectively % marking characters. \noindent\ignorespaces##\unskip\multistrut }\cr } \def\Emultitable{% \crcr \egroup % end the \halign \global\setpercentfalse } \def\setmultitablespacing{% \def\multistrut{\strut}% just use the standard line spacing % % Compute \multitablelinespace (if not defined by user) for use in % \multitableparskip calculation. We used define \multistrut based on % this, but (ironically) that caused the spacing to be off. % See bug-texinfo report from Werner Lemberg, 31 Oct 2004 12:52:20 +0100. \ifdim\multitablelinespace=0pt \setbox0=\vbox{X}\global\multitablelinespace=\the\baselineskip \global\advance\multitablelinespace by-\ht0 \fi %% Test to see if parskip is larger than space between lines of %% table. If not, do nothing. %% If so, set to same dimension as multitablelinespace. \ifdim\multitableparskip>\multitablelinespace \global\multitableparskip=\multitablelinespace \global\advance\multitableparskip-7pt %% to keep parskip somewhat smaller %% than skip between lines in the table. \fi% \ifdim\multitableparskip=0pt \global\multitableparskip=\multitablelinespace \global\advance\multitableparskip-7pt %% to keep parskip somewhat smaller %% than skip between lines in the table. \fi} \message{conditionals,} % @iftex, @ifnotdocbook, @ifnothtml, @ifnotinfo, @ifnotplaintext, % @ifnotxml always succeed. They currently do nothing; we don't % attempt to check whether the conditionals are properly nested. But we % have to remember that they are conditionals, so that @end doesn't % attempt to close an environment group. % \def\makecond#1{% \expandafter\let\csname #1\endcsname = \relax \expandafter\let\csname iscond.#1\endcsname = 1 } \makecond{iftex} \makecond{ifnotdocbook} \makecond{ifnothtml} \makecond{ifnotinfo} \makecond{ifnotplaintext} \makecond{ifnotxml} % Ignore @ignore, @ifhtml, @ifinfo, and the like. % \def\direntry{\doignore{direntry}} \def\documentdescription{\doignore{documentdescription}} \def\docbook{\doignore{docbook}} \def\html{\doignore{html}} \def\ifdocbook{\doignore{ifdocbook}} \def\ifhtml{\doignore{ifhtml}} \def\ifinfo{\doignore{ifinfo}} \def\ifnottex{\doignore{ifnottex}} \def\ifplaintext{\doignore{ifplaintext}} \def\ifxml{\doignore{ifxml}} \def\ignore{\doignore{ignore}} \def\menu{\doignore{menu}} \def\xml{\doignore{xml}} % Ignore text until a line `@end #1', keeping track of nested conditionals. % % A count to remember the depth of nesting. \newcount\doignorecount \def\doignore#1{\begingroup % Scan in ``verbatim'' mode: \catcode`\@ = \other \catcode`\{ = \other \catcode`\} = \other % % Make sure that spaces turn into tokens that match what \doignoretext wants. \spaceisspace % % Count number of #1's that we've seen. \doignorecount = 0 % % Swallow text until we reach the matching `@end #1'. \dodoignore{#1}% } { \catcode`_=11 % We want to use \_STOP_ which cannot appear in texinfo source. \obeylines % % \gdef\dodoignore#1{% % #1 contains the command name as a string, e.g., `ifinfo'. % % Define a command to find the next `@end #1', which must be on a line % by itself. \long\def\doignoretext##1^^M@end #1{\doignoretextyyy##1^^M@#1\_STOP_}% % And this command to find another #1 command, at the beginning of a % line. (Otherwise, we would consider a line `@c @ifset', for % example, to count as an @ifset for nesting.) \long\def\doignoretextyyy##1^^M@#1##2\_STOP_{\doignoreyyy{##2}\_STOP_}% % % And now expand that command. \obeylines % \doignoretext ^^M% }% } \def\doignoreyyy#1{% \def\temp{#1}% \ifx\temp\empty % Nothing found. \let\next\doignoretextzzz \else % Found a nested condition, ... \advance\doignorecount by 1 \let\next\doignoretextyyy % ..., look for another. % If we're here, #1 ends with ^^M\ifinfo (for example). \fi \next #1% the token \_STOP_ is present just after this macro. } % We have to swallow the remaining "\_STOP_". % \def\doignoretextzzz#1{% \ifnum\doignorecount = 0 % We have just found the outermost @end. \let\next\enddoignore \else % Still inside a nested condition. \advance\doignorecount by -1 \let\next\doignoretext % Look for the next @end. \fi \next } % Finish off ignored text. \def\enddoignore{\endgroup\ignorespaces} % @set VAR sets the variable VAR to an empty value. % @set VAR REST-OF-LINE sets VAR to the value REST-OF-LINE. % % Since we want to separate VAR from REST-OF-LINE (which might be % empty), we can't just use \parsearg; we have to insert a space of our % own to delimit the rest of the line, and then take it out again if we % didn't need it. % We rely on the fact that \parsearg sets \catcode`\ =10. % \parseargdef\set{\setyyy#1 \endsetyyy} \def\setyyy#1 #2\endsetyyy{% {% \makevalueexpandable \def\temp{#2}% \edef\next{\gdef\makecsname{SET#1}}% \ifx\temp\empty \next{}% \else \setzzz#2\endsetzzz \fi }% } % Remove the trailing space \setxxx inserted. \def\setzzz#1 \endsetzzz{\next{#1}} % @clear VAR clears (i.e., unsets) the variable VAR. % \parseargdef\clear{% {% \makevalueexpandable \global\expandafter\let\csname SET#1\endcsname=\relax }% } % @value{foo} gets the text saved in variable foo. \def\value{\begingroup\makevalueexpandable\valuexxx} \def\valuexxx#1{\expandablevalue{#1}\endgroup} { \catcode`\- = \active \catcode`\_ = \active % \gdef\makevalueexpandable{% \let\value = \expandablevalue % We don't want these characters active, ... \catcode`\-=\other \catcode`\_=\other % ..., but we might end up with active ones in the argument if % we're called from @code, as @code{@value{foo-bar_}}, though. % So \let them to their normal equivalents. \let-\realdash \let_\normalunderscore } } % We have this subroutine so that we can handle at least some @value's % properly in indexes (we call \makevalueexpandable in \indexdummies). % The command has to be fully expandable (if the variable is set), since % the result winds up in the index file. This means that if the % variable's value contains other Texinfo commands, it's almost certain % it will fail (although perhaps we could fix that with sufficient work % to do a one-level expansion on the result, instead of complete). % \def\expandablevalue#1{% \expandafter\ifx\csname SET#1\endcsname\relax {[No value for ``#1'']}% \message{Variable `#1', used in @value, is not set.}% \else \csname SET#1\endcsname \fi } % @ifset VAR ... @end ifset reads the `...' iff VAR has been defined % with @set. % % To get special treatment of `@end ifset,' call \makeond and the redefine. % \makecond{ifset} \def\ifset{\parsearg{\doifset{\let\next=\ifsetfail}}} \def\doifset#1#2{% {% \makevalueexpandable \let\next=\empty \expandafter\ifx\csname SET#2\endcsname\relax #1% If not set, redefine \next. \fi \expandafter }\next } \def\ifsetfail{\doignore{ifset}} % @ifclear VAR ... @end ifclear reads the `...' iff VAR has never been % defined with @set, or has been undefined with @clear. % % The `\else' inside the `\doifset' parameter is a trick to reuse the % above code: if the variable is not set, do nothing, if it is set, % then redefine \next to \ifclearfail. % \makecond{ifclear} \def\ifclear{\parsearg{\doifset{\else \let\next=\ifclearfail}}} \def\ifclearfail{\doignore{ifclear}} % @dircategory CATEGORY -- specify a category of the dir file % which this file should belong to. Ignore this in TeX. \let\dircategory=\comment % @defininfoenclose. \let\definfoenclose=\comment \message{indexing,} % Index generation facilities % Define \newwrite to be identical to plain tex's \newwrite % except not \outer, so it can be used within macros and \if's. \edef\newwrite{\makecsname{ptexnewwrite}} % \newindex {foo} defines an index named foo. % It automatically defines \fooindex such that % \fooindex ...rest of line... puts an entry in the index foo. % It also defines \fooindfile to be the number of the output channel for % the file that accumulates this index. The file's extension is foo. % The name of an index should be no more than 2 characters long % for the sake of vms. % \def\newindex#1{% \iflinks \expandafter\newwrite \csname#1indfile\endcsname \openout \csname#1indfile\endcsname \jobname.#1 % Open the file \fi \expandafter\xdef\csname#1index\endcsname{% % Define @#1index \noexpand\doindex{#1}} } % @defindex foo == \newindex{foo} % \def\defindex{\parsearg\newindex} % Define @defcodeindex, like @defindex except put all entries in @code. % \def\defcodeindex{\parsearg\newcodeindex} % \def\newcodeindex#1{% \iflinks \expandafter\newwrite \csname#1indfile\endcsname \openout \csname#1indfile\endcsname \jobname.#1 \fi \expandafter\xdef\csname#1index\endcsname{% \noexpand\docodeindex{#1}}% } % @synindex foo bar makes index foo feed into index bar. % Do this instead of @defindex foo if you don't want it as a separate index. % % @syncodeindex foo bar similar, but put all entries made for index foo % inside @code. % \def\synindex#1 #2 {\dosynindex\doindex{#1}{#2}} \def\syncodeindex#1 #2 {\dosynindex\docodeindex{#1}{#2}} % #1 is \doindex or \docodeindex, #2 the index getting redefined (foo), % #3 the target index (bar). \def\dosynindex#1#2#3{% % Only do \closeout if we haven't already done it, else we'll end up % closing the target index. \expandafter \ifx\csname donesynindex#2\endcsname \undefined % The \closeout helps reduce unnecessary open files; the limit on the % Acorn RISC OS is a mere 16 files. \expandafter\closeout\csname#2indfile\endcsname \expandafter\let\csname\donesynindex#2\endcsname = 1 \fi % redefine \fooindfile: \expandafter\let\expandafter\temp\expandafter=\csname#3indfile\endcsname \expandafter\let\csname#2indfile\endcsname=\temp % redefine \fooindex: \expandafter\xdef\csname#2index\endcsname{\noexpand#1{#3}}% } % Define \doindex, the driver for all \fooindex macros. % Argument #1 is generated by the calling \fooindex macro, % and it is "foo", the name of the index. % \doindex just uses \parsearg; it calls \doind for the actual work. % This is because \doind is more useful to call from other macros. % There is also \dosubind {index}{topic}{subtopic} % which makes an entry in a two-level index such as the operation index. \def\doindex#1{\edef\indexname{#1}\parsearg\singleindexer} \def\singleindexer #1{\doind{\indexname}{#1}} % like the previous two, but they put @code around the argument. \def\docodeindex#1{\edef\indexname{#1}\parsearg\singlecodeindexer} \def\singlecodeindexer #1{\doind{\indexname}{\code{#1}}} % Take care of Texinfo commands that can appear in an index entry. % Since there are some commands we want to expand, and others we don't, % we have to laboriously prevent expansion for those that we don't. % \def\indexdummies{% \escapechar = `\\ % use backslash in output files. \def\@{@}% change to @@ when we switch to @ as escape char in index files. \def\ {\realbackslash\space }% % Need these in case \tex is in effect and \{ is a \delimiter again. % But can't use \lbracecmd and \rbracecmd because texindex assumes % braces and backslashes are used only as delimiters. \let\{ = \mylbrace \let\} = \myrbrace % % Do the redefinitions. \commondummies } % For the aux and toc files, @ is the escape character. So we want to % redefine everything using @ as the escape character (instead of % \realbackslash, still used for index files). When everything uses @, % this will be simpler. % \def\atdummies{% \def\@{@@}% \def\ {@ }% \let\{ = \lbraceatcmd \let\} = \rbraceatcmd % % Do the redefinitions. \commondummies } % Called from \indexdummies and \atdummies. % \def\commondummies{% % % \definedummyword defines \#1 as \string\#1\space, thus effectively % preventing its expansion. This is used only for control% words, % not control letters, because the \space would be incorrect for % control characters, but is needed to separate the control word % from whatever follows. % % For control letters, we have \definedummyletter, which omits the % space. % % These can be used both for control words that take an argument and % those that do not. If it is followed by {arg} in the input, then % that will dutifully get written to the index (or wherever). % \def\definedummyword ##1{\def##1{\string##1\space}}% \def\definedummyletter##1{\def##1{\string##1}}% \let\definedummyaccent\definedummyletter % \commondummiesnofonts % \definedummyletter\_% % % Non-English letters. \definedummyword\AA \definedummyword\AE \definedummyword\L \definedummyword\OE \definedummyword\O \definedummyword\aa \definedummyword\ae \definedummyword\l \definedummyword\oe \definedummyword\o \definedummyword\ss \definedummyword\exclamdown \definedummyword\questiondown \definedummyword\ordf \definedummyword\ordm % % Although these internal commands shouldn't show up, sometimes they do. \definedummyword\bf \definedummyword\gtr \definedummyword\hat \definedummyword\less \definedummyword\sf \definedummyword\sl \definedummyword\tclose \definedummyword\tt % \definedummyword\LaTeX \definedummyword\TeX % % Assorted special characters. \definedummyword\bullet \definedummyword\comma \definedummyword\copyright \definedummyword\registeredsymbol \definedummyword\dots \definedummyword\enddots \definedummyword\equiv \definedummyword\error \definedummyword\euro \definedummyword\expansion \definedummyword\minus \definedummyword\pounds \definedummyword\point \definedummyword\print \definedummyword\result % % We want to disable all macros so that they are not expanded by \write. \macrolist % \normalturnoffactive % % Handle some cases of @value -- where it does not contain any % (non-fully-expandable) commands. \makevalueexpandable } % \commondummiesnofonts: common to \commondummies and \indexnofonts. % % Better have this without active chars. { \catcode`\~=\other \gdef\commondummiesnofonts{% % Control letters and accents. \definedummyletter\!% \definedummyaccent\"% \definedummyaccent\'% \definedummyletter\*% \definedummyaccent\,% \definedummyletter\.% \definedummyletter\/% \definedummyletter\:% \definedummyaccent\=% \definedummyletter\?% \definedummyaccent\^% \definedummyaccent\`% \definedummyaccent\~% \definedummyword\u \definedummyword\v \definedummyword\H \definedummyword\dotaccent \definedummyword\ringaccent \definedummyword\tieaccent \definedummyword\ubaraccent \definedummyword\udotaccent \definedummyword\dotless % % Texinfo font commands. \definedummyword\b \definedummyword\i \definedummyword\r \definedummyword\sc \definedummyword\t % % Commands that take arguments. \definedummyword\acronym \definedummyword\cite \definedummyword\code \definedummyword\command \definedummyword\dfn \definedummyword\emph \definedummyword\env \definedummyword\file \definedummyword\kbd \definedummyword\key \definedummyword\math \definedummyword\option \definedummyword\samp \definedummyword\strong \definedummyword\tie \definedummyword\uref \definedummyword\url \definedummyword\var \definedummyword\verb \definedummyword\w } } % \indexnofonts is used when outputting the strings to sort the index % by, and when constructing control sequence names. It eliminates all % control sequences and just writes whatever the best ASCII sort string % would be for a given command (usually its argument). % \def\indexnofonts{% % Accent commands should become @asis. \def\definedummyaccent##1{\let##1\asis}% % We can just ignore other control letters. \def\definedummyletter##1{\let##1\empty}% % Hopefully, all control words can become @asis. \let\definedummyword\definedummyaccent % \commondummiesnofonts % % Don't no-op \tt, since it isn't a user-level command % and is used in the definitions of the active chars like <, >, |, etc. % Likewise with the other plain tex font commands. %\let\tt=\asis % \def\ { }% \def\@{@}% % how to handle braces? \def\_{\normalunderscore}% % % Non-English letters. \def\AA{AA}% \def\AE{AE}% \def\L{L}% \def\OE{OE}% \def\O{O}% \def\aa{aa}% \def\ae{ae}% \def\l{l}% \def\oe{oe}% \def\o{o}% \def\ss{ss}% \def\exclamdown{!}% \def\questiondown{?}% \def\ordf{a}% \def\ordm{o}% % \def\LaTeX{LaTeX}% \def\TeX{TeX}% % % Assorted special characters. % (The following {} will end up in the sort string, but that's ok.) \def\bullet{bullet}% \def\comma{,}% \def\copyright{copyright}% \def\registeredsymbol{R}% \def\dots{...}% \def\enddots{...}% \def\equiv{==}% \def\error{error}% \def\euro{euro}% \def\expansion{==>}% \def\minus{-}% \def\pounds{pounds}% \def\point{.}% \def\print{-|}% \def\result{=>}% % % We need to get rid of all macros, leaving only the arguments (if present). % Of course this is not nearly correct, but it is the best we can do for now. % makeinfo does not expand macros in the argument to @deffn, which ends up % writing an index entry, and texindex isn't prepared for an index sort entry % that starts with \. % % Since macro invocations are followed by braces, we can just redefine them % to take a single TeX argument. The case of a macro invocation that % goes to end-of-line is not handled. % \macrolist } \let\indexbackslash=0 %overridden during \printindex. \let\SETmarginindex=\relax % put index entries in margin (undocumented)? % Most index entries go through here, but \dosubind is the general case. % #1 is the index name, #2 is the entry text. \def\doind#1#2{\dosubind{#1}{#2}{}} % Workhorse for all \fooindexes. % #1 is name of index, #2 is stuff to put there, #3 is subentry -- % empty if called from \doind, as we usually are (the main exception % is with most defuns, which call us directly). % \def\dosubind#1#2#3{% \iflinks {% % Store the main index entry text (including the third arg). \toks0 = {#2}% % If third arg is present, precede it with a space. \def\thirdarg{#3}% \ifx\thirdarg\empty \else \toks0 = \expandafter{\the\toks0 \space #3}% \fi % \edef\writeto{\csname#1indfile\endcsname}% % \ifvmode \dosubindsanitize \else \dosubindwrite \fi }% \fi } % Write the entry in \toks0 to the index file: % \def\dosubindwrite{% % Put the index entry in the margin if desired. \ifx\SETmarginindex\relax\else \insert\margin{\hbox{\vrule height8pt depth3pt width0pt \the\toks0}}% \fi % % Remember, we are within a group. \indexdummies % Must do this here, since \bf, etc expand at this stage \def\backslashcurfont{\indexbackslash}% \indexbackslash isn't defined now % so it will be output as is; and it will print as backslash. % % Process the index entry with all font commands turned off, to % get the string to sort by. {\indexnofonts \edef\temp{\the\toks0}% need full expansion \xdef\indexsorttmp{\temp}% }% % % Set up the complete index entry, with both the sort key and % the original text, including any font commands. We write % three arguments to \entry to the .?? file (four in the % subentry case), texindex reduces to two when writing the .??s % sorted result. \edef\temp{% \write\writeto{% \string\entry{\indexsorttmp}{\noexpand\folio}{\the\toks0}}% }% \temp } % Take care of unwanted page breaks: % % If a skip is the last thing on the list now, preserve it % by backing up by \lastskip, doing the \write, then inserting % the skip again. Otherwise, the whatsit generated by the % \write will make \lastskip zero. The result is that sequences % like this: % @end defun % @tindex whatever % @defun ... % will have extra space inserted, because the \medbreak in the % start of the @defun won't see the skip inserted by the @end of % the previous defun. % % But don't do any of this if we're not in vertical mode. We % don't want to do a \vskip and prematurely end a paragraph. % % Avoid page breaks due to these extra skips, too. % % But wait, there is a catch there: % We'll have to check whether \lastskip is zero skip. \ifdim is not % sufficient for this purpose, as it ignores stretch and shrink parts % of the skip. The only way seems to be to check the textual % representation of the skip. % % The following is almost like \def\zeroskipmacro{0.0pt} except that % the ``p'' and ``t'' characters have catcode \other, not 11 (letter). % \edef\zeroskipmacro{\expandafter\the\csname z@skip\endcsname} % % ..., ready, GO: % \def\dosubindsanitize{% % \lastskip and \lastpenalty cannot both be nonzero simultaneously. \skip0 = \lastskip \edef\lastskipmacro{\the\lastskip}% \count255 = \lastpenalty % % If \lastskip is nonzero, that means the last item was a % skip. And since a skip is discardable, that means this % -\skip0 glue we're inserting is preceded by a % non-discardable item, therefore it is not a potential % breakpoint, therefore no \nobreak needed. \ifx\lastskipmacro\zeroskipmacro \else \vskip-\skip0 \fi % \dosubindwrite % \ifx\lastskipmacro\zeroskipmacro % If \lastskip was zero, perhaps the last item was a penalty, and % perhaps it was >=10000, e.g., a \nobreak. In that case, we want % to re-insert the same penalty (values >10000 are used for various % signals); since we just inserted a non-discardable item, any % following glue (such as a \parskip) would be a breakpoint. For example: % % @deffn deffn-whatever % @vindex index-whatever % Description. % would allow a break between the index-whatever whatsit % and the "Description." paragraph. \ifnum\count255>9999 \penalty\count255 \fi \else % On the other hand, if we had a nonzero \lastskip, % this make-up glue would be preceded by a non-discardable item % (the whatsit from the \write), so we must insert a \nobreak. \nobreak\vskip\skip0 \fi } % The index entry written in the file actually looks like % \entry {sortstring}{page}{topic} % or % \entry {sortstring}{page}{topic}{subtopic} % The texindex program reads in these files and writes files % containing these kinds of lines: % \initial {c} % before the first topic whose initial is c % \entry {topic}{pagelist} % for a topic that is used without subtopics % \primary {topic} % for the beginning of a topic that is used with subtopics % \secondary {subtopic}{pagelist} % for each subtopic. % Define the user-accessible indexing commands % @findex, @vindex, @kindex, @cindex. \def\findex {\fnindex} \def\kindex {\kyindex} \def\cindex {\cpindex} \def\vindex {\vrindex} \def\tindex {\tpindex} \def\pindex {\pgindex} \def\cindexsub {\begingroup\obeylines\cindexsub} {\obeylines % \gdef\cindexsub "#1" #2^^M{\endgroup % \dosubind{cp}{#2}{#1}}} % Define the macros used in formatting output of the sorted index material. % @printindex causes a particular index (the ??s file) to get printed. % It does not print any chapter heading (usually an @unnumbered). % \parseargdef\printindex{\begingroup \dobreak \chapheadingskip{10000}% % \smallfonts \rm \tolerance = 9500 \everypar = {}% don't want the \kern\-parindent from indentation suppression. % % See if the index file exists and is nonempty. % Change catcode of @ here so that if the index file contains % \initial {@} % as its first line, TeX doesn't complain about mismatched braces % (because it thinks @} is a control sequence). \catcode`\@ = 11 \openin 1 \jobname.#1s \ifeof 1 % \enddoublecolumns gets confused if there is no text in the index, % and it loses the chapter title and the aux file entries for the % index. The easiest way to prevent this problem is to make sure % there is some text. \putwordIndexNonexistent \else % % If the index file exists but is empty, then \openin leaves \ifeof % false. We have to make TeX try to read something from the file, so % it can discover if there is anything in it. \read 1 to \temp \ifeof 1 \putwordIndexIsEmpty \else % Index files are almost Texinfo source, but we use \ as the escape % character. It would be better to use @, but that's too big a change % to make right now. \def\indexbackslash{\backslashcurfont}% \catcode`\\ = 0 \escapechar = `\\ \begindoublecolumns \input \jobname.#1s \enddoublecolumns \fi \fi \closein 1 \endgroup} % These macros are used by the sorted index file itself. % Change them to control the appearance of the index. \def\initial#1{{% % Some minor font changes for the special characters. \let\tentt=\sectt \let\tt=\sectt \let\sf=\sectt % % Remove any glue we may have, we'll be inserting our own. \removelastskip % % We like breaks before the index initials, so insert a bonus. \nobreak \vskip 0pt plus 3\baselineskip \penalty 0 \vskip 0pt plus -3\baselineskip % % Typeset the initial. Making this add up to a whole number of % baselineskips increases the chance of the dots lining up from column % to column. It still won't often be perfect, because of the stretch % we need before each entry, but it's better. % % No shrink because it confuses \balancecolumns. \vskip 1.67\baselineskip plus .5\baselineskip \leftline{\secbf #1}% % Do our best not to break after the initial. \nobreak \vskip .33\baselineskip plus .1\baselineskip }} % \entry typesets a paragraph consisting of the text (#1), dot leaders, and % then page number (#2) flushed to the right margin. It is used for index % and table of contents entries. The paragraph is indented by \leftskip. % % A straightforward implementation would start like this: % \def\entry#1#2{... % But this frozes the catcodes in the argument, and can cause problems to % @code, which sets - active. This problem was fixed by a kludge--- % ``-'' was active throughout whole index, but this isn't really right. % % The right solution is to prevent \entry from swallowing the whole text. % --kasal, 21nov03 \def\entry{% \begingroup % % Start a new paragraph if necessary, so our assignments below can't % affect previous text. \par % % Do not fill out the last line with white space. \parfillskip = 0in % % No extra space above this paragraph. \parskip = 0in % % Do not prefer a separate line ending with a hyphen to fewer lines. \finalhyphendemerits = 0 % % \hangindent is only relevant when the entry text and page number % don't both fit on one line. In that case, bob suggests starting the % dots pretty far over on the line. Unfortunately, a large % indentation looks wrong when the entry text itself is broken across % lines. So we use a small indentation and put up with long leaders. % % \hangafter is reset to 1 (which is the value we want) at the start % of each paragraph, so we need not do anything with that. \hangindent = 2em % % When the entry text needs to be broken, just fill out the first line % with blank space. \rightskip = 0pt plus1fil % % A bit of stretch before each entry for the benefit of balancing % columns. \vskip 0pt plus1pt % % Swallow the left brace of the text (first parameter): \afterassignment\doentry \let\temp = } \def\doentry{% \bgroup % Instead of the swallowed brace. \noindent \aftergroup\finishentry % And now comes the text of the entry. } \def\finishentry#1{% % #1 is the page number. % % The following is kludged to not output a line of dots in the index if % there are no page numbers. The next person who breaks this will be % cursed by a Unix daemon. \def\tempa{{\rm }}% \def\tempb{#1}% \edef\tempc{\tempa}% \edef\tempd{\tempb}% \ifx\tempc\tempd \ % \else % % If we must, put the page number on a line of its own, and fill out % this line with blank space. (The \hfil is overwhelmed with the % fill leaders glue in \indexdotfill if the page number does fit.) \hfil\penalty50 \null\nobreak\indexdotfill % Have leaders before the page number. % % The `\ ' here is removed by the implicit \unskip that TeX does as % part of (the primitive) \par. Without it, a spurious underfull % \hbox ensues. \ifpdf \pdfgettoks#1.% \ \the\toksA \else \ #1% \fi \fi \par \endgroup } % Like \dotfill except takes at least 1 em. \def\indexdotfill{\cleaders \hbox{$\mathsurround=0pt \mkern1.5mu ${\it .}$ \mkern1.5mu$}\hskip 1em plus 1fill} \def\primary #1{\line{#1\hfil}} \newskip\secondaryindent \secondaryindent=0.5cm \def\secondary#1#2{{% \parfillskip=0in \parskip=0in \hangindent=1in \hangafter=1 \noindent\hskip\secondaryindent\hbox{#1}\indexdotfill \ifpdf \pdfgettoks#2.\ \the\toksA % The page number ends the paragraph. \else #2 \fi \par }} % Define two-column mode, which we use to typeset indexes. % Adapted from the TeXbook, page 416, which is to say, % the manmac.tex format used to print the TeXbook itself. \catcode`\@=11 \newbox\partialpage \newdimen\doublecolumnhsize \def\begindoublecolumns{\begingroup % ended by \enddoublecolumns % Grab any single-column material above us. \output = {% % % Here is a possibility not foreseen in manmac: if we accumulate a % whole lot of material, we might end up calling this \output % routine twice in a row (see the doublecol-lose test, which is % essentially a couple of indexes with @setchapternewpage off). In % that case we just ship out what is in \partialpage with the normal % output routine. Generally, \partialpage will be empty when this % runs and this will be a no-op. See the indexspread.tex test case. \ifvoid\partialpage \else \onepageout{\pagecontents\partialpage}% \fi % \global\setbox\partialpage = \vbox{% % Unvbox the main output page. \unvbox\PAGE \kern-\topskip \kern\baselineskip }% }% \eject % run that output routine to set \partialpage % % Use the double-column output routine for subsequent pages. \output = {\doublecolumnout}% % % Change the page size parameters. We could do this once outside this % routine, in each of @smallbook, @afourpaper, and the default 8.5x11 % format, but then we repeat the same computation. Repeating a couple % of assignments once per index is clearly meaningless for the % execution time, so we may as well do it in one place. % % First we halve the line length, less a little for the gutter between % the columns. We compute the gutter based on the line length, so it % changes automatically with the paper format. The magic constant % below is chosen so that the gutter has the same value (well, +-<1pt) % as it did when we hard-coded it. % % We put the result in a separate register, \doublecolumhsize, so we % can restore it in \pagesofar, after \hsize itself has (potentially) % been clobbered. % \doublecolumnhsize = \hsize \advance\doublecolumnhsize by -.04154\hsize \divide\doublecolumnhsize by 2 \hsize = \doublecolumnhsize % % Double the \vsize as well. (We don't need a separate register here, % since nobody clobbers \vsize.) \vsize = 2\vsize } % The double-column output routine for all double-column pages except % the last. % \def\doublecolumnout{% \splittopskip=\topskip \splitmaxdepth=\maxdepth % Get the available space for the double columns -- the normal % (undoubled) page height minus any material left over from the % previous page. \dimen@ = \vsize \divide\dimen@ by 2 \advance\dimen@ by -\ht\partialpage % % box0 will be the left-hand column, box2 the right. \setbox0=\vsplit255 to\dimen@ \setbox2=\vsplit255 to\dimen@ \onepageout\pagesofar \unvbox255 \penalty\outputpenalty } % % Re-output the contents of the output page -- any previous material, % followed by the two boxes we just split, in box0 and box2. \def\pagesofar{% \unvbox\partialpage % \hsize = \doublecolumnhsize \wd0=\hsize \wd2=\hsize \hbox to\pagewidth{\box0\hfil\box2}% } % % All done with double columns. \def\enddoublecolumns{% \output = {% % Split the last of the double-column material. Leave it on the % current page, no automatic page break. \balancecolumns % % If we end up splitting too much material for the current page, % though, there will be another page break right after this \output % invocation ends. Having called \balancecolumns once, we do not % want to call it again. Therefore, reset \output to its normal % definition right away. (We hope \balancecolumns will never be % called on to balance too much material, but if it is, this makes % the output somewhat more palatable.) \global\output = {\onepageout{\pagecontents\PAGE}}% }% \eject \endgroup % started in \begindoublecolumns % % \pagegoal was set to the doubled \vsize above, since we restarted % the current page. We're now back to normal single-column % typesetting, so reset \pagegoal to the normal \vsize (after the % \endgroup where \vsize got restored). \pagegoal = \vsize } % % Called at the end of the double column material. \def\balancecolumns{% \setbox0 = \vbox{\unvbox255}% like \box255 but more efficient, see p.120. \dimen@ = \ht0 \advance\dimen@ by \topskip \advance\dimen@ by-\baselineskip \divide\dimen@ by 2 % target to split to %debug\message{final 2-column material height=\the\ht0, target=\the\dimen@.}% \splittopskip = \topskip % Loop until we get a decent breakpoint. {% \vbadness = 10000 \loop \global\setbox3 = \copy0 \global\setbox1 = \vsplit3 to \dimen@ \ifdim\ht3>\dimen@ \global\advance\dimen@ by 1pt \repeat }% %debug\message{split to \the\dimen@, column heights: \the\ht1, \the\ht3.}% \setbox0=\vbox to\dimen@{\unvbox1}% \setbox2=\vbox to\dimen@{\unvbox3}% % \pagesofar } \catcode`\@ = \other \message{sectioning,} % Chapters, sections, etc. % \unnumberedno is an oxymoron, of course. But we count the unnumbered % sections so that we can refer to them unambiguously in the pdf % outlines by their "section number". We avoid collisions with chapter % numbers by starting them at 10000. (If a document ever has 10000 % chapters, we're in trouble anyway, I'm sure.) \newcount\unnumberedno \unnumberedno = 10000 \newcount\chapno \newcount\secno \secno=0 \newcount\subsecno \subsecno=0 \newcount\subsubsecno \subsubsecno=0 % This counter is funny since it counts through charcodes of letters A, B, ... \newcount\appendixno \appendixno = `\@ % % \def\appendixletter{\char\the\appendixno} % We do the following ugly conditional instead of the above simple % construct for the sake of pdftex, which needs the actual % letter in the expansion, not just typeset. % \def\appendixletter{% \ifnum\appendixno=`A A% \else\ifnum\appendixno=`B B% \else\ifnum\appendixno=`C C% \else\ifnum\appendixno=`D D% \else\ifnum\appendixno=`E E% \else\ifnum\appendixno=`F F% \else\ifnum\appendixno=`G G% \else\ifnum\appendixno=`H H% \else\ifnum\appendixno=`I I% \else\ifnum\appendixno=`J J% \else\ifnum\appendixno=`K K% \else\ifnum\appendixno=`L L% \else\ifnum\appendixno=`M M% \else\ifnum\appendixno=`N N% \else\ifnum\appendixno=`O O% \else\ifnum\appendixno=`P P% \else\ifnum\appendixno=`Q Q% \else\ifnum\appendixno=`R R% \else\ifnum\appendixno=`S S% \else\ifnum\appendixno=`T T% \else\ifnum\appendixno=`U U% \else\ifnum\appendixno=`V V% \else\ifnum\appendixno=`W W% \else\ifnum\appendixno=`X X% \else\ifnum\appendixno=`Y Y% \else\ifnum\appendixno=`Z Z% % The \the is necessary, despite appearances, because \appendixletter is % expanded while writing the .toc file. \char\appendixno is not % expandable, thus it is written literally, thus all appendixes come out % with the same letter (or @) in the toc without it. \else\char\the\appendixno \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi} % Each @chapter defines this as the name of the chapter. % page headings and footings can use it. @section does likewise. % However, they are not reliable, because we don't use marks. \def\thischapter{} \def\thissection{} \newcount\absseclevel % used to calculate proper heading level \newcount\secbase\secbase=0 % @raisesections/@lowersections modify this count % @raisesections: treat @section as chapter, @subsection as section, etc. \def\raisesections{\global\advance\secbase by -1} \let\up=\raisesections % original BFox name % @lowersections: treat @chapter as section, @section as subsection, etc. \def\lowersections{\global\advance\secbase by 1} \let\down=\lowersections % original BFox name % we only have subsub. \chardef\maxseclevel = 3 % % A numbered section within an unnumbered changes to unnumbered too. % To achive this, remember the "biggest" unnum. sec. we are currently in: \chardef\unmlevel = \maxseclevel % % Trace whether the current chapter is an appendix or not: % \chapheadtype is "N" or "A", unnumbered chapters are ignored. \def\chapheadtype{N} % Choose a heading macro % #1 is heading type % #2 is heading level % #3 is text for heading \def\genhead#1#2#3{% % Compute the abs. sec. level: \absseclevel=#2 \advance\absseclevel by \secbase % Make sure \absseclevel doesn't fall outside the range: \ifnum \absseclevel < 0 \absseclevel = 0 \else \ifnum \absseclevel > 3 \absseclevel = 3 \fi \fi % The heading type: \def\headtype{#1}% \if \headtype U% \ifnum \absseclevel < \unmlevel \chardef\unmlevel = \absseclevel \fi \else % Check for appendix sections: \ifnum \absseclevel = 0 \edef\chapheadtype{\headtype}% \else \if \headtype A\if \chapheadtype N% \errmessage{@appendix... within a non-appendix chapter}% \fi\fi \fi % Check for numbered within unnumbered: \ifnum \absseclevel > \unmlevel \def\headtype{U}% \else \chardef\unmlevel = 3 \fi \fi % Now print the heading: \if \headtype U% \ifcase\absseclevel \unnumberedzzz{#3}% \or \unnumberedseczzz{#3}% \or \unnumberedsubseczzz{#3}% \or \unnumberedsubsubseczzz{#3}% \fi \else \if \headtype A% \ifcase\absseclevel \appendixzzz{#3}% \or \appendixsectionzzz{#3}% \or \appendixsubseczzz{#3}% \or \appendixsubsubseczzz{#3}% \fi \else \ifcase\absseclevel \chapterzzz{#3}% \or \seczzz{#3}% \or \numberedsubseczzz{#3}% \or \numberedsubsubseczzz{#3}% \fi \fi \fi \suppressfirstparagraphindent } % an interface: \def\numhead{\genhead N} \def\apphead{\genhead A} \def\unnmhead{\genhead U} % @chapter, @appendix, @unnumbered. Increment top-level counter, reset % all lower-level sectioning counters to zero. % % Also set \chaplevelprefix, which we prepend to @float sequence numbers % (e.g., figures), q.v. By default (before any chapter), that is empty. \let\chaplevelprefix = \empty % \outer\parseargdef\chapter{\numhead0{#1}} % normally numhead0 calls chapterzzz \def\chapterzzz#1{% % section resetting is \global in case the chapter is in a group, such % as an @include file. \global\secno=0 \global\subsecno=0 \global\subsubsecno=0 \global\advance\chapno by 1 % % Used for \float. \gdef\chaplevelprefix{\the\chapno.}% \resetallfloatnos % \message{\putwordChapter\space \the\chapno}% % % Write the actual heading. \chapmacro{#1}{Ynumbered}{\the\chapno}% % % So @section and the like are numbered underneath this chapter. \global\let\section = \numberedsec \global\let\subsection = \numberedsubsec \global\let\subsubsection = \numberedsubsubsec } \outer\parseargdef\appendix{\apphead0{#1}} % normally apphead0 calls appendixzzz \def\appendixzzz#1{% \global\secno=0 \global\subsecno=0 \global\subsubsecno=0 \global\advance\appendixno by 1 \gdef\chaplevelprefix{\appendixletter.}% \resetallfloatnos % \def\appendixnum{\putwordAppendix\space \appendixletter}% \message{\appendixnum}% % \chapmacro{#1}{Yappendix}{\appendixletter}% % \global\let\section = \appendixsec \global\let\subsection = \appendixsubsec \global\let\subsubsection = \appendixsubsubsec } \outer\parseargdef\unnumbered{\unnmhead0{#1}} % normally unnmhead0 calls unnumberedzzz \def\unnumberedzzz#1{% \global\secno=0 \global\subsecno=0 \global\subsubsecno=0 \global\advance\unnumberedno by 1 % % Since an unnumbered has no number, no prefix for figures. \global\let\chaplevelprefix = \empty \resetallfloatnos % % This used to be simply \message{#1}, but TeX fully expands the % argument to \message. Therefore, if #1 contained @-commands, TeX % expanded them. For example, in `@unnumbered The @cite{Book}', TeX % expanded @cite (which turns out to cause errors because \cite is meant % to be executed, not expanded). % % Anyway, we don't want the fully-expanded definition of @cite to appear % as a result of the \message, we just want `@cite' itself. We use % \the to achieve this: TeX expands \the only once, % simply yielding the contents of . (We also do this for % the toc entries.) \toks0 = {#1}% \message{(\the\toks0)}% % \chapmacro{#1}{Ynothing}{\the\unnumberedno}% % \global\let\section = \unnumberedsec \global\let\subsection = \unnumberedsubsec \global\let\subsubsection = \unnumberedsubsubsec } % @centerchap is like @unnumbered, but the heading is centered. \outer\parseargdef\centerchap{% % Well, we could do the following in a group, but that would break % an assumption that \chapmacro is called at the outermost level. % Thus we are safer this way: --kasal, 24feb04 \let\centerparametersmaybe = \centerparameters \unnmhead0{#1}% \let\centerparametersmaybe = \relax } % @top is like @unnumbered. \let\top\unnumbered % Sections. \outer\parseargdef\numberedsec{\numhead1{#1}} % normally calls seczzz \def\seczzz#1{% \global\subsecno=0 \global\subsubsecno=0 \global\advance\secno by 1 \sectionheading{#1}{sec}{Ynumbered}{\the\chapno.\the\secno}% } \outer\parseargdef\appendixsection{\apphead1{#1}} % normally calls appendixsectionzzz \def\appendixsectionzzz#1{% \global\subsecno=0 \global\subsubsecno=0 \global\advance\secno by 1 \sectionheading{#1}{sec}{Yappendix}{\appendixletter.\the\secno}% } \let\appendixsec\appendixsection \outer\parseargdef\unnumberedsec{\unnmhead1{#1}} % normally calls unnumberedseczzz \def\unnumberedseczzz#1{% \global\subsecno=0 \global\subsubsecno=0 \global\advance\secno by 1 \sectionheading{#1}{sec}{Ynothing}{\the\unnumberedno.\the\secno}% } % Subsections. \outer\parseargdef\numberedsubsec{\numhead2{#1}} % normally calls numberedsubseczzz \def\numberedsubseczzz#1{% \global\subsubsecno=0 \global\advance\subsecno by 1 \sectionheading{#1}{subsec}{Ynumbered}{\the\chapno.\the\secno.\the\subsecno}% } \outer\parseargdef\appendixsubsec{\apphead2{#1}} % normally calls appendixsubseczzz \def\appendixsubseczzz#1{% \global\subsubsecno=0 \global\advance\subsecno by 1 \sectionheading{#1}{subsec}{Yappendix}% {\appendixletter.\the\secno.\the\subsecno}% } \outer\parseargdef\unnumberedsubsec{\unnmhead2{#1}} %normally calls unnumberedsubseczzz \def\unnumberedsubseczzz#1{% \global\subsubsecno=0 \global\advance\subsecno by 1 \sectionheading{#1}{subsec}{Ynothing}% {\the\unnumberedno.\the\secno.\the\subsecno}% } % Subsubsections. \outer\parseargdef\numberedsubsubsec{\numhead3{#1}} % normally numberedsubsubseczzz \def\numberedsubsubseczzz#1{% \global\advance\subsubsecno by 1 \sectionheading{#1}{subsubsec}{Ynumbered}% {\the\chapno.\the\secno.\the\subsecno.\the\subsubsecno}% } \outer\parseargdef\appendixsubsubsec{\apphead3{#1}} % normally appendixsubsubseczzz \def\appendixsubsubseczzz#1{% \global\advance\subsubsecno by 1 \sectionheading{#1}{subsubsec}{Yappendix}% {\appendixletter.\the\secno.\the\subsecno.\the\subsubsecno}% } \outer\parseargdef\unnumberedsubsubsec{\unnmhead3{#1}} %normally unnumberedsubsubseczzz \def\unnumberedsubsubseczzz#1{% \global\advance\subsubsecno by 1 \sectionheading{#1}{subsubsec}{Ynothing}% {\the\unnumberedno.\the\secno.\the\subsecno.\the\subsubsecno}% } % These macros control what the section commands do, according % to what kind of chapter we are in (ordinary, appendix, or unnumbered). % Define them by default for a numbered chapter. \let\section = \numberedsec \let\subsection = \numberedsubsec \let\subsubsection = \numberedsubsubsec % Define @majorheading, @heading and @subheading % NOTE on use of \vbox for chapter headings, section headings, and such: % 1) We use \vbox rather than the earlier \line to permit % overlong headings to fold. % 2) \hyphenpenalty is set to 10000 because hyphenation in a % heading is obnoxious; this forbids it. % 3) Likewise, headings look best if no \parindent is used, and % if justification is not attempted. Hence \raggedright. \def\majorheading{% {\advance\chapheadingskip by 10pt \chapbreak }% \parsearg\chapheadingzzz } \def\chapheading{\chapbreak \parsearg\chapheadingzzz} \def\chapheadingzzz#1{% {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000 \parindent=0pt\raggedright \rm #1\hfill}}% \bigskip \par\penalty 200\relax \suppressfirstparagraphindent } % @heading, @subheading, @subsubheading. \parseargdef\heading{\sectionheading{#1}{sec}{Yomitfromtoc}{} \suppressfirstparagraphindent} \parseargdef\subheading{\sectionheading{#1}{subsec}{Yomitfromtoc}{} \suppressfirstparagraphindent} \parseargdef\subsubheading{\sectionheading{#1}{subsubsec}{Yomitfromtoc}{} \suppressfirstparagraphindent} % These macros generate a chapter, section, etc. heading only % (including whitespace, linebreaking, etc. around it), % given all the information in convenient, parsed form. %%% Args are the skip and penalty (usually negative) \def\dobreak#1#2{\par\ifdim\lastskip<#1\removelastskip\penalty#2\vskip#1\fi} %%% Define plain chapter starts, and page on/off switching for it % Parameter controlling skip before chapter headings (if needed) \newskip\chapheadingskip \def\chapbreak{\dobreak \chapheadingskip {-4000}} \def\chappager{\par\vfill\supereject} \def\chapoddpage{\chappager \ifodd\pageno \else \hbox to 0pt{} \chappager\fi} \def\setchapternewpage #1 {\csname CHAPPAG#1\endcsname} \def\CHAPPAGoff{% \global\let\contentsalignmacro = \chappager \global\let\pchapsepmacro=\chapbreak \global\let\pagealignmacro=\chappager} \def\CHAPPAGon{% \global\let\contentsalignmacro = \chappager \global\let\pchapsepmacro=\chappager \global\let\pagealignmacro=\chappager \global\def\HEADINGSon{\HEADINGSsingle}} \def\CHAPPAGodd{% \global\let\contentsalignmacro = \chapoddpage \global\let\pchapsepmacro=\chapoddpage \global\let\pagealignmacro=\chapoddpage \global\def\HEADINGSon{\HEADINGSdouble}} \CHAPPAGon % Chapter opening. % % #1 is the text, #2 is the section type (Ynumbered, Ynothing, % Yappendix, Yomitfromtoc), #3 the chapter number. % % To test against our argument. \def\Ynothingkeyword{Ynothing} \def\Yomitfromtockeyword{Yomitfromtoc} \def\Yappendixkeyword{Yappendix} % \def\chapmacro#1#2#3{% \pchapsepmacro {% \chapfonts \rm % % Have to define \thissection before calling \donoderef, because the % xref code eventually uses it. On the other hand, it has to be called % after \pchapsepmacro, or the headline will change too soon. \gdef\thissection{#1}% \gdef\thischaptername{#1}% % % Only insert the separating space if we have a chapter/appendix % number, and don't print the unnumbered ``number''. \def\temptype{#2}% \ifx\temptype\Ynothingkeyword \setbox0 = \hbox{}% \def\toctype{unnchap}% \gdef\thischapter{#1}% \else\ifx\temptype\Yomitfromtockeyword \setbox0 = \hbox{}% contents like unnumbered, but no toc entry \def\toctype{omit}% \gdef\thischapter{}% \else\ifx\temptype\Yappendixkeyword \setbox0 = \hbox{\putwordAppendix{} #3\enspace}% \def\toctype{app}% % We don't substitute the actual chapter name into \thischapter % because we don't want its macros evaluated now. And we don't % use \thissection because that changes with each section. % \xdef\thischapter{\putwordAppendix{} \appendixletter: \noexpand\thischaptername}% \else \setbox0 = \hbox{#3\enspace}% \def\toctype{numchap}% \xdef\thischapter{\putwordChapter{} \the\chapno: \noexpand\thischaptername}% \fi\fi\fi % % Write the toc entry for this chapter. Must come before the % \donoderef, because we include the current node name in the toc % entry, and \donoderef resets it to empty. \writetocentry{\toctype}{#1}{#3}% % % For pdftex, we have to write out the node definition (aka, make % the pdfdest) after any page break, but before the actual text has % been typeset. If the destination for the pdf outline is after the % text, then jumping from the outline may wind up with the text not % being visible, for instance under high magnification. \donoderef{#2}% % % Typeset the actual heading. \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \raggedright \hangindent=\wd0 \centerparametersmaybe \unhbox0 #1\par}% }% \nobreak\bigskip % no page break after a chapter title \nobreak } % @centerchap -- centered and unnumbered. \let\centerparametersmaybe = \relax \def\centerparameters{% \advance\rightskip by 3\rightskip \leftskip = \rightskip \parfillskip = 0pt } % I don't think this chapter style is supported any more, so I'm not % updating it with the new noderef stuff. We'll see. --karl, 11aug03. % \def\setchapterstyle #1 {\csname CHAPF#1\endcsname} % \def\unnchfopen #1{% \chapoddpage {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000 \parindent=0pt\raggedright \rm #1\hfill}}\bigskip \par\nobreak } \def\chfopen #1#2{\chapoddpage {\chapfonts \vbox to 3in{\vfil \hbox to\hsize{\hfil #2} \hbox to\hsize{\hfil #1} \vfil}}% \par\penalty 5000 % } \def\centerchfopen #1{% \chapoddpage {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000 \parindent=0pt \hfill {\rm #1}\hfill}}\bigskip \par\nobreak } \def\CHAPFopen{% \global\let\chapmacro=\chfopen \global\let\centerchapmacro=\centerchfopen} % Section titles. These macros combine the section number parts and % call the generic \sectionheading to do the printing. % \newskip\secheadingskip \def\secheadingbreak{\dobreak \secheadingskip{-1000}} % Subsection titles. \newskip\subsecheadingskip \def\subsecheadingbreak{\dobreak \subsecheadingskip{-500}} % Subsubsection titles. \def\subsubsecheadingskip{\subsecheadingskip} \def\subsubsecheadingbreak{\subsecheadingbreak} % Print any size, any type, section title. % % #1 is the text, #2 is the section level (sec/subsec/subsubsec), #3 is % the section type for xrefs (Ynumbered, Ynothing, Yappendix), #4 is the % section number. % \def\sectionheading#1#2#3#4{% {% % Switch to the right set of fonts. \csname #2fonts\endcsname \rm % % Insert space above the heading. \csname #2headingbreak\endcsname % % Only insert the space after the number if we have a section number. \def\sectionlevel{#2}% \def\temptype{#3}% % \ifx\temptype\Ynothingkeyword \setbox0 = \hbox{}% \def\toctype{unn}% \gdef\thissection{#1}% \else\ifx\temptype\Yomitfromtockeyword % for @headings -- no section number, don't include in toc, % and don't redefine \thissection. \setbox0 = \hbox{}% \def\toctype{omit}% \let\sectionlevel=\empty \else\ifx\temptype\Yappendixkeyword \setbox0 = \hbox{#4\enspace}% \def\toctype{app}% \gdef\thissection{#1}% \else \setbox0 = \hbox{#4\enspace}% \def\toctype{num}% \gdef\thissection{#1}% \fi\fi\fi % % Write the toc entry (before \donoderef). See comments in \chfplain. \writetocentry{\toctype\sectionlevel}{#1}{#4}% % % Write the node reference (= pdf destination for pdftex). % Again, see comments in \chfplain. \donoderef{#3}% % % Output the actual section heading. \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \raggedright \hangindent=\wd0 % zero if no section number \unhbox0 #1}% }% % Add extra space after the heading -- half of whatever came above it. % Don't allow stretch, though. \kern .5 \csname #2headingskip\endcsname % % Do not let the kern be a potential breakpoint, as it would be if it % was followed by glue. \nobreak % % We'll almost certainly start a paragraph next, so don't let that % glue accumulate. (Not a breakpoint because it's preceded by a % discardable item.) \vskip-\parskip % % This is purely so the last item on the list is a known \penalty > % 10000. This is so \startdefun can avoid allowing breakpoints after % section headings. Otherwise, it would insert a valid breakpoint between: % % @section sec-whatever % @deffn def-whatever \penalty 10001 } \message{toc,} % Table of contents. \newwrite\tocfile % Write an entry to the toc file, opening it if necessary. % Called from @chapter, etc. % % Example usage: \writetocentry{sec}{Section Name}{\the\chapno.\the\secno} % We append the current node name (if any) and page number as additional % arguments for the \{chap,sec,...}entry macros which will eventually % read this. The node name is used in the pdf outlines as the % destination to jump to. % % We open the .toc file for writing here instead of at @setfilename (or % any other fixed time) so that @contents can be anywhere in the document. % But if #1 is `omit', then we don't do anything. This is used for the % table of contents chapter openings themselves. % \newif\iftocfileopened \def\omitkeyword{omit}% % \def\writetocentry#1#2#3{% \edef\writetoctype{#1}% \ifx\writetoctype\omitkeyword \else \iftocfileopened\else \immediate\openout\tocfile = \jobname.toc \global\tocfileopenedtrue \fi % \iflinks {\atdummies \edef\temp{% \write\tocfile{@#1entry{#2}{#3}{\lastnode}{\noexpand\folio}}}% \temp } \fi \fi % % Tell \shipout to create a pdf destination on each page, if we're % writing pdf. These are used in the table of contents. We can't % just write one on every page because the title pages are numbered % 1 and 2 (the page numbers aren't printed), and so are the first % two pages of the document. Thus, we'd have two destinations named % `1', and two named `2'. \ifpdf \global\pdfmakepagedesttrue \fi } % These characters do not print properly in the Computer Modern roman % fonts, so we must take special care. This is more or less redundant % with the Texinfo input format setup at the end of this file. % \def\activecatcodes{% \catcode`\"=\active \catcode`\$=\active \catcode`\<=\active \catcode`\>=\active \catcode`\\=\active \catcode`\^=\active \catcode`\_=\active \catcode`\|=\active \catcode`\~=\active } % Read the toc file, which is essentially Texinfo input. \def\readtocfile{% \setupdatafile \activecatcodes \input \jobname.toc } \newskip\contentsrightmargin \contentsrightmargin=1in \newcount\savepageno \newcount\lastnegativepageno \lastnegativepageno = -1 % Prepare to read what we've written to \tocfile. % \def\startcontents#1{% % If @setchapternewpage on, and @headings double, the contents should % start on an odd page, unlike chapters. Thus, we maintain % \contentsalignmacro in parallel with \pagealignmacro. % From: Torbjorn Granlund \contentsalignmacro \immediate\closeout\tocfile % % Don't need to put `Contents' or `Short Contents' in the headline. % It is abundantly clear what they are. \def\thischapter{}% \chapmacro{#1}{Yomitfromtoc}{}% % \savepageno = \pageno \begingroup % Set up to handle contents files properly. \raggedbottom % Worry more about breakpoints than the bottom. \advance\hsize by -\contentsrightmargin % Don't use the full line length. % % Roman numerals for page numbers. \ifnum \pageno>0 \global\pageno = \lastnegativepageno \fi } % Normal (long) toc. \def\contents{% \startcontents{\putwordTOC}% \openin 1 \jobname.toc \ifeof 1 \else \readtocfile \fi \vfill \eject \contentsalignmacro % in case @setchapternewpage odd is in effect \ifeof 1 \else \pdfmakeoutlines \fi \closein 1 \endgroup \lastnegativepageno = \pageno \global\pageno = \savepageno } % And just the chapters. \def\summarycontents{% \startcontents{\putwordShortTOC}% % \let\numchapentry = \shortchapentry \let\appentry = \shortchapentry \let\unnchapentry = \shortunnchapentry % We want a true roman here for the page numbers. \secfonts \let\rm=\shortcontrm \let\bf=\shortcontbf \let\sl=\shortcontsl \let\tt=\shortconttt \rm \hyphenpenalty = 10000 \advance\baselineskip by 1pt % Open it up a little. \def\numsecentry##1##2##3##4{} \let\appsecentry = \numsecentry \let\unnsecentry = \numsecentry \let\numsubsecentry = \numsecentry \let\appsubsecentry = \numsecentry \let\unnsubsecentry = \numsecentry \let\numsubsubsecentry = \numsecentry \let\appsubsubsecentry = \numsecentry \let\unnsubsubsecentry = \numsecentry \openin 1 \jobname.toc \ifeof 1 \else \readtocfile \fi \closein 1 \vfill \eject \contentsalignmacro % in case @setchapternewpage odd is in effect \endgroup \lastnegativepageno = \pageno \global\pageno = \savepageno } \let\shortcontents = \summarycontents % Typeset the label for a chapter or appendix for the short contents. % The arg is, e.g., `A' for an appendix, or `3' for a chapter. % \def\shortchaplabel#1{% % This space should be enough, since a single number is .5em, and the % widest letter (M) is 1em, at least in the Computer Modern fonts. % But use \hss just in case. % (This space doesn't include the extra space that gets added after % the label; that gets put in by \shortchapentry above.) % % We'd like to right-justify chapter numbers, but that looks strange % with appendix letters. And right-justifying numbers and % left-justifying letters looks strange when there is less than 10 % chapters. Have to read the whole toc once to know how many chapters % there are before deciding ... \hbox to 1em{#1\hss}% } % These macros generate individual entries in the table of contents. % The first argument is the chapter or section name. % The last argument is the page number. % The arguments in between are the chapter number, section number, ... % Chapters, in the main contents. \def\numchapentry#1#2#3#4{\dochapentry{#2\labelspace#1}{#4}} % % Chapters, in the short toc. % See comments in \dochapentry re vbox and related settings. \def\shortchapentry#1#2#3#4{% \tocentry{\shortchaplabel{#2}\labelspace #1}{\doshortpageno\bgroup#4\egroup}% } % Appendices, in the main contents. % Need the word Appendix, and a fixed-size box. % \def\appendixbox#1{% % We use M since it's probably the widest letter. \setbox0 = \hbox{\putwordAppendix{} M}% \hbox to \wd0{\putwordAppendix{} #1\hss}} % \def\appentry#1#2#3#4{\dochapentry{\appendixbox{#2}\labelspace#1}{#4}} % Unnumbered chapters. \def\unnchapentry#1#2#3#4{\dochapentry{#1}{#4}} \def\shortunnchapentry#1#2#3#4{\tocentry{#1}{\doshortpageno\bgroup#4\egroup}} % Sections. \def\numsecentry#1#2#3#4{\dosecentry{#2\labelspace#1}{#4}} \let\appsecentry=\numsecentry \def\unnsecentry#1#2#3#4{\dosecentry{#1}{#4}} % Subsections. \def\numsubsecentry#1#2#3#4{\dosubsecentry{#2\labelspace#1}{#4}} \let\appsubsecentry=\numsubsecentry \def\unnsubsecentry#1#2#3#4{\dosubsecentry{#1}{#4}} % And subsubsections. \def\numsubsubsecentry#1#2#3#4{\dosubsubsecentry{#2\labelspace#1}{#4}} \let\appsubsubsecentry=\numsubsubsecentry \def\unnsubsubsecentry#1#2#3#4{\dosubsubsecentry{#1}{#4}} % This parameter controls the indentation of the various levels. % Same as \defaultparindent. \newdimen\tocindent \tocindent = 15pt % Now for the actual typesetting. In all these, #1 is the text and #2 is the % page number. % % If the toc has to be broken over pages, we want it to be at chapters % if at all possible; hence the \penalty. \def\dochapentry#1#2{% \penalty-300 \vskip1\baselineskip plus.33\baselineskip minus.25\baselineskip \begingroup \chapentryfonts \tocentry{#1}{\dopageno\bgroup#2\egroup}% \endgroup \nobreak\vskip .25\baselineskip plus.1\baselineskip } \def\dosecentry#1#2{\begingroup \secentryfonts \leftskip=\tocindent \tocentry{#1}{\dopageno\bgroup#2\egroup}% \endgroup} \def\dosubsecentry#1#2{\begingroup \subsecentryfonts \leftskip=2\tocindent \tocentry{#1}{\dopageno\bgroup#2\egroup}% \endgroup} \def\dosubsubsecentry#1#2{\begingroup \subsubsecentryfonts \leftskip=3\tocindent \tocentry{#1}{\dopageno\bgroup#2\egroup}% \endgroup} % We use the same \entry macro as for the index entries. \let\tocentry = \entry % Space between chapter (or whatever) number and the title. \def\labelspace{\hskip1em \relax} \def\dopageno#1{{\rm #1}} \def\doshortpageno#1{{\rm #1}} \def\chapentryfonts{\secfonts \rm} \def\secentryfonts{\textfonts} \def\subsecentryfonts{\textfonts} \def\subsubsecentryfonts{\textfonts} \message{environments,} % @foo ... @end foo. % @point{}, @result{}, @expansion{}, @print{}, @equiv{}. % % Since these characters are used in examples, it should be an even number of % \tt widths. Each \tt character is 1en, so two makes it 1em. % \def\point{$\star$} \def\result{\leavevmode\raise.15ex\hbox to 1em{\hfil$\Rightarrow$\hfil}} \def\expansion{\leavevmode\raise.1ex\hbox to 1em{\hfil$\mapsto$\hfil}} \def\print{\leavevmode\lower.1ex\hbox to 1em{\hfil$\dashv$\hfil}} \def\equiv{\leavevmode\lower.1ex\hbox to 1em{\hfil$\ptexequiv$\hfil}} % The @error{} command. % Adapted from the TeXbook's \boxit. % \newbox\errorbox % {\tentt \global\dimen0 = 3em}% Width of the box. \dimen2 = .55pt % Thickness of rules % The text. (`r' is open on the right, `e' somewhat less so on the left.) \setbox0 = \hbox{\kern-.75pt \tensf error\kern-1.5pt} % \setbox\errorbox=\hbox to \dimen0{\hfil \hsize = \dimen0 \advance\hsize by -5.8pt % Space to left+right. \advance\hsize by -2\dimen2 % Rules. \vbox{% \hrule height\dimen2 \hbox{\vrule width\dimen2 \kern3pt % Space to left of text. \vtop{\kern2.4pt \box0 \kern2.4pt}% Space above/below. \kern3pt\vrule width\dimen2}% Space to right. \hrule height\dimen2} \hfil} % \def\error{\leavevmode\lower.7ex\copy\errorbox} % @tex ... @end tex escapes into raw Tex temporarily. % One exception: @ is still an escape character, so that @end tex works. % But \@ or @@ will get a plain tex @ character. \envdef\tex{% \catcode `\\=0 \catcode `\{=1 \catcode `\}=2 \catcode `\$=3 \catcode `\&=4 \catcode `\#=6 \catcode `\^=7 \catcode `\_=8 \catcode `\~=\active \let~=\tie \catcode `\%=14 \catcode `\+=\other \catcode `\"=\other \catcode `\|=\other \catcode `\<=\other \catcode `\>=\other \escapechar=`\\ % \let\b=\ptexb \let\bullet=\ptexbullet \let\c=\ptexc \let\,=\ptexcomma \let\.=\ptexdot \let\dots=\ptexdots \let\equiv=\ptexequiv \let\!=\ptexexclam \let\i=\ptexi \let\indent=\ptexindent \let\noindent=\ptexnoindent \let\{=\ptexlbrace \let\+=\tabalign \let\}=\ptexrbrace \let\/=\ptexslash \let\*=\ptexstar \let\t=\ptext \let\frenchspacing=\plainfrenchspacing % \def\endldots{\mathinner{\ldots\ldots\ldots\ldots}}% \def\enddots{\relax\ifmmode\endldots\else$\mathsurround=0pt \endldots\,$\fi}% \def\@{@}% } % There is no need to define \Etex. % Define @lisp ... @end lisp. % @lisp environment forms a group so it can rebind things, % including the definition of @end lisp (which normally is erroneous). % Amount to narrow the margins by for @lisp. \newskip\lispnarrowing \lispnarrowing=0.4in % This is the definition that ^^M gets inside @lisp, @example, and other % such environments. \null is better than a space, since it doesn't % have any width. \def\lisppar{\null\endgraf} % This space is always present above and below environments. \newskip\envskipamount \envskipamount = 0pt % Make spacing and below environment symmetrical. We use \parskip here % to help in doing that, since in @example-like environments \parskip % is reset to zero; thus the \afterenvbreak inserts no space -- but the % start of the next paragraph will insert \parskip. % \def\aboveenvbreak{{% % =10000 instead of <10000 because of a special case in \itemzzz and % \sectionheading, q.v. \ifnum \lastpenalty=10000 \else \advance\envskipamount by \parskip \endgraf \ifdim\lastskip<\envskipamount \removelastskip % it's not a good place to break if the last penalty was \nobreak % or better ... \ifnum\lastpenalty<10000 \penalty-50 \fi \vskip\envskipamount \fi \fi }} \let\afterenvbreak = \aboveenvbreak % \nonarrowing is a flag. If "set", @lisp etc don't narrow margins; it will % also clear it, so that its embedded environments do the narrowing again. \let\nonarrowing=\relax % @cartouche ... @end cartouche: draw rectangle w/rounded corners around % environment contents. \font\circle=lcircle10 \newdimen\circthick \newdimen\cartouter\newdimen\cartinner \newskip\normbskip\newskip\normpskip\newskip\normlskip \circthick=\fontdimen8\circle % \def\ctl{{\circle\char'013\hskip -6pt}}% 6pt from pl file: 1/2charwidth \def\ctr{{\hskip 6pt\circle\char'010}} \def\cbl{{\circle\char'012\hskip -6pt}} \def\cbr{{\hskip 6pt\circle\char'011}} \def\carttop{\hbox to \cartouter{\hskip\lskip \ctl\leaders\hrule height\circthick\hfil\ctr \hskip\rskip}} \def\cartbot{\hbox to \cartouter{\hskip\lskip \cbl\leaders\hrule height\circthick\hfil\cbr \hskip\rskip}} % \newskip\lskip\newskip\rskip \envdef\cartouche{% \ifhmode\par\fi % can't be in the midst of a paragraph. \startsavinginserts \lskip=\leftskip \rskip=\rightskip \leftskip=0pt\rightskip=0pt % we want these *outside*. \cartinner=\hsize \advance\cartinner by-\lskip \advance\cartinner by-\rskip \cartouter=\hsize \advance\cartouter by 18.4pt % allow for 3pt kerns on either % side, and for 6pt waste from % each corner char, and rule thickness \normbskip=\baselineskip \normpskip=\parskip \normlskip=\lineskip % Flag to tell @lisp, etc., not to narrow margin. \let\nonarrowing = t% \vbox\bgroup \baselineskip=0pt\parskip=0pt\lineskip=0pt \carttop \hbox\bgroup \hskip\lskip \vrule\kern3pt \vbox\bgroup \kern3pt \hsize=\cartinner \baselineskip=\normbskip \lineskip=\normlskip \parskip=\normpskip \vskip -\parskip \comment % For explanation, see the end of \def\group. } \def\Ecartouche{% \ifhmode\par\fi \kern3pt \egroup \kern3pt\vrule \hskip\rskip \egroup \cartbot \egroup \checkinserts } % This macro is called at the beginning of all the @example variants, % inside a group. \def\nonfillstart{% \aboveenvbreak \hfuzz = 12pt % Don't be fussy \sepspaces % Make spaces be word-separators rather than space tokens. \let\par = \lisppar % don't ignore blank lines \obeylines % each line of input is a line of output \parskip = 0pt \parindent = 0pt \emergencystretch = 0pt % don't try to avoid overfull boxes \ifx\nonarrowing\relax \advance \leftskip by \lispnarrowing \exdentamount=\lispnarrowing \else \let\nonarrowing = \relax \fi \let\exdent=\nofillexdent } % If you want all examples etc. small: @set dispenvsize small. % If you want even small examples the full size: @set dispenvsize nosmall. % This affects the following displayed environments: % @example, @display, @format, @lisp % \def\smallword{small} \def\nosmallword{nosmall} \let\SETdispenvsize\relax \def\setnormaldispenv{% \ifx\SETdispenvsize\smallword \smallexamplefonts \rm \fi } \def\setsmalldispenv{% \ifx\SETdispenvsize\nosmallword \else \smallexamplefonts \rm \fi } % We often define two environments, @foo and @smallfoo. % Let's do it by one command: \def\makedispenv #1#2{ \expandafter\envdef\csname#1\endcsname {\setnormaldispenv #2} \expandafter\envdef\csname small#1\endcsname {\setsmalldispenv #2} \expandafter\let\csname E#1\endcsname \afterenvbreak \expandafter\let\csname Esmall#1\endcsname \afterenvbreak } % Define two synonyms: \def\maketwodispenvs #1#2#3{ \makedispenv{#1}{#3} \makedispenv{#2}{#3} } % @lisp: indented, narrowed, typewriter font; @example: same as @lisp. % % @smallexample and @smalllisp: use smaller fonts. % Originally contributed by Pavel@xerox. % \maketwodispenvs {lisp}{example}{% \nonfillstart \tt \let\kbdfont = \kbdexamplefont % Allow @kbd to do something special. \gobble % eat return } % @display/@smalldisplay: same as @lisp except keep current font. % \makedispenv {display}{% \nonfillstart \gobble } % @format/@smallformat: same as @display except don't narrow margins. % \makedispenv{format}{% \let\nonarrowing = t% \nonfillstart \gobble } % @flushleft: same as @format, but doesn't obey \SETdispenvsize. \envdef\flushleft{% \let\nonarrowing = t% \nonfillstart \gobble } \let\Eflushleft = \afterenvbreak % @flushright. % \envdef\flushright{% \let\nonarrowing = t% \nonfillstart \advance\leftskip by 0pt plus 1fill \gobble } \let\Eflushright = \afterenvbreak % @quotation does normal linebreaking (hence we can't use \nonfillstart) % and narrows the margins. We keep \parskip nonzero in general, since % we're doing normal filling. So, when using \aboveenvbreak and % \afterenvbreak, temporarily make \parskip 0. % \envdef\quotation{% {\parskip=0pt \aboveenvbreak}% because \aboveenvbreak inserts \parskip \parindent=0pt % % @cartouche defines \nonarrowing to inhibit narrowing at next level down. \ifx\nonarrowing\relax \advance\leftskip by \lispnarrowing \advance\rightskip by \lispnarrowing \exdentamount = \lispnarrowing \else \let\nonarrowing = \relax \fi \parsearg\quotationlabel } % We have retained a nonzero parskip for the environment, since we're % doing normal filling. % \def\Equotation{% \par \ifx\quotationauthor\undefined\else % indent a bit. \leftline{\kern 2\leftskip \sl ---\quotationauthor}% \fi {\parskip=0pt \afterenvbreak}% } % If we're given an argument, typeset it in bold with a colon after. \def\quotationlabel#1{% \def\temp{#1}% \ifx\temp\empty \else {\bf #1: }% \fi } % LaTeX-like @verbatim...@end verbatim and @verb{...} % If we want to allow any as delimiter, % we need the curly braces so that makeinfo sees the @verb command, eg: % `@verbx...x' would look like the '@verbx' command. --janneke@gnu.org % % [Knuth]: Donald Ervin Knuth, 1996. The TeXbook. % % [Knuth] p.344; only we need to do the other characters Texinfo sets % active too. Otherwise, they get lost as the first character on a % verbatim line. \def\dospecials{% \do\ \do\\\do\{\do\}\do\$\do\&% \do\#\do\^\do\^^K\do\_\do\^^A\do\%\do\~% \do\<\do\>\do\|\do\@\do+\do\"% } % % [Knuth] p. 380 \def\uncatcodespecials{% \def\do##1{\catcode`##1=\other}\dospecials} % % [Knuth] pp. 380,381,391 % Disable Spanish ligatures ?` and !` of \tt font \begingroup \catcode`\`=\active\gdef`{\relax\lq} \endgroup % % Setup for the @verb command. % % Eight spaces for a tab \begingroup \catcode`\^^I=\active \gdef\tabeightspaces{\catcode`\^^I=\active\def^^I{\ \ \ \ \ \ \ \ }} \endgroup % \def\setupverb{% \tt % easiest (and conventionally used) font for verbatim \def\par{\leavevmode\endgraf}% \catcode`\`=\active \tabeightspaces % Respect line breaks, % print special symbols as themselves, and % make each space count % must do in this order: \obeylines \uncatcodespecials \sepspaces } % Setup for the @verbatim environment % % Real tab expansion \newdimen\tabw \setbox0=\hbox{\tt\space} \tabw=8\wd0 % tab amount % \def\starttabbox{\setbox0=\hbox\bgroup} \begingroup \catcode`\^^I=\active \gdef\tabexpand{% \catcode`\^^I=\active \def^^I{\leavevmode\egroup \dimen0=\wd0 % the width so far, or since the previous tab \divide\dimen0 by\tabw \multiply\dimen0 by\tabw % compute previous multiple of \tabw \advance\dimen0 by\tabw % advance to next multiple of \tabw \wd0=\dimen0 \box0 \starttabbox }% } \endgroup \def\setupverbatim{% \let\nonarrowing = t% \nonfillstart % Easiest (and conventionally used) font for verbatim \tt \def\par{\leavevmode\egroup\box0\endgraf}% \catcode`\`=\active \tabexpand % Respect line breaks, % print special symbols as themselves, and % make each space count % must do in this order: \obeylines \uncatcodespecials \sepspaces \everypar{\starttabbox}% } % Do the @verb magic: verbatim text is quoted by unique % delimiter characters. Before first delimiter expect a % right brace, after last delimiter expect closing brace: % % \def\doverb'{'#1'}'{#1} % % [Knuth] p. 382; only eat outer {} \begingroup \catcode`[=1\catcode`]=2\catcode`\{=\other\catcode`\}=\other \gdef\doverb{#1[\def\next##1#1}[##1\endgroup]\next] \endgroup % \def\verb{\begingroup\setupverb\doverb} % % % Do the @verbatim magic: define the macro \doverbatim so that % the (first) argument ends when '@end verbatim' is reached, ie: % % \def\doverbatim#1@end verbatim{#1} % % For Texinfo it's a lot easier than for LaTeX, % because texinfo's \verbatim doesn't stop at '\end{verbatim}': % we need not redefine '\', '{' and '}'. % % Inspired by LaTeX's verbatim command set [latex.ltx] % \begingroup \catcode`\ =\active \obeylines % % ignore everything up to the first ^^M, that's the newline at the end % of the @verbatim input line itself. Otherwise we get an extra blank % line in the output. \xdef\doverbatim#1^^M#2@end verbatim{#2\noexpand\end\gobble verbatim}% % We really want {...\end verbatim} in the body of the macro, but % without the active space; thus we have to use \xdef and \gobble. \endgroup % \envdef\verbatim{% \setupverbatim\doverbatim } \let\Everbatim = \afterenvbreak % @verbatiminclude FILE - insert text of file in verbatim environment. % \def\verbatiminclude{\parseargusing\filenamecatcodes\doverbatiminclude} % \def\doverbatiminclude#1{% {% \makevalueexpandable \setupverbatim \input #1 \afterenvbreak }% } % @copying ... @end copying. % Save the text away for @insertcopying later. % % We save the uninterpreted tokens, rather than creating a box. % Saving the text in a box would be much easier, but then all the % typesetting commands (@smallbook, font changes, etc.) have to be done % beforehand -- and a) we want @copying to be done first in the source % file; b) letting users define the frontmatter in as flexible order as % possible is very desirable. % \def\copying{\checkenv{}\begingroup\scanargctxt\docopying} \def\docopying#1@end copying{\endgroup\def\copyingtext{#1}} % \def\insertcopying{% \begingroup \parindent = 0pt % paragraph indentation looks wrong on title page \scanexp\copyingtext \endgroup } \message{defuns,} % @defun etc. \newskip\defbodyindent \defbodyindent=.4in \newskip\defargsindent \defargsindent=50pt \newskip\deflastargmargin \deflastargmargin=18pt % Start the processing of @deffn: \def\startdefun{% \ifnum\lastpenalty<10000 \medbreak \else % If there are two @def commands in a row, we'll have a \nobreak, % which is there to keep the function description together with its % header. But if there's nothing but headers, we need to allow a % break somewhere. Check specifically for penalty 10002, inserted % by \defargscommonending, instead of 10000, since the sectioning % commands also insert a nobreak penalty, and we don't want to allow % a break between a section heading and a defun. % \ifnum\lastpenalty=10002 \penalty2000 \fi % % Similarly, after a section heading, do not allow a break. % But do insert the glue. \medskip % preceded by discardable penalty, so not a breakpoint \fi % \parindent=0in \advance\leftskip by \defbodyindent \exdentamount=\defbodyindent } \def\dodefunx#1{% % First, check whether we are in the right environment: \checkenv#1% % % As above, allow line break if we have multiple x headers in a row. % It's not a great place, though. \ifnum\lastpenalty=10002 \penalty3000 \fi % % And now, it's time to reuse the body of the original defun: \expandafter\gobbledefun#1% } \def\gobbledefun#1\startdefun{} % \printdefunline \deffnheader{text} % \def\printdefunline#1#2{% \begingroup % call \deffnheader: #1#2 \endheader % common ending: \interlinepenalty = 10000 \advance\rightskip by 0pt plus 1fil \endgraf \nobreak\vskip -\parskip \penalty 10002 % signal to \startdefun and \dodefunx % Some of the @defun-type tags do not enable magic parentheses, % rendering the following check redundant. But we don't optimize. \checkparencounts \endgroup } \def\Edefun{\endgraf\medbreak} % \makedefun{deffn} creates \deffn, \deffnx and \Edeffn; % the only thing remainnig is to define \deffnheader. % \def\makedefun#1{% \expandafter\let\csname E#1\endcsname = \Edefun \edef\temp{\noexpand\domakedefun \makecsname{#1}\makecsname{#1x}\makecsname{#1header}}% \temp } % \domakedefun \deffn \deffnx \deffnheader % % Define \deffn and \deffnx, without parameters. % \deffnheader has to be defined explicitly. % \def\domakedefun#1#2#3{% \envdef#1{% \startdefun \parseargusing\activeparens{\printdefunline#3}% }% \def#2{\dodefunx#1}% \def#3% } %%% Untyped functions: % @deffn category name args \makedefun{deffn}{\deffngeneral{}} % @deffn category class name args \makedefun{defop}#1 {\defopon{#1\ \putwordon}} % \defopon {category on}class name args \def\defopon#1#2 {\deffngeneral{\putwordon\ \code{#2}}{#1\ \code{#2}} } % \deffngeneral {subind}category name args % \def\deffngeneral#1#2 #3 #4\endheader{% % Remember that \dosubind{fn}{foo}{} is equivalent to \doind{fn}{foo}. \dosubind{fn}{\code{#3}}{#1}% \defname{#2}{}{#3}\magicamp\defunargs{#4\unskip}% } %%% Typed functions: % @deftypefn category type name args \makedefun{deftypefn}{\deftypefngeneral{}} % @deftypeop category class type name args \makedefun{deftypeop}#1 {\deftypeopon{#1\ \putwordon}} % \deftypeopon {category on}class type name args \def\deftypeopon#1#2 {\deftypefngeneral{\putwordon\ \code{#2}}{#1\ \code{#2}} } % \deftypefngeneral {subind}category type name args % \def\deftypefngeneral#1#2 #3 #4 #5\endheader{% \dosubind{fn}{\code{#4}}{#1}% \defname{#2}{#3}{#4}\defunargs{#5\unskip}% } %%% Typed variables: % @deftypevr category type var args \makedefun{deftypevr}{\deftypecvgeneral{}} % @deftypecv category class type var args \makedefun{deftypecv}#1 {\deftypecvof{#1\ \putwordof}} % \deftypecvof {category of}class type var args \def\deftypecvof#1#2 {\deftypecvgeneral{\putwordof\ \code{#2}}{#1\ \code{#2}} } % \deftypecvgeneral {subind}category type var args % \def\deftypecvgeneral#1#2 #3 #4 #5\endheader{% \dosubind{vr}{\code{#4}}{#1}% \defname{#2}{#3}{#4}\defunargs{#5\unskip}% } %%% Untyped variables: % @defvr category var args \makedefun{defvr}#1 {\deftypevrheader{#1} {} } % @defcv category class var args \makedefun{defcv}#1 {\defcvof{#1\ \putwordof}} % \defcvof {category of}class var args \def\defcvof#1#2 {\deftypecvof{#1}#2 {} } %%% Type: % @deftp category name args \makedefun{deftp}#1 #2 #3\endheader{% \doind{tp}{\code{#2}}% \defname{#1}{}{#2}\defunargs{#3\unskip}% } % Remaining @defun-like shortcuts: \makedefun{defun}{\deffnheader{\putwordDeffunc} } \makedefun{defmac}{\deffnheader{\putwordDefmac} } \makedefun{defspec}{\deffnheader{\putwordDefspec} } \makedefun{deftypefun}{\deftypefnheader{\putwordDeffunc} } \makedefun{defvar}{\defvrheader{\putwordDefvar} } \makedefun{defopt}{\defvrheader{\putwordDefopt} } \makedefun{deftypevar}{\deftypevrheader{\putwordDefvar} } \makedefun{defmethod}{\defopon\putwordMethodon} \makedefun{deftypemethod}{\deftypeopon\putwordMethodon} \makedefun{defivar}{\defcvof\putwordInstanceVariableof} \makedefun{deftypeivar}{\deftypecvof\putwordInstanceVariableof} % \defname, which formats the name of the @def (not the args). % #1 is the category, such as "Function". % #2 is the return type, if any. % #3 is the function name. % % We are followed by (but not passed) the arguments, if any. % \def\defname#1#2#3{% % Get the values of \leftskip and \rightskip as they were outside the @def... \advance\leftskip by -\defbodyindent % % How we'll format the type name. Putting it in brackets helps % distinguish it from the body text that may end up on the next line % just below it. \def\temp{#1}% \setbox0=\hbox{\kern\deflastargmargin \ifx\temp\empty\else [\rm\temp]\fi} % % Figure out line sizes for the paragraph shape. % The first line needs space for \box0; but if \rightskip is nonzero, % we need only space for the part of \box0 which exceeds it: \dimen0=\hsize \advance\dimen0 by -\wd0 \advance\dimen0 by \rightskip % The continuations: \dimen2=\hsize \advance\dimen2 by -\defargsindent % (plain.tex says that \dimen1 should be used only as global.) \parshape 2 0in \dimen0 \defargsindent \dimen2 % % Put the type name to the right margin. \noindent \hbox to 0pt{% \hfil\box0 \kern-\hsize % \hsize has to be shortened this way: \kern\leftskip % Intentionally do not respect \rightskip, since we need the space. }% % % Allow all lines to be underfull without complaint: \tolerance=10000 \hbadness=10000 \exdentamount=\defbodyindent {% % defun fonts. We use typewriter by default (used to be bold) because: % . we're printing identifiers, they should be in tt in principle. % . in languages with many accents, such as Czech or French, it's % common to leave accents off identifiers. The result looks ok in % tt, but exceedingly strange in rm. % . we don't want -- and --- to be treated as ligatures. % . this still does not fix the ?` and !` ligatures, but so far no % one has made identifiers using them :). \df \tt \def\temp{#2}% return value type \ifx\temp\empty\else \tclose{\temp} \fi #3% output function name }% {\rm\enskip}% hskip 0.5 em of \tenrm % \boldbrax % arguments will be output next, if any. } % Print arguments in slanted roman (not ttsl), inconsistently with using % tt for the name. This is because literal text is sometimes needed in % the argument list (groff manual), and ttsl and tt are not very % distinguishable. Prevent hyphenation at `-' chars. % \def\defunargs#1{% % use sl by default (not ttsl), % tt for the names. \df \sl \hyphenchar\font=0 % % On the other hand, if an argument has two dashes (for instance), we % want a way to get ttsl. Let's try @var for that. \let\var=\ttslanted #1% \sl\hyphenchar\font=45 } % We want ()&[] to print specially on the defun line. % \def\activeparens{% \catcode`\(=\active \catcode`\)=\active \catcode`\[=\active \catcode`\]=\active \catcode`\&=\active } % Make control sequences which act like normal parenthesis chars. \let\lparen = ( \let\rparen = ) % Be sure that we always have a definition for `(', etc. For example, % if the fn name has parens in it, \boldbrax will not be in effect yet, % so TeX would otherwise complain about undefined control sequence. { \activeparens \global\let(=\lparen \global\let)=\rparen \global\let[=\lbrack \global\let]=\rbrack \global\let& = \& \gdef\boldbrax{\let(=\opnr\let)=\clnr\let[=\lbrb\let]=\rbrb} \gdef\magicamp{\let&=\amprm} } \newcount\parencount % If we encounter &foo, then turn on ()-hacking afterwards \newif\ifampseen \def\amprm#1 {\ampseentrue{\bf\ }} \def\parenfont{% \ifampseen % At the first level, print parens in roman, % otherwise use the default font. \ifnum \parencount=1 \rm \fi \else % The \sf parens (in \boldbrax) actually are a little bolder than % the contained text. This is especially needed for [ and ] . \sf \fi } \def\infirstlevel#1{% \ifampseen \ifnum\parencount=1 #1% \fi \fi } \def\bfafterword#1 {#1 \bf} \def\opnr{% \global\advance\parencount by 1 {\parenfont(}% \infirstlevel \bfafterword } \def\clnr{% {\parenfont)}% \infirstlevel \sl \global\advance\parencount by -1 } \newcount\brackcount \def\lbrb{% \global\advance\brackcount by 1 {\bf[}% } \def\rbrb{% {\bf]}% \global\advance\brackcount by -1 } \def\checkparencounts{% \ifnum\parencount=0 \else \badparencount \fi \ifnum\brackcount=0 \else \badbrackcount \fi } \def\badparencount{% \errmessage{Unbalanced parentheses in @def}% \global\parencount=0 } \def\badbrackcount{% \errmessage{Unbalanced square braces in @def}% \global\brackcount=0 } \message{macros,} % @macro. % To do this right we need a feature of e-TeX, \scantokens, % which we arrange to emulate with a temporary file in ordinary TeX. \ifx\eTeXversion\undefined \newwrite\macscribble \def\scantokens#1{% \toks0={#1}% \immediate\openout\macscribble=\jobname.tmp \immediate\write\macscribble{\the\toks0}% \immediate\closeout\macscribble \input \jobname.tmp } \fi \def\scanmacro#1{% \begingroup \newlinechar`\^^M \let\xeatspaces\eatspaces % Undo catcode changes of \startcontents and \doprintindex % When called from @insertcopying or (short)caption, we need active % backslash to get it printed correctly. Previously, we had % \catcode`\\=\other instead. We'll see whether a problem appears % with macro expansion. --kasal, 19aug04 \catcode`\@=0 \catcode`\\=\active \escapechar=`\@ % ... and \example \spaceisspace % % Append \endinput to make sure that TeX does not see the ending newline. % % I've verified that it is necessary both for e-TeX and for ordinary TeX % --kasal, 29nov03 \scantokens{#1\endinput}% \endgroup } \def\scanexp#1{% \edef\temp{\noexpand\scanmacro{#1}}% \temp } \newcount\paramno % Count of parameters \newtoks\macname % Macro name \newif\ifrecursive % Is it recursive? % List of all defined macros in the form % \definedummyword\macro1\definedummyword\macro2... % Currently is also contains all @aliases; the list can be split % if there is a need. \def\macrolist{} % Add the macro to \macrolist \def\addtomacrolist#1{\expandafter \addtomacrolistxxx \csname#1\endcsname} \def\addtomacrolistxxx#1{% \toks0 = \expandafter{\macrolist\definedummyword#1}% \xdef\macrolist{\the\toks0}% } % Utility routines. % This does \let #1 = #2, with \csnames; that is, % \let \csname#1\endcsname = \csname#2\endcsname % (except of course we have to play expansion games). % \def\cslet#1#2{% \expandafter\let \csname#1\expandafter\endcsname \csname#2\endcsname } % Trim leading and trailing spaces off a string. % Concepts from aro-bend problem 15 (see CTAN). {\catcode`\@=11 \gdef\eatspaces #1{\expandafter\trim@\expandafter{#1 }} \gdef\trim@ #1{\trim@@ @#1 @ #1 @ @@} \gdef\trim@@ #1@ #2@ #3@@{\trim@@@\empty #2 @} \def\unbrace#1{#1} \unbrace{\gdef\trim@@@ #1 } #2@{#1} } % Trim a single trailing ^^M off a string. {\catcode`\^^M=\other \catcode`\Q=3% \gdef\eatcr #1{\eatcra #1Q^^MQ}% \gdef\eatcra#1^^MQ{\eatcrb#1Q}% \gdef\eatcrb#1Q#2Q{#1}% } % Macro bodies are absorbed as an argument in a context where % all characters are catcode 10, 11 or 12, except \ which is active % (as in normal texinfo). It is necessary to change the definition of \. % It's necessary to have hard CRs when the macro is executed. This is % done by making ^^M (\endlinechar) catcode 12 when reading the macro % body, and then making it the \newlinechar in \scanmacro. \def\scanctxt{% \catcode`\"=\other \catcode`\+=\other \catcode`\<=\other \catcode`\>=\other \catcode`\@=\other \catcode`\^=\other \catcode`\_=\other \catcode`\|=\other \catcode`\~=\other } \def\scanargctxt{% \scanctxt \catcode`\\=\other \catcode`\^^M=\other } \def\macrobodyctxt{% \scanctxt \catcode`\{=\other \catcode`\}=\other \catcode`\^^M=\other \usembodybackslash } \def\macroargctxt{% \scanctxt \catcode`\\=\other } % \mbodybackslash is the definition of \ in @macro bodies. % It maps \foo\ => \csname macarg.foo\endcsname => #N % where N is the macro parameter number. % We define \csname macarg.\endcsname to be \realbackslash, so % \\ in macro replacement text gets you a backslash. {\catcode`@=0 @catcode`@\=@active @gdef@usembodybackslash{@let\=@mbodybackslash} @gdef@mbodybackslash#1\{@csname macarg.#1@endcsname} } \expandafter\def\csname macarg.\endcsname{\realbackslash} \def\macro{\recursivefalse\parsearg\macroxxx} \def\rmacro{\recursivetrue\parsearg\macroxxx} \def\macroxxx#1{% \getargs{#1}% now \macname is the macname and \argl the arglist \ifx\argl\empty % no arguments \paramno=0% \else \expandafter\parsemargdef \argl;% \fi \if1\csname ismacro.\the\macname\endcsname \message{Warning: redefining \the\macname}% \else \expandafter\ifx\csname \the\macname\endcsname \relax \else \errmessage{Macro name \the\macname\space already defined}\fi \global\cslet{macsave.\the\macname}{\the\macname}% \global\expandafter\let\csname ismacro.\the\macname\endcsname=1% \addtomacrolist{\the\macname}% \fi \begingroup \macrobodyctxt \ifrecursive \expandafter\parsermacbody \else \expandafter\parsemacbody \fi} \parseargdef\unmacro{% \if1\csname ismacro.#1\endcsname \global\cslet{#1}{macsave.#1}% \global\expandafter\let \csname ismacro.#1\endcsname=0% % Remove the macro name from \macrolist: \begingroup \expandafter\let\csname#1\endcsname \relax \let\definedummyword\unmacrodo \xdef\macrolist{\macrolist}% \endgroup \else \errmessage{Macro #1 not defined}% \fi } % Called by \do from \dounmacro on each macro. The idea is to omit any % macro definitions that have been changed to \relax. % \def\unmacrodo#1{% \ifx #1\relax % remove this \else \noexpand\definedummyword \noexpand#1% \fi } % This makes use of the obscure feature that if the last token of a % is #, then the preceding argument is delimited by % an opening brace, and that opening brace is not consumed. \def\getargs#1{\getargsxxx#1{}} \def\getargsxxx#1#{\getmacname #1 \relax\getmacargs} \def\getmacname #1 #2\relax{\macname={#1}} \def\getmacargs#1{\def\argl{#1}} % Parse the optional {params} list. Set up \paramno and \paramlist % so \defmacro knows what to do. Define \macarg.blah for each blah % in the params list, to be ##N where N is the position in that list. % That gets used by \mbodybackslash (above). % We need to get `macro parameter char #' into several definitions. % The technique used is stolen from LaTeX: let \hash be something % unexpandable, insert that wherever you need a #, and then redefine % it to # just before using the token list produced. % % The same technique is used to protect \eatspaces till just before % the macro is used. \def\parsemargdef#1;{\paramno=0\def\paramlist{}% \let\hash\relax\let\xeatspaces\relax\parsemargdefxxx#1,;,} \def\parsemargdefxxx#1,{% \if#1;\let\next=\relax \else \let\next=\parsemargdefxxx \advance\paramno by 1% \expandafter\edef\csname macarg.\eatspaces{#1}\endcsname {\xeatspaces{\hash\the\paramno}}% \edef\paramlist{\paramlist\hash\the\paramno,}% \fi\next} % These two commands read recursive and nonrecursive macro bodies. % (They're different since rec and nonrec macros end differently.) \long\def\parsemacbody#1@end macro% {\xdef\temp{\eatcr{#1}}\endgroup\defmacro}% \long\def\parsermacbody#1@end rmacro% {\xdef\temp{\eatcr{#1}}\endgroup\defmacro}% % This defines the macro itself. There are six cases: recursive and % nonrecursive macros of zero, one, and many arguments. % Much magic with \expandafter here. % \xdef is used so that macro definitions will survive the file % they're defined in; @include reads the file inside a group. \def\defmacro{% \let\hash=##% convert placeholders to macro parameter chars \ifrecursive \ifcase\paramno % 0 \expandafter\xdef\csname\the\macname\endcsname{% \noexpand\scanmacro{\temp}}% \or % 1 \expandafter\xdef\csname\the\macname\endcsname{% \bgroup\noexpand\macroargctxt \noexpand\braceorline \expandafter\noexpand\csname\the\macname xxx\endcsname}% \expandafter\xdef\csname\the\macname xxx\endcsname##1{% \egroup\noexpand\scanmacro{\temp}}% \else % many \expandafter\xdef\csname\the\macname\endcsname{% \bgroup\noexpand\macroargctxt \noexpand\csname\the\macname xx\endcsname}% \expandafter\xdef\csname\the\macname xx\endcsname##1{% \expandafter\noexpand\csname\the\macname xxx\endcsname ##1,}% \expandafter\expandafter \expandafter\xdef \expandafter\expandafter \csname\the\macname xxx\endcsname \paramlist{\egroup\noexpand\scanmacro{\temp}}% \fi \else \ifcase\paramno % 0 \expandafter\xdef\csname\the\macname\endcsname{% \noexpand\norecurse{\the\macname}% \noexpand\scanmacro{\temp}\egroup}% \or % 1 \expandafter\xdef\csname\the\macname\endcsname{% \bgroup\noexpand\macroargctxt \noexpand\braceorline \expandafter\noexpand\csname\the\macname xxx\endcsname}% \expandafter\xdef\csname\the\macname xxx\endcsname##1{% \egroup \noexpand\norecurse{\the\macname}% \noexpand\scanmacro{\temp}\egroup}% \else % many \expandafter\xdef\csname\the\macname\endcsname{% \bgroup\noexpand\macroargctxt \expandafter\noexpand\csname\the\macname xx\endcsname}% \expandafter\xdef\csname\the\macname xx\endcsname##1{% \expandafter\noexpand\csname\the\macname xxx\endcsname ##1,}% \expandafter\expandafter \expandafter\xdef \expandafter\expandafter \csname\the\macname xxx\endcsname \paramlist{% \egroup \noexpand\norecurse{\the\macname}% \noexpand\scanmacro{\temp}\egroup}% \fi \fi} \def\norecurse#1{\bgroup\cslet{#1}{macsave.#1}} % \braceorline decides whether the next nonwhitespace character is a % {. If so it reads up to the closing }, if not, it reads the whole % line. Whatever was read is then fed to the next control sequence % as an argument (by \parsebrace or \parsearg) \def\braceorline#1{\let\next=#1\futurelet\nchar\braceorlinexxx} \def\braceorlinexxx{% \ifx\nchar\bgroup\else \expandafter\parsearg \fi \next} % @alias. % We need some trickery to remove the optional spaces around the equal % sign. Just make them active and then expand them all to nothing. \def\alias{\parseargusing\obeyspaces\aliasxxx} \def\aliasxxx #1{\aliasyyy#1\relax} \def\aliasyyy #1=#2\relax{% {% \expandafter\let\obeyedspace=\empty \addtomacrolist{#1}% \xdef\next{\global\let\makecsname{#1}=\makecsname{#2}}% }% \next } \message{cross references,} \newwrite\auxfile \newif\ifhavexrefs % True if xref values are known. \newif\ifwarnedxrefs % True if we warned once that they aren't known. % @inforef is relatively simple. \def\inforef #1{\inforefzzz #1,,,,**} \def\inforefzzz #1,#2,#3,#4**{\putwordSee{} \putwordInfo{} \putwordfile{} \file{\ignorespaces #3{}}, node \samp{\ignorespaces#1{}}} % @node's only job in TeX is to define \lastnode, which is used in % cross-references. The @node line might or might not have commas, and % might or might not have spaces before the first comma, like: % @node foo , bar , ... % We don't want such trailing spaces in the node name. % \parseargdef\node{\checkenv{}\donode #1 ,\finishnodeparse} % % also remove a trailing comma, in case of something like this: % @node Help-Cross, , , Cross-refs \def\donode#1 ,#2\finishnodeparse{\dodonode #1,\finishnodeparse} \def\dodonode#1,#2\finishnodeparse{\gdef\lastnode{#1}} \let\nwnode=\node \let\lastnode=\empty % Write a cross-reference definition for the current node. #1 is the % type (Ynumbered, Yappendix, Ynothing). % \def\donoderef#1{% \ifx\lastnode\empty\else \setref{\lastnode}{#1}% \global\let\lastnode=\empty \fi } % @anchor{NAME} -- define xref target at arbitrary point. % \newcount\savesfregister % \def\savesf{\relax \ifhmode \savesfregister=\spacefactor \fi} \def\restoresf{\relax \ifhmode \spacefactor=\savesfregister \fi} \def\anchor#1{\savesf \setref{#1}{Ynothing}\restoresf \ignorespaces} % \setref{NAME}{SNT} defines a cross-reference point NAME (a node or an % anchor), which consists of three parts: % 1) NAME-title - the current sectioning name taken from \thissection, % or the anchor name. % 2) NAME-snt - section number and type, passed as the SNT arg, or % empty for anchors. % 3) NAME-pg - the page number. % % This is called from \donoderef, \anchor, and \dofloat. In the case of % floats, there is an additional part, which is not written here: % 4) NAME-lof - the text as it should appear in a @listoffloats. % \def\setref#1#2{% \pdfmkdest{#1}% \iflinks {% \atdummies % preserve commands, but don't expand them \edef\writexrdef##1##2{% \write\auxfile{@xrdef{#1-% #1 of \setref, expanded by the \edef ##1}{##2}}% these are parameters of \writexrdef }% \toks0 = \expandafter{\thissection}% \immediate \writexrdef{title}{\the\toks0 }% \immediate \writexrdef{snt}{\csname #2\endcsname}% \Ynumbered etc. \writexrdef{pg}{\folio}% will be written later, during \shipout }% \fi } % @xref, @pxref, and @ref generate cross-references. For \xrefX, #1 is % the node name, #2 the name of the Info cross-reference, #3 the printed % node name, #4 the name of the Info file, #5 the name of the printed % manual. All but the node name can be omitted. % \def\pxref#1{\putwordsee{} \xrefX[#1,,,,,,,]} \def\xref#1{\putwordSee{} \xrefX[#1,,,,,,,]} \def\ref#1{\xrefX[#1,,,,,,,]} \def\xrefX[#1,#2,#3,#4,#5,#6]{\begingroup \unsepspaces \def\printedmanual{\ignorespaces #5}% \def\printedrefname{\ignorespaces #3}% \setbox1=\hbox{\printedmanual\unskip}% \setbox0=\hbox{\printedrefname\unskip}% \ifdim \wd0 = 0pt % No printed node name was explicitly given. \expandafter\ifx\csname SETxref-automatic-section-title\endcsname\relax % Use the node name inside the square brackets. \def\printedrefname{\ignorespaces #1}% \else % Use the actual chapter/section title appear inside % the square brackets. Use the real section title if we have it. \ifdim \wd1 > 0pt % It is in another manual, so we don't have it. \def\printedrefname{\ignorespaces #1}% \else \ifhavexrefs % We know the real title if we have the xref values. \def\printedrefname{\refx{#1-title}{}}% \else % Otherwise just copy the Info node name. \def\printedrefname{\ignorespaces #1}% \fi% \fi \fi \fi % % Make link in pdf output. \ifpdf \leavevmode \getfilename{#4}% {\turnoffactive % See comments at \activebackslashdouble. {\activebackslashdouble \xdef\pdfxrefdest{#1}% \backslashparens\pdfxrefdest}% % \ifnum\filenamelength>0 \startlink attr{/Border [0 0 0]}% goto file{\the\filename.pdf} name{\pdfxrefdest}% \else \startlink attr{/Border [0 0 0]}% goto name{\pdfmkpgn{\pdfxrefdest}}% \fi }% \linkcolor \fi % % Float references are printed completely differently: "Figure 1.2" % instead of "[somenode], p.3". We distinguish them by the % LABEL-title being set to a magic string. {% % Have to otherify everything special to allow the \csname to % include an _ in the xref name, etc. \indexnofonts \turnoffactive \expandafter\global\expandafter\let\expandafter\Xthisreftitle \csname XR#1-title\endcsname }% \iffloat\Xthisreftitle % If the user specified the print name (third arg) to the ref, % print it instead of our usual "Figure 1.2". \ifdim\wd0 = 0pt \refx{#1-snt}% \else \printedrefname \fi % % if the user also gave the printed manual name (fifth arg), append % "in MANUALNAME". \ifdim \wd1 > 0pt \space \putwordin{} \cite{\printedmanual}% \fi \else % node/anchor (non-float) references. % % If we use \unhbox0 and \unhbox1 to print the node names, TeX does not % insert empty discretionaries after hyphens, which means that it will % not find a line break at a hyphen in a node names. Since some manuals % are best written with fairly long node names, containing hyphens, this % is a loss. Therefore, we give the text of the node name again, so it % is as if TeX is seeing it for the first time. \ifdim \wd1 > 0pt \putwordsection{} ``\printedrefname'' \putwordin{} \cite{\printedmanual}% \else % _ (for example) has to be the character _ for the purposes of the % control sequence corresponding to the node, but it has to expand % into the usual \leavevmode...\vrule stuff for purposes of % printing. So we \turnoffactive for the \refx-snt, back on for the % printing, back off for the \refx-pg. {\turnoffactive % Only output a following space if the -snt ref is nonempty; for % @unnumbered and @anchor, it won't be. \setbox2 = \hbox{\ignorespaces \refx{#1-snt}{}}% \ifdim \wd2 > 0pt \refx{#1-snt}\space\fi }% % output the `[mynode]' via a macro so it can be overridden. \xrefprintnodename\printedrefname % % But we always want a comma and a space: ,\space % % output the `page 3'. \turnoffactive \putwordpage\tie\refx{#1-pg}{}% \fi \fi \endlink \endgroup} % This macro is called from \xrefX for the `[nodename]' part of xref % output. It's a separate macro only so it can be changed more easily, % since square brackets don't work well in some documents. Particularly % one that Bob is working on :). % \def\xrefprintnodename#1{[#1]} % Things referred to by \setref. % \def\Ynothing{} \def\Yomitfromtoc{} \def\Ynumbered{% \ifnum\secno=0 \putwordChapter@tie \the\chapno \else \ifnum\subsecno=0 \putwordSection@tie \the\chapno.\the\secno \else \ifnum\subsubsecno=0 \putwordSection@tie \the\chapno.\the\secno.\the\subsecno \else \putwordSection@tie \the\chapno.\the\secno.\the\subsecno.\the\subsubsecno \fi\fi\fi } \def\Yappendix{% \ifnum\secno=0 \putwordAppendix@tie @char\the\appendixno{}% \else \ifnum\subsecno=0 \putwordSection@tie @char\the\appendixno.\the\secno \else \ifnum\subsubsecno=0 \putwordSection@tie @char\the\appendixno.\the\secno.\the\subsecno \else \putwordSection@tie @char\the\appendixno.\the\secno.\the\subsecno.\the\subsubsecno \fi\fi\fi } % Define \refx{NAME}{SUFFIX} to reference a cross-reference string named NAME. % If its value is nonempty, SUFFIX is output afterward. % \def\refx#1#2{% {% \indexnofonts \otherbackslash \expandafter\global\expandafter\let\expandafter\thisrefX \csname XR#1\endcsname }% \ifx\thisrefX\relax % If not defined, say something at least. \angleleft un\-de\-fined\angleright \iflinks \ifhavexrefs \message{\linenumber Undefined cross reference `#1'.}% \else \ifwarnedxrefs\else \global\warnedxrefstrue \message{Cross reference values unknown; you must run TeX again.}% \fi \fi \fi \else % It's defined, so just use it. \thisrefX \fi #2% Output the suffix in any case. } % This is the macro invoked by entries in the aux file. Usually it's % just a \def (we prepend XR to the control sequence name to avoid % collisions). But if this is a float type, we have more work to do. % \def\xrdef#1#2{% \expandafter\gdef\csname XR#1\endcsname{#2}% remember this xref value. % % Was that xref control sequence that we just defined for a float? \expandafter\iffloat\csname XR#1\endcsname % it was a float, and we have the (safe) float type in \iffloattype. \expandafter\let\expandafter\floatlist \csname floatlist\iffloattype\endcsname % % Is this the first time we've seen this float type? \expandafter\ifx\floatlist\relax \toks0 = {\do}% yes, so just \do \else % had it before, so preserve previous elements in list. \toks0 = \expandafter{\floatlist\do}% \fi % % Remember this xref in the control sequence \floatlistFLOATTYPE, % for later use in \listoffloats. \expandafter\xdef\csname floatlist\iffloattype\endcsname{\the\toks0{#1}}% \fi } % Read the last existing aux file, if any. No error if none exists. % \def\tryauxfile{% \openin 1 \jobname.aux \ifeof 1 \else \readdatafile{aux}% \global\havexrefstrue \fi \closein 1 } \def\setupdatafile{% \catcode`\^^@=\other \catcode`\^^A=\other \catcode`\^^B=\other \catcode`\^^C=\other \catcode`\^^D=\other \catcode`\^^E=\other \catcode`\^^F=\other \catcode`\^^G=\other \catcode`\^^H=\other \catcode`\^^K=\other \catcode`\^^L=\other \catcode`\^^N=\other \catcode`\^^P=\other \catcode`\^^Q=\other \catcode`\^^R=\other \catcode`\^^S=\other \catcode`\^^T=\other \catcode`\^^U=\other \catcode`\^^V=\other \catcode`\^^W=\other \catcode`\^^X=\other \catcode`\^^Z=\other \catcode`\^^[=\other \catcode`\^^\=\other \catcode`\^^]=\other \catcode`\^^^=\other \catcode`\^^_=\other % It was suggested to set the catcode of ^ to 7, which would allow ^^e4 etc. % in xref tags, i.e., node names. But since ^^e4 notation isn't % supported in the main text, it doesn't seem desirable. Furthermore, % that is not enough: for node names that actually contain a ^ % character, we would end up writing a line like this: 'xrdef {'hat % b-title}{'hat b} and \xrdef does a \csname...\endcsname on the first % argument, and \hat is not an expandable control sequence. It could % all be worked out, but why? Either we support ^^ or we don't. % % The other change necessary for this was to define \auxhat: % \def\auxhat{\def^{'hat }}% extra space so ok if followed by letter % and then to call \auxhat in \setq. % \catcode`\^=\other % % Special characters. Should be turned off anyway, but... \catcode`\~=\other \catcode`\[=\other \catcode`\]=\other \catcode`\"=\other \catcode`\_=\other \catcode`\|=\other \catcode`\<=\other \catcode`\>=\other \catcode`\$=\other \catcode`\#=\other \catcode`\&=\other \catcode`\%=\other \catcode`+=\other % avoid \+ for paranoia even though we've turned it off % % This is to support \ in node names and titles, since the \ % characters end up in a \csname. It's easier than % leaving it active and making its active definition an actual \ % character. What I don't understand is why it works in the *value* % of the xrdef. Seems like it should be a catcode12 \, and that % should not typeset properly. But it works, so I'm moving on for % now. --karl, 15jan04. \catcode`\\=\other % % Make the characters 128-255 be printing characters. {% \count1=128 \def\loop{% \catcode\count1=\other \advance\count1 by 1 \ifnum \count1<256 \loop \fi }% }% % % @ is our escape character in .aux files, and we need braces. \catcode`\{=1 \catcode`\}=2 \catcode`\@=0 } \def\readdatafile#1{% \begingroup \setupdatafile \input\jobname.#1 \endgroup} \message{insertions,} % including footnotes. \newcount \footnoteno % The trailing space in the following definition for supereject is % vital for proper filling; pages come out unaligned when you do a % pagealignmacro call if that space before the closing brace is % removed. (Generally, numeric constants should always be followed by a % space to prevent strange expansion errors.) \def\supereject{\par\penalty -20000\footnoteno =0 } % @footnotestyle is meaningful for info output only. \let\footnotestyle=\comment {\catcode `\@=11 % % Auto-number footnotes. Otherwise like plain. \gdef\footnote{% \let\indent=\ptexindent \let\noindent=\ptexnoindent \global\advance\footnoteno by \@ne \edef\thisfootno{$^{\the\footnoteno}$}% % % In case the footnote comes at the end of a sentence, preserve the % extra spacing after we do the footnote number. \let\@sf\empty \ifhmode\edef\@sf{\spacefactor\the\spacefactor}\ptexslash\fi % % Remove inadvertent blank space before typesetting the footnote number. \unskip \thisfootno\@sf \dofootnote }% % Don't bother with the trickery in plain.tex to not require the % footnote text as a parameter. Our footnotes don't need to be so general. % % Oh yes, they do; otherwise, @ifset (and anything else that uses % \parseargline) fails inside footnotes because the tokens are fixed when % the footnote is read. --karl, 16nov96. % \gdef\dofootnote{% \insert\footins\bgroup % We want to typeset this text as a normal paragraph, even if the % footnote reference occurs in (for example) a display environment. % So reset some parameters. \hsize=\pagewidth \interlinepenalty\interfootnotelinepenalty \splittopskip\ht\strutbox % top baseline for broken footnotes \splitmaxdepth\dp\strutbox \floatingpenalty\@MM \leftskip\z@skip \rightskip\z@skip \spaceskip\z@skip \xspaceskip\z@skip \parindent\defaultparindent % \smallfonts \rm % % Because we use hanging indentation in footnotes, a @noindent appears % to exdent this text, so make it be a no-op. makeinfo does not use % hanging indentation so @noindent can still be needed within footnote % text after an @example or the like (not that this is good style). \let\noindent = \relax % % Hang the footnote text off the number. Use \everypar in case the % footnote extends for more than one paragraph. \everypar = {\hang}% \textindent{\thisfootno}% % % Don't crash into the line above the footnote text. Since this % expands into a box, it must come within the paragraph, lest it % provide a place where TeX can split the footnote. \footstrut \futurelet\next\fo@t } }%end \catcode `\@=11 % In case a @footnote appears in a vbox, save the footnote text and create % the real \insert just after the vbox finished. Otherwise, the insertion % would be lost. % Similarily, if a @footnote appears inside an alignment, save the footnote % text to a box and make the \insert when a row of the table is finished. % And the same can be done for other insert classes. --kasal, 16nov03. % Replace the \insert primitive by a cheating macro. % Deeper inside, just make sure that the saved insertions are not spilled % out prematurely. % \def\startsavinginserts{% \ifx \insert\ptexinsert \let\insert\saveinsert \else \let\checkinserts\relax \fi } % This \insert replacement works for both \insert\footins{foo} and % \insert\footins\bgroup foo\egroup, but it doesn't work for \insert27{foo}. % \def\saveinsert#1{% \edef\next{\noexpand\savetobox \makeSAVEname#1}% \afterassignment\next % swallow the left brace \let\temp = } \def\makeSAVEname#1{\makecsname{SAVE\expandafter\gobble\string#1}} \def\savetobox#1{\global\setbox#1 = \vbox\bgroup \unvbox#1} \def\checksaveins#1{\ifvoid#1\else \placesaveins#1\fi} \def\placesaveins#1{% \ptexinsert \csname\expandafter\gobblesave\string#1\endcsname {\box#1}% } % eat @SAVE -- beware, all of them have catcode \other: { \def\dospecials{\do S\do A\do V\do E} \uncatcodespecials % ;-) \gdef\gobblesave @SAVE{} } % initialization: \def\newsaveins #1{% \edef\next{\noexpand\newsaveinsX \makeSAVEname#1}% \next } \def\newsaveinsX #1{% \csname newbox\endcsname #1% \expandafter\def\expandafter\checkinserts\expandafter{\checkinserts \checksaveins #1}% } % initialize: \let\checkinserts\empty \newsaveins\footins \newsaveins\margin % @image. We use the macros from epsf.tex to support this. % If epsf.tex is not installed and @image is used, we complain. % % Check for and read epsf.tex up front. If we read it only at @image % time, we might be inside a group, and then its definitions would get % undone and the next image would fail. \openin 1 = epsf.tex \ifeof 1 \else % Do not bother showing banner with epsf.tex v2.7k (available in % doc/epsf.tex and on ctan). \def\epsfannounce{\toks0 = }% \input epsf.tex \fi \closein 1 % % We will only complain once about lack of epsf.tex. \newif\ifwarnednoepsf \newhelp\noepsfhelp{epsf.tex must be installed for images to work. It is also included in the Texinfo distribution, or you can get it from ftp://tug.org/tex/epsf.tex.} % \def\image#1{% \ifx\epsfbox\undefined \ifwarnednoepsf \else \errhelp = \noepsfhelp \errmessage{epsf.tex not found, images will be ignored}% \global\warnednoepsftrue \fi \else \imagexxx #1,,,,,\finish \fi } % % Arguments to @image: % #1 is (mandatory) image filename; we tack on .eps extension. % #2 is (optional) width, #3 is (optional) height. % #4 is (ignored optional) html alt text. % #5 is (ignored optional) extension. % #6 is just the usual extra ignored arg for parsing this stuff. \newif\ifimagevmode \def\imagexxx#1,#2,#3,#4,#5,#6\finish{\begingroup \catcode`\^^M = 5 % in case we're inside an example \normalturnoffactive % allow _ et al. in names % If the image is by itself, center it. \ifvmode \imagevmodetrue \nobreak\bigskip % Usually we'll have text after the image which will insert % \parskip glue, so insert it here too to equalize the space % above and below. \nobreak\vskip\parskip \nobreak \line\bgroup\hss \fi % % Output the image. \ifpdf \dopdfimage{#1}{#2}{#3}% \else % \epsfbox itself resets \epsf?size at each figure. \setbox0 = \hbox{\ignorespaces #2}\ifdim\wd0 > 0pt \epsfxsize=#2\relax \fi \setbox0 = \hbox{\ignorespaces #3}\ifdim\wd0 > 0pt \epsfysize=#3\relax \fi \epsfbox{#1.eps}% \fi % \ifimagevmode \hss \egroup \bigbreak \fi % space after the image \endgroup} % @float FLOATTYPE,LABEL,LOC ... @end float for displayed figures, tables, % etc. We don't actually implement floating yet, we always include the % float "here". But it seemed the best name for the future. % \envparseargdef\float{\eatcommaspace\eatcommaspace\dofloat#1, , ,\finish} % There may be a space before second and/or third parameter; delete it. \def\eatcommaspace#1, {#1,} % #1 is the optional FLOATTYPE, the text label for this float, typically % "Figure", "Table", "Example", etc. Can't contain commas. If omitted, % this float will not be numbered and cannot be referred to. % % #2 is the optional xref label. Also must be present for the float to % be referable. % % #3 is the optional positioning argument; for now, it is ignored. It % will somehow specify the positions allowed to float to (here, top, bottom). % % We keep a separate counter for each FLOATTYPE, which we reset at each % chapter-level command. \let\resetallfloatnos=\empty % \def\dofloat#1,#2,#3,#4\finish{% \let\thiscaption=\empty \let\thisshortcaption=\empty % % don't lose footnotes inside @float. % % BEWARE: when the floats start float, we have to issue warning whenever an % insert appears inside a float which could possibly float. --kasal, 26may04 % \startsavinginserts % % We can't be used inside a paragraph. \par % \vtop\bgroup \def\floattype{#1}% \def\floatlabel{#2}% \def\floatloc{#3}% we do nothing with this yet. % \ifx\floattype\empty \let\safefloattype=\empty \else {% % the floattype might have accents or other special characters, % but we need to use it in a control sequence name. \indexnofonts \turnoffactive \xdef\safefloattype{\floattype}% }% \fi % % If label is given but no type, we handle that as the empty type. \ifx\floatlabel\empty \else % We want each FLOATTYPE to be numbered separately (Figure 1, % Table 1, Figure 2, ...). (And if no label, no number.) % \expandafter\getfloatno\csname\safefloattype floatno\endcsname \global\advance\floatno by 1 % {% % This magic value for \thissection is output by \setref as the % XREFLABEL-title value. \xrefX uses it to distinguish float % labels (which have a completely different output format) from % node and anchor labels. And \xrdef uses it to construct the % lists of floats. % \edef\thissection{\floatmagic=\safefloattype}% \setref{\floatlabel}{Yfloat}% }% \fi % % start with \parskip glue, I guess. \vskip\parskip % % Don't suppress indentation if a float happens to start a section. \restorefirstparagraphindent } % we have these possibilities: % @float Foo,lbl & @caption{Cap}: Foo 1.1: Cap % @float Foo,lbl & no caption: Foo 1.1 % @float Foo & @caption{Cap}: Foo: Cap % @float Foo & no caption: Foo % @float ,lbl & Caption{Cap}: 1.1: Cap % @float ,lbl & no caption: 1.1 % @float & @caption{Cap}: Cap % @float & no caption: % \def\Efloat{% \let\floatident = \empty % % In all cases, if we have a float type, it comes first. \ifx\floattype\empty \else \def\floatident{\floattype}\fi % % If we have an xref label, the number comes next. \ifx\floatlabel\empty \else \ifx\floattype\empty \else % if also had float type, need tie first. \appendtomacro\floatident{\tie}% \fi % the number. \appendtomacro\floatident{\chaplevelprefix\the\floatno}% \fi % % Start the printed caption with what we've constructed in % \floatident, but keep it separate; we need \floatident again. \let\captionline = \floatident % \ifx\thiscaption\empty \else \ifx\floatident\empty \else \appendtomacro\captionline{: }% had ident, so need a colon between \fi % % caption text. \appendtomacro\captionline{\scanexp\thiscaption}% \fi % % If we have anything to print, print it, with space before. % Eventually this needs to become an \insert. \ifx\captionline\empty \else \vskip.5\parskip \captionline % % Space below caption. \vskip\parskip \fi % % If have an xref label, write the list of floats info. Do this % after the caption, to avoid chance of it being a breakpoint. \ifx\floatlabel\empty \else % Write the text that goes in the lof to the aux file as % \floatlabel-lof. Besides \floatident, we include the short % caption if specified, else the full caption if specified, else nothing. {% \atdummies % since we read the caption text in the macro world, where ^^M % is turned into a normal character, we have to scan it back, so % we don't write the literal three characters "^^M" into the aux file. \scanexp{% \xdef\noexpand\gtemp{% \ifx\thisshortcaption\empty \thiscaption \else \thisshortcaption \fi }% }% \immediate\write\auxfile{@xrdef{\floatlabel-lof}{\floatident \ifx\gtemp\empty \else : \gtemp \fi}}% }% \fi \egroup % end of \vtop % % place the captured inserts % % BEWARE: when the floats start float, we have to issue warning whenever an % insert appears inside a float which could possibly float. --kasal, 26may04 % \checkinserts } % Append the tokens #2 to the definition of macro #1, not expanding either. % \def\appendtomacro#1#2{% \expandafter\def\expandafter#1\expandafter{#1#2}% } % @caption, @shortcaption % \def\caption{\docaption\thiscaption} \def\shortcaption{\docaption\thisshortcaption} \def\docaption{\checkenv\float \bgroup\scanargctxt\defcaption} \def\defcaption#1#2{\egroup \def#1{#2}} % The parameter is the control sequence identifying the counter we are % going to use. Create it if it doesn't exist and assign it to \floatno. \def\getfloatno#1{% \ifx#1\relax % Haven't seen this figure type before. \csname newcount\endcsname #1% % % Remember to reset this floatno at the next chap. \expandafter\gdef\expandafter\resetallfloatnos \expandafter{\resetallfloatnos #1=0 }% \fi \let\floatno#1% } % \setref calls this to get the XREFLABEL-snt value. We want an @xref % to the FLOATLABEL to expand to "Figure 3.1". We call \setref when we % first read the @float command. % \def\Yfloat{\floattype@tie \chaplevelprefix\the\floatno}% % Magic string used for the XREFLABEL-title value, so \xrefX can % distinguish floats from other xref types. \def\floatmagic{!!float!!} % #1 is the control sequence we are passed; we expand into a conditional % which is true if #1 represents a float ref. That is, the magic % \thissection value which we \setref above. % \def\iffloat#1{\expandafter\doiffloat#1==\finish} % % #1 is (maybe) the \floatmagic string. If so, #2 will be the % (safe) float type for this float. We set \iffloattype to #2. % \def\doiffloat#1=#2=#3\finish{% \def\temp{#1}% \def\iffloattype{#2}% \ifx\temp\floatmagic } % @listoffloats FLOATTYPE - print a list of floats like a table of contents. % \parseargdef\listoffloats{% \def\floattype{#1}% floattype {% % the floattype might have accents or other special characters, % but we need to use it in a control sequence name. \indexnofonts \turnoffactive \xdef\safefloattype{\floattype}% }% % % \xrdef saves the floats as a \do-list in \floatlistSAFEFLOATTYPE. \expandafter\ifx\csname floatlist\safefloattype\endcsname \relax \ifhavexrefs % if the user said @listoffloats foo but never @float foo. \message{\linenumber No `\safefloattype' floats to list.}% \fi \else \begingroup \leftskip=\tocindent % indent these entries like a toc \let\do=\listoffloatsdo \csname floatlist\safefloattype\endcsname \endgroup \fi } % This is called on each entry in a list of floats. We're passed the % xref label, in the form LABEL-title, which is how we save it in the % aux file. We strip off the -title and look up \XRLABEL-lof, which % has the text we're supposed to typeset here. % % Figures without xref labels will not be included in the list (since % they won't appear in the aux file). % \def\listoffloatsdo#1{\listoffloatsdoentry#1\finish} \def\listoffloatsdoentry#1-title\finish{{% % Can't fully expand XR#1-lof because it can contain anything. Just % pass the control sequence. On the other hand, XR#1-pg is just the % page number, and we want to fully expand that so we can get a link % in pdf output. \toksA = \expandafter{\csname XR#1-lof\endcsname}% % % use the same \entry macro we use to generate the TOC and index. \edef\writeentry{\noexpand\entry{\the\toksA}{\csname XR#1-pg\endcsname}}% \writeentry }} \message{localization,} % and i18n. % @documentlanguage is usually given very early, just after % @setfilename. If done too late, it may not override everything % properly. Single argument is the language abbreviation. % It would be nice if we could set up a hyphenation file here. % \parseargdef\documentlanguage{% \tex % read txi-??.tex file in plain TeX. % Read the file if it exists. \openin 1 txi-#1.tex \ifeof 1 \errhelp = \nolanghelp \errmessage{Cannot read language file txi-#1.tex}% \else \input txi-#1.tex \fi \closein 1 \endgroup } \newhelp\nolanghelp{The given language definition file cannot be found or is empty. Maybe you need to install it? In the current directory should work if nowhere else does.} % @documentencoding should change something in TeX eventually, most % likely, but for now just recognize it. \let\documentencoding = \comment % Page size parameters. % \newdimen\defaultparindent \defaultparindent = 15pt \chapheadingskip = 15pt plus 4pt minus 2pt \secheadingskip = 12pt plus 3pt minus 2pt \subsecheadingskip = 9pt plus 2pt minus 2pt % Prevent underfull vbox error messages. \vbadness = 10000 % Don't be so finicky about underfull hboxes, either. \hbadness = 2000 % Following George Bush, just get rid of widows and orphans. \widowpenalty=10000 \clubpenalty=10000 % Use TeX 3.0's \emergencystretch to help line breaking, but if we're % using an old version of TeX, don't do anything. We want the amount of % stretch added to depend on the line length, hence the dependence on % \hsize. We call this whenever the paper size is set. % \def\setemergencystretch{% \ifx\emergencystretch\thisisundefined % Allow us to assign to \emergencystretch anyway. \def\emergencystretch{\dimen0}% \else \emergencystretch = .15\hsize \fi } % Parameters in order: 1) textheight; 2) textwidth; % 3) voffset; 4) hoffset; 5) binding offset; 6) topskip; % 7) physical page height; 8) physical page width. % % We also call \setleading{\textleading}, so the caller should define % \textleading. The caller should also set \parskip. % \def\internalpagesizes#1#2#3#4#5#6#7#8{% \voffset = #3\relax \topskip = #6\relax \splittopskip = \topskip % \vsize = #1\relax \advance\vsize by \topskip \outervsize = \vsize \advance\outervsize by 2\topandbottommargin \pageheight = \vsize % \hsize = #2\relax \outerhsize = \hsize \advance\outerhsize by 0.5in \pagewidth = \hsize % \normaloffset = #4\relax \bindingoffset = #5\relax % \ifpdf \pdfpageheight #7\relax \pdfpagewidth #8\relax \fi % \setleading{\textleading} % \parindent = \defaultparindent \setemergencystretch } % @letterpaper (the default). \def\letterpaper{{\globaldefs = 1 \parskip = 3pt plus 2pt minus 1pt \textleading = 13.2pt % % If page is nothing but text, make it come out even. \internalpagesizes{46\baselineskip}{6in}% {\voffset}{.25in}% {\bindingoffset}{36pt}% {11in}{8.5in}% }} % Use @smallbook to reset parameters for 7x9.25 trim size. \def\smallbook{{\globaldefs = 1 \parskip = 2pt plus 1pt \textleading = 12pt % \internalpagesizes{7.5in}{5in}% {\voffset}{.25in}% {\bindingoffset}{16pt}% {9.25in}{7in}% % \lispnarrowing = 0.3in \tolerance = 700 \hfuzz = 1pt \contentsrightmargin = 0pt \defbodyindent = .5cm }} % Use @smallerbook to reset parameters for 6x9 trim size. % (Just testing, parameters still in flux.) \def\smallerbook{{\globaldefs = 1 \parskip = 1.5pt plus 1pt \textleading = 12pt % \internalpagesizes{7.4in}{4.8in}% {-.2in}{-.4in}% {0pt}{14pt}% {9in}{6in}% % \lispnarrowing = 0.25in \tolerance = 700 \hfuzz = 1pt \contentsrightmargin = 0pt \defbodyindent = .4cm }} % Use @afourpaper to print on European A4 paper. \def\afourpaper{{\globaldefs = 1 \parskip = 3pt plus 2pt minus 1pt \textleading = 13.2pt % % Double-side printing via postscript on Laserjet 4050 % prints double-sided nicely when \bindingoffset=10mm and \hoffset=-6mm. % To change the settings for a different printer or situation, adjust % \normaloffset until the front-side and back-side texts align. Then % do the same for \bindingoffset. You can set these for testing in % your texinfo source file like this: % @tex % \global\normaloffset = -6mm % \global\bindingoffset = 10mm % @end tex \internalpagesizes{51\baselineskip}{160mm} {\voffset}{\hoffset}% {\bindingoffset}{44pt}% {297mm}{210mm}% % \tolerance = 700 \hfuzz = 1pt \contentsrightmargin = 0pt \defbodyindent = 5mm }} % Use @afivepaper to print on European A5 paper. % From romildo@urano.iceb.ufop.br, 2 July 2000. % He also recommends making @example and @lisp be small. \def\afivepaper{{\globaldefs = 1 \parskip = 2pt plus 1pt minus 0.1pt \textleading = 12.5pt % \internalpagesizes{160mm}{120mm}% {\voffset}{\hoffset}% {\bindingoffset}{8pt}% {210mm}{148mm}% % \lispnarrowing = 0.2in \tolerance = 800 \hfuzz = 1.2pt \contentsrightmargin = 0pt \defbodyindent = 2mm \tableindent = 12mm }} % A specific text layout, 24x15cm overall, intended for A4 paper. \def\afourlatex{{\globaldefs = 1 \afourpaper \internalpagesizes{237mm}{150mm}% {\voffset}{4.6mm}% {\bindingoffset}{7mm}% {297mm}{210mm}% % % Must explicitly reset to 0 because we call \afourpaper. \globaldefs = 0 }} % Use @afourwide to print on A4 paper in landscape format. \def\afourwide{{\globaldefs = 1 \afourpaper \internalpagesizes{241mm}{165mm}% {\voffset}{-2.95mm}% {\bindingoffset}{7mm}% {297mm}{210mm}% \globaldefs = 0 }} % @pagesizes TEXTHEIGHT[,TEXTWIDTH] % Perhaps we should allow setting the margins, \topskip, \parskip, % and/or leading, also. Or perhaps we should compute them somehow. % \parseargdef\pagesizes{\pagesizesyyy #1,,\finish} \def\pagesizesyyy#1,#2,#3\finish{{% \setbox0 = \hbox{\ignorespaces #2}\ifdim\wd0 > 0pt \hsize=#2\relax \fi \globaldefs = 1 % \parskip = 3pt plus 2pt minus 1pt \setleading{\textleading}% % \dimen0 = #1 \advance\dimen0 by \voffset % \dimen2 = \hsize \advance\dimen2 by \normaloffset % \internalpagesizes{#1}{\hsize}% {\voffset}{\normaloffset}% {\bindingoffset}{44pt}% {\dimen0}{\dimen2}% }} % Set default to letter. % \letterpaper \message{and turning on texinfo input format.} % Define macros to output various characters with catcode for normal text. \catcode`\"=\other \catcode`\~=\other \catcode`\^=\other \catcode`\_=\other \catcode`\|=\other \catcode`\<=\other \catcode`\>=\other \catcode`\+=\other \catcode`\$=\other \def\normaldoublequote{"} \def\normaltilde{~} \def\normalcaret{^} \def\normalunderscore{_} \def\normalverticalbar{|} \def\normalless{<} \def\normalgreater{>} \def\normalplus{+} \def\normaldollar{$}%$ font-lock fix % This macro is used to make a character print one way in \tt % (where it can probably be output as-is), and another way in other fonts, % where something hairier probably needs to be done. % % #1 is what to print if we are indeed using \tt; #2 is what to print % otherwise. Since all the Computer Modern typewriter fonts have zero % interword stretch (and shrink), and it is reasonable to expect all % typewriter fonts to have this, we can check that font parameter. % \def\ifusingtt#1#2{\ifdim \fontdimen3\font=0pt #1\else #2\fi} % Same as above, but check for italic font. Actually this also catches % non-italic slanted fonts since it is impossible to distinguish them from % italic fonts. But since this is only used by $ and it uses \sl anyway % this is not a problem. \def\ifusingit#1#2{\ifdim \fontdimen1\font>0pt #1\else #2\fi} % Turn off all special characters except @ % (and those which the user can use as if they were ordinary). % Most of these we simply print from the \tt font, but for some, we can % use math or other variants that look better in normal text. \catcode`\"=\active \def\activedoublequote{{\tt\char34}} \let"=\activedoublequote \catcode`\~=\active \def~{{\tt\char126}} \chardef\hat=`\^ \catcode`\^=\active \def^{{\tt \hat}} \catcode`\_=\active \def_{\ifusingtt\normalunderscore\_} \let\realunder=_ % Subroutine for the previous macro. \def\_{\leavevmode \kern.07em \vbox{\hrule width.3em height.1ex}\kern .07em } \catcode`\|=\active \def|{{\tt\char124}} \chardef \less=`\< \catcode`\<=\active \def<{{\tt \less}} \chardef \gtr=`\> \catcode`\>=\active \def>{{\tt \gtr}} \catcode`\+=\active \def+{{\tt \char 43}} \catcode`\$=\active \def${\ifusingit{{\sl\$}}\normaldollar}%$ font-lock fix % If a .fmt file is being used, characters that might appear in a file % name cannot be active until we have parsed the command line. % So turn them off again, and have \everyjob (or @setfilename) turn them on. % \otherifyactive is called near the end of this file. \def\otherifyactive{\catcode`+=\other \catcode`\_=\other} \catcode`\@=0 % \backslashcurfont outputs one backslash character in current font, % as in \char`\\. \global\chardef\backslashcurfont=`\\ \global\let\rawbackslashxx=\backslashcurfont % let existing .??s files work % \rawbackslash defines an active \ to do \backslashcurfont. % \otherbackslash defines an active \ to be a literal `\' character with % catcode other. {\catcode`\\=\active @gdef@rawbackslash{@let\=@backslashcurfont} @gdef@otherbackslash{@let\=@realbackslash} } % \realbackslash is an actual character `\' with catcode other, and % \doublebackslash is two of them (for the pdf outlines). {\catcode`\\=\other @gdef@realbackslash{\} @gdef@doublebackslash{\\}} % \normalbackslash outputs one backslash in fixed width font. \def\normalbackslash{{\tt\backslashcurfont}} \catcode`\\=\active % Used sometimes to turn off (effectively) the active characters % even after parsing them. @def@turnoffactive{% @let"=@normaldoublequote @let\=@realbackslash @let~=@normaltilde @let^=@normalcaret @let_=@normalunderscore @let|=@normalverticalbar @let<=@normalless @let>=@normalgreater @let+=@normalplus @let$=@normaldollar %$ font-lock fix @unsepspaces } % Same as @turnoffactive except outputs \ as {\tt\char`\\} instead of % the literal character `\'. (Thus, \ is not expandable when this is in % effect.) % @def@normalturnoffactive{@turnoffactive @let\=@normalbackslash} % Make _ and + \other characters, temporarily. % This is canceled by @fixbackslash. @otherifyactive % If a .fmt file is being used, we don't want the `\input texinfo' to show up. % That is what \eatinput is for; after that, the `\' should revert to printing % a backslash. % @gdef@eatinput input texinfo{@fixbackslash} @global@let\ = @eatinput % On the other hand, perhaps the file did not have a `\input texinfo'. Then % the first `\{ in the file would cause an error. This macro tries to fix % that, assuming it is called before the first `\' could plausibly occur. % Also turn back on active characters that might appear in the input % file name, in case not using a pre-dumped format. % @gdef@fixbackslash{% @ifx\@eatinput @let\ = @normalbackslash @fi @catcode`+=@active @catcode`@_=@active } % Say @foo, not \foo, in error messages. @escapechar = `@@ % These look ok in all fonts, so just make them not special. @catcode`@& = @other @catcode`@# = @other @catcode`@% = @other @c Local variables: @c eval: (add-hook 'write-file-hooks 'time-stamp) @c page-delimiter: "^\\\\message" @c time-stamp-start: "def\\\\texinfoversion{" @c time-stamp-format: "%:y-%02m-%02d.%02H" @c time-stamp-end: "}" @c End: @c vim:sw=2: @ignore arch-tag: e1b36e32-c96e-4135-a41a-0b2efa2ea115 @end ignore gnuit-4.9.5/doc/gitfm.10000644000175000017500000000652011146671375011553 00000000000000.\" +---------- .\" | .\" | GITFM man page .\" | .\" | Copyright 1993-1999,2006-2007 Free Software Foundation, Inc. .\" | .\" | This file is part of GNUIT (GNU Interactive Tools) .\" | .\" | GNUIT 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 3, or (at your option) any later .\" | version. .\" | .\" | GNUIT 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 GNUIT; see the file COPYING. If not, see http://www.gnu.org/licenses/ .\" | .TH gitfm 1 .SH NAME gitfm \- GNU Interactive Tools File Manager .SH SYNTAX .I gitfm [options] [path1] [path2] .SH DESCRIPTION .I gitfm is a .B file system browser with some shell facilities which was designed to make your work easier and more efficient. The GNUIT package also contains .I gitps, an interactive process viewer/killer and .I gitview, a hex/ascii file viewer. .PP More extensive documentation on .I gitfm and the other .B gnuit tools is available in info format, try .I 'info gnuit'. .SH OPTIONS A summary of options is included below. For a complete description, see the Info files. .TP .B \-h Show summary of options. .TP .B \-v Show version of program. .TP .B \-c Use ANSI colours. .TP .B \-b Don't use ANSI colours. .TP .B \-l Don't use last screen character. .TP .B \-p Output the final path on exit .SH NOTE The main configuration file of the .I GNUIT package is .B "gnuitrc.TERM" where .B TERM is the value of the environment variable .BR "" ' TERM ' e.g for Linux console your environment contains something like .BR "" ' "TERM=linux" ' so the configuration file name is .BR "gnuitrc.linux" "." You can (and should) have a configuration file for each terminal type you use. If you customise git, the version of the config file in your home directory should have a leading ".", eg .BR ".gnuitrc.linux" "." .SH FILE-SYSTEM BROWSER .I gitfm is made of two panels. The left one and the right one. Each one contains a file system directory. You can browse the directory tree with the usual cursor keys and pressing .B ENTER when you want to enter or leave a directory. You may change the panels by pressing .BR TAB . See also .BR "BUILT-IN COMMANDS" . .SH INPUT LINE Under the two panels there is a shell like input line which you can use to type normal shell commands. The input line supports unlimited characters and keeps a history of the typed commands. gitfm uses the GNU history library for that. See also .BR "BUILT-IN COMMANDS" . .SH WARNINGS AND ERRORS REPORTING Under the input line there is a status bar. You can see there the status of the currently executed command, the warnings and errors and you will be prompted if a decision has to be taken. .SH BUGS Please send bug reports to: .br .I gnuit-dev@gnu.org .SH SEE ALSO termcap(5) terminfo(5) sh(1) ps(1) mount(8) umount(8) gitps(1) gitview(1) gitaction(1) gitmount(1) gitkeys(1) gitrgrep(1) gitunpack(1) .SH AUTHORS .I Tudor Hulubei .br .I Andrei Pitis .br .I Ian Beckwith (Current maintainer) gnuit-4.9.5/doc/dpkg-help.txt0000644000175000017500000000303211146671375012772 00000000000000Help for GNUIT's DPKG Commands Note: Commands expecting package names can be given .deb files, the package names will be extracted from the debs. Command Keys Argument Description ------- -------- ----------- DPKG-INSTALL ^C ^D i .deb files installs binary packages ^C ^D R i directories (recursive) DPKG-UNPACK ^C ^D u .deb files unpacks binary packages ^C ^D R u directories (recursive) DPKG-CONFIGURE ^C ^D C package names configure unpacked packages DPKG-REMOVE ^C ^D r package names remove installed packages from system DPKG-PURGE ^C ^D P package names purge installed packages from system DPKG-RECORDAVAIL ^C ^D A .deb files record binary packages in available file ^C ^D R A directories (recursive) DPKG-CONTENTS ^C ^D c .deb file list contents of a binary package DPKG-FIELD ^C ^D f .deb file [fields] show control fields in a binary package DPKG-INFO ^C ^D I .deb file information about a binary package DPKG-LISTPKGS ^C ^D l package names list installed packages DPKG-STATUS ^C ^D s package names status of installed packages DPKG-LISTFILES ^C ^D L package names list files owned by installed packages DPKG-SEARCH ^C ^D S file path search for package owning a file DPKG-PRINTAVAIL ^C ^D p package names details of package in available file gnuit-4.9.5/doc/gitinternal.10000644000175000017500000000535311146671375012770 00000000000000.\" Hey, EMACS: -*- nroff -*- .\" +---------- .\" | .\" | GITINTERNAL man page .\" | .\" | Copyright 1993-1999,2006-2007 Free Software Foundation, Inc. .\" | .\" | This file is part of GNUIT (GNU Interactive Tools) .\" | .\" | GNUIT 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 3, or (at your option) any later .\" | version. .\" | .\" | GNUIT 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 GNUIT; see the file COPYING. If not, see http://www.gnu.org/licenses/ .\" | .\" First parameter, NAME, should be all caps .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection .\" other parameters are allowed: see man(7), man(1) .TH GITINTERNAL 1 "Sep 30, 2007" .\" Please adjust this date whenever revising the manpage. .\" .\" Some roff macros, for reference: .\" .nh disable hyphenation .\" .hy enable hyphenation .\" .ad l left justify .\" .ad b justify to both left and right margins .\" .nf disable filling .\" .fi enable filling .\" .br insert line break .\" .sp insert n+1 empty lines .\" for manpage-specific macros, see man(7) .SH NAME gitwhich, gitmkdirs, gitxgrep \- Helper programs for gnuit .SH SYNOPSIS .B gitwhich .I file ... .br .B gitmkdirs .I path ... .br .B gitxgrep .I grepcmd args ... .SH DESCRIPTION This manual page documents briefly the .BR gitwhich ", " gitmkdirs " and " gitxgrep commands. These commands are internal to gnuit and should generally not be run directly. .PP .PP .TP .BI gitwhich " file ..." gitwitch returns with an exit status of 0 if any of its \fBfile\fP arguments exist in the PATH, otherwise it returns 1. .TP .BI gitmkdirs " path ..." Creates the directory \fBpath\fP and any required parent directories. .TP .BI gitxgrep " grepcmd args ..." Used as a helper script by \fBgitrgrep\fP(1), \fBgitregrep\fP(1), and \fBgitrfgrep\fP(1). Calls \fIgrepcmd\fP, passing \fIargs\fP to it. .PP .BR gitwhich ", " gitmkdirs " and " gitxgrep are part of \fBgnuit\fP, the GNU Interactive Tools. .SH SEE ALSO .BR gitfm (1) .PP \fBThese tools are documented fully in .IR "GNU Interactive Tools" , available via the Info system. .SH BUGS Please send bug reports to: .br .I gnuit-dev@gnu.org .SH AUTHORS .I Tudor Hulubei .br .I Andrei Pitis .br .I Ian Beckwith (Current maintainer) gnuit-4.9.5/NEWS0000644000175000017500000014766411146671375010334 00000000000000-*-outline-*-- GNU Interactive Tools ===================== * Version 4.9.5 ================ ** Increased version of Free Documentation License to 1.3 or later, still with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. ** Added filetype info for many more file extensions. Thanks to Tudor Hulubei (and Wikipedia). ** Portability fixes, thanks to James Rowe and Gerald Pfeifer. ** Filesize display: go straight to scaled numbers if number with commas doesn't fit. ** Fix free space display as root. ** gitaction: support xdg-open, kfmclient and exo-open. * Version 4.9.4 ================ ** New apropos command (^X^A) for key-binding search. ** Environment variables used by gnuit now start with GNUIT_ rather than GIT_ (eg GNUIT_PAGER, GNUIT_BROWSER, etc.). The old names are still accepted for backwards compatibility. ** Rewrote gitaction, adding more file types and viewers. ** Fixed input in incremental-search mode. ** Use base 1024 when autoscaling. ** More fixes to large file support. * Version 4.9.3 ================ ** Fixed MacOS support. ** Fixed large file support on 32bit systems. ** On install, remove files belonging to earlier versions. ** gitfm: Scale file sizes when needed to fit available space. ** gitfm: New panel minor mode AbbrevSize: Always scale file sizes (to e.g. 123M). Accessed with escape-e-S (panel-enable-abbrevsize). ** New config variables: GroupDigits, MaxUnscaledDigits. ** Fix parsing of comments in config files. ** gitaction: Added more viewers; If no explicit action defined for filetype, falls back to see(1), metamail(1), [on MacOS] open(1), and finally $GIT_PAGER. ** Added explicit license notice to many files. * Version 4.9.2 ================ ** Renamed package to gnuit. ** Renamed git file manager binary to gitfm. A transitional script to warn users is installed unless configured otherwise with ./configure --disable-transition. Config file sections now start with "[GITFM-", but "[GIT-" is still accepted. ** Dropped leading dots from system copies of gitrc files, and renamed them to gnuitrc.* Files in home directory still start with ".". ~/.gitrc.TERM will be tried as a fallback if ~/.gnuitrc.TERM doesn't exist. ** Changed code license to GPL version 3 (see COPYING). and documentation license to GFDL 1.2 with no Invariant Sections, no Front-Cover Texts and no Back-Cover Texts. ** Added 64bit I/O support from Tudor Hulubei. ** New terminals: rxvt-unicode, linux-m, cygwin, Eterm. ** Added commands to manipulate .deb files (Thanks to Bruce Sass). ** Support comparing special files in gitfm. ** Restore screen when exiting. ** Fix copying symlinks. ** Add mail checking to title. ** gitps: added numbers as key bindings for signal selection. ** Fixed a scrolling inconsistency in gitview (Tudor Hulubei). ** Fixed a segmentation fault related to directory names containing printf-like sequences (Tudor Hulubei). ** Fixed a segmentation fault in gitps when killed process left you off the end of the list. ** Moved the info and documentation files in /usr/share (Tudor Hulubei). ** Fixed a problem with gitps (refresh was resetting the signal type to SIGTERM) (Tudor Hulubei). ** gitps: added RefreshAfterKill variable (Default: ON), to autorefresh after signalling a process. ** gitps: add horizontal scroll (ESC-g & ESC-J). ** Documentation fixes (Some from Tudor Hulubei). * Version 4.3.20 ================ ** Moving across filesystems now preserves file ownership. ** Copying no longer preserves file ownership. ** F7 (`make-directory') creates all the intermediate directories. ** Fixed a long standing bug in the xid code for long user names (I could finally reproduce it myself). ** Fixed a crash in the incremental search code. * Version 4.3.19 ================ ** Fixed 2 compilation problems on non-ANSI C compilers. ** Minor fixes in gitaction. * Version 4.3.18 ================ ** The build/installation procedure is now based on automake. ** `make prefix=some_path' no longer recompiles git. According to the new GNU coding standards this is the correct behaviour. ** The key sequence typed so far is displayed in the status bar, if not completed in one second. ** `select-extension'/`unselect-extension': new builtin commands, bound on `Alt-+'/`Alt--' (or `ESC +'/`ESC -'). These commands select/unselect all the files in the current directory that have the same extension as the current file. That is, if the current file is "git.c", `select-extension' will select all the "*.c" files in the current directory. If the current file does not have an extension (including the case where its name starts with a dot), no selections/unselections are made. ** The insertion of file/directory names in the command line (Alt-Enter) is a little bit smarter. Quotes are added only when necessary and when before the current possition there is a /, no space is added before the name, to allow for path building. ** The incremental forward/backwards search mechanism can recall the last searched string if the user types ^S/^R while the string is empty. This is similar to what Emacs does. ** F2 works on *.pgp files (will ask for a passphrase). ** `ESC m f' mounts the first floppy in /mnt/floppy. `ESC r f' unmounts it. ** A simple scroll-bar thumb (#) has been added on the right side of the panel's frame. ** The shell command currently being executed is displayed on the title of the xterm window. ** GIT_BROWSER: new environment variable. If set, git will use this to view html documents. If GIT_BROWSER is not set, lynx will be used instead. ** A more Unix like key sequence structure in gitps and gitview. You can scroll up and down with `Space' and `Backspace' and quit with `q'. ** Binary file split on `^C /' and (in background) on `^C b /'. ** The inconsistency between the keys and the signal names in gitps have been fixed. Signal selection is done with upper case letters only. ** Other bug fixes. * Version 4.3.17 ================ ** Many fixes and updates. ** Bzip2 compression on `^C .'. ** `^C -' creates a .tar.bz2 archive of the current directory. `^C b -' does the same thing in background. ** `Alt-m z' and `Alt-r z' (or `ESC m z' and `ESC r z') will mount/unmount the ZIP drive, provided you link /mnt/zip to the appropriate device in /dev. ** `Alt-m j' and `Alt-r j' (or `ESC m j' and `ESC r j') will mount/unmount the JAZ drive, provided you link /mnt/jaz to the appropriate device in /dev. ** HTML doclumentation included, installed in $(prefix)/lib/git/html. If lynx is installed, `^X h' will point it to the right place. ** Tested on Solaris 2.6. ** Ported to IRIX 6.3 (mips-sgi-irix6.3) (TERM=iris-ansi). ** Ported to UNIX System V 4.0 (i486-pc-sysv4.0). ** If possible, `git' will print the current path on the title of xterm terminal emulators. `gitps' will print the ps(1) options used, and `gitview' will print the name of the file it is currently viewing. ** GENERIC-UNPACK: New command that unifies archive unpacking. It unpacks archives based on the extension of the file by calling the `gitunpack' script to do the job. Currently the `gitunpack' script is able to handle *.tar, *.tar.gz, *.tar.bz, *.tar.bz2, *.tar.Z, *.Z, *.gz, *.bz, *.bz2, *.zip, *.jar, *.arg, *.rar, *.shar, *.deb, *.lha, *.lzh, *.uu and *.a. The binding for GENERIC-UNPACK is `^C X' - the one used before for UNCOMPRESS-UNTAR which is obsolete and has been removed (together with B-UNCOMPRESS-UNTAR, UNTAR and B-UNTAR). ** It is possible to unpack an archive into a given directory, using GENERIC-UNPACK-INTO (^CV or ^CbV for the background version). If the directory does not exist, it is created. Thanks to Viorel Anghel for suggesting this. ** gitunpack (^CX, ^CbX) will unpack all the selected files. ** The rpm-related commands (^CI, ^CbI, ^Ci, ^Cbi, ^CN, ^CbN) will now act (install, uninstall, upgrade) on all the selected files. ** Added command line options. Try `git -h', `gitps -h' and `gitview -h' for details. ** `git' will use colors if the COLORTERM environment variable is defined. ** `git' now accepts starting directories in the command line. ** For the MS-DOS die-hards: I added support for making the shell `chdir' to the path `git' was in before exiting. `bash' users need to use this shell function: function g { git -p $@ 3> /tmp/git.p.$$ if test -s /tmp/git.p.$$; then if test -d "`cat /tmp/git.p.$$`"; then cd "`cat /tmp/git.p.$$`" else cd fi fi rm -f /tmp/git.p.$$ } Notice that this won't work if `git' is suspended and then resumed (the `cd' command in the script will be executed immediately after `git' is suspended, not after it exits). ** It is now possible to specify a list of patterns to the `+' and `-' commands, thanks to "Viorel ANGHEL ". For instance, typing `+ *.java' in the command line will select all the java files (in addition to whatever files were currently selected). ** Support for SIGWINCH has been added. `git' can be resized at will, regardless of whether it is currently doing something or not. ** Better support for suspending `git'. `git' can now be suspended at any time, including while it is doing something (like copying files, etc). Also before `git' launches new programs, it will set the SIGTSTP handler to SIG_IGN. Well behaved programs ((X)Emacs, ncftp, the GNU shell utile, etc.) will notice this and ignore suspend signals as well. ** refresh now works even during incremental searches & input line reads (like make-directory, etc.). ** After changing the sorting method, `git' will reposition on the panel entry that was the _current_ entry before the sorting. A similar repositioning attempt is performed after creating new directories in the current directory. ** It is now possible to view the names of those files/directories that do not fit into the panel's visible area by using the `horizontal-scroll-left' and `horizontal-scroll-right' commands, bound on Alt-g and Alt-j (or `ESC g' and `ESC j' if you don't have a working Alt key). ** The clock is back, with a (hopefully) safer implementation. ** gitmount accepts a list of devices to mount (as usual, without the /dev/prefix). Also it is possible to select several directories in /mnt (corresponding to devices) and mount/umount all of them with `ESC m t' and `ESC r t'. * Version 4.3.16 ================ ** Minor fixes and updates. * Version 4.3.15 ================ ** MIME-PACK, B-MIME-PACK, MIME-UNPACK, B-MIME-UNPACK - new user defined commands that pack/unpack mime files. The corresponding key bindings are: ^Ck, ^Cbk, ^CK and ^CbK. The mpack package should be installed in order for these to work. ** MIME-MAIL, B-MIME-MAIL - new user defined commands that can send files by mail as mime messages. The corresponding key bindings are: ^C2m and ^Cb2m. The mpack package is required for these ones as well. ** FAST-DIFF - new user defined command (on ^Cfd). Calls diff -r -q and reports differences between directories in terms of files that differ, but does not report the actual differences between them. ** Added support for *.mov to gitaction. ** Added support for bin packing (i.e. packing files in the smallest number of bins). See the info documentation for details. ** Some user defined commands now protect "weird" file names with the POSIX specified `--' argument that terminates all options. Thus for some commands the errors that used to occur when dealing with file names beginning with a hyphen are now fixed, depending on whether or not that particular command supports the `--' argument. For the ones that don't (emacs, ghostview, tar, basename, ar, xv, xanim, xfig, lynx, mpeg_play, zip/unzip, ispell, etc), there is nothing I can do. GIT cannot check whether or not programs actually do support this POSIX feature. ** `git' now works with gzip only. Support for `compress' as an alternative has been removed. Most archives today are in `gzip' format anyway. ** Multiple patterns are accepted on `select-files-matching-pattern'. The patterns are separated by spaces. Spaces and \s should be escaped with a \ if part of the pattern. ** Bug fixes. * Version 4.3.14 ================ ** Added support for exec_prefix. ** Added support for make prefix=... ** Added support for most of the commands provided in the mtools package. See the ^Cm prefixes in term/.gitrc.common. ** File comparison is now built-in (on ^C B, as usual). gitcmp is gone. ** Added support for the xhost command on ^X H. ** Bug fixes. * Version 4.3.13 ================ ** Ported to AT&T 3B2 systems, thanks to Gaylen Miller . ** Under RedHat Linux 4.0 the rxvt terminal emulator exports TERM=xterm-color which makes it possible to figure out that we have color support. GIT now supports xterm-color as well. ** M-. (ESC .) works better in the sense that it goes up to the previous directory and automatically positions on the entry corresponding to the old directory. ** ^CI installs the RPM package under the cursor. ** ^Ci uninstalls the RPM package under the cursor. ** ^CN upgrades the RPM package under the cursor. ** ^Cq queries the `rpm' package manager. These commands also have background versions: ^CbI, ^Cbi and ^CbN. ** Tested on NetBSD 1.2. ** Fixes to make GIT compile cleanly to some new architectures thanks to Nelson H. F. Beebe . ** Minor changes/fixes. * Version 4.3.12 ================ ** Added recursive context diffs on ^Cd and ^Cbd (background). See the documentation for details. ** ^G behaves better as an interrupt key. ** Added support for meta keys with the 8th bit set. ** The commands binded on the function keys are now to the M-number (ESC + number) key sequence as well. ESC + 1 and ESC + 2 which used to chdir to the /mnt/fdX directories have been moved on ESC ESC 1 and ESC ESC 2. ** `git' can now compare directories: ^Ccq will quickly compare the file names, sizes and time stamps while ^Cct will thoroughly compare the contents of each file with the contents of its couterpart (if any) from the other panel. ** `name-upcase' & `name-downcase': New builtin functions for renaming the selected entries to uppercase & lowercase. ** GIT compiles out of the box under the Hurd. ** Many minor fixes. * Version 4.3.11 ================ ** An installation problem has been fixed. GIT no longer attempts to change the permissions of directories. ** backward-kill-word is now on ESC Ctrl-H as well. ** The `install' rule now depends on `all', which means you can type `make install' and get the entire package compiled and installed. ** There is now a separate rule called install-only that you can use to install GIT without re-checking the dependencies. ** The install_strip rule has been renamed to install-strip. * Version 4.3.10 ================ ** Ported to qnx 4.22 thanks to Michael Hunter . ** Ported to B.O.S 02.01 (Bull Operating System - m68k-bull-sysv3). ** Panels are no longer redrawn immediately after commands started from the command line or by pressing RETURN on the executable. Most users seem to prefer it this way. ** Ported to Next Step 3.2 - m68k-next-nextstep3: NeXT Mach 3.2: Mon Oct 18 21:57:41 PDT 1993; root(rcbuilder):mk-149.30.15.obj~2/RC_m68k/RELEASE_M68K Processor type: MC680x0 (68040) thanks to Paul Nevai ** The file system free space is displayed in a more intuitive way, i.e. 8,881,152 instead of 8881152. The same thing holds for the sum of selected files. ** Bug fixes. ** Support for the AIX hft teminal, thanks to Andrei Caraman . ** New inputline functions (inspired from the emacs counterparts): FUNCTION BINDING ACTION ======================================================================= kill-word ESC d (M-d) delete next word downcase-word ESC l (M-l) convert next word to lower case upcase-word ESC u (M-l) convert next word to upper case capitalize-word ESC c (M-l) capitalize next word Unfortunately, this has lots of side effects: *** panel-display-* names & the corresponding bindings have been changed: - ESC e a = panel-enable-all (previously called panel-display-all) - ESC e d = panel-enable-date-time (previously called panel-display-date-time) - ESC e f = panel-enable-full-name (previously called panel-display-full-name) - ESC e m = panel-enable-mode (previously called panel-display-mode) - ESC e o = panel-enable-owner-group (previously called panel-display-owner-group) - ESC e s = panel-enable-size (previously called panel-display-size) *** conform-*-directory names & the corresponding bindings have been changed: - ESC a c adapt-current-directory (previously called conform-current-directory) - ESC a o adapt-other-directory (previously called conform-other-directory) *** the user defined UMOUNT bindings have been changed: - ESC r a remove (umount) /dev/fd0 - ESC r b remove (umount) /dev/fd1 - ESC r t remove (umount) the fs under the current directory ** As you can see, 4 lines of new features, 11 of side effects. Sorry about this changes, but at the time I decided to use the previous bindings I had no idea how wonderful emacs is :-). * Version 4.3.9 =============== ** A bug introduced in 4.3.8 has been fixed. ** Better handling of `aixterm' terminal emulators under AIX. * Version 4.3.8 =============== ** A few bugs have been fixed and some slow algorithms have been speed up. ** I have tested `git' on our recently installed NFS volume and tried to fix the related problems. I don't know whether or not I have fixed all of them. Please let me know if it works for you. ** The default ANSI colors are correctly restored under color_xterm, rxvt and most likely under any other (bug free :-) ANSI capable terminal or terminal emulator. ** New commands in .gitrc.common. ** Fti matching is delayed until needed. ** gitrgrep & Co. use 'find' to walk through the file system tree. ** gitregrep and gitfgrep will call egrep and fgrep recursively. ** The clock is gone. There were too many races. Sorry guys :-( Type ^XT to get the current date/time (DATE). ** Better terminal optimizations and terminal I/O. It should work a faster on almost every terminal. ** The gitaction script has been improved. It is now able to handle compressed movies and accepts uppercase extensions for all image types. Also, all the actions on C, C++, PGP, LEX, YACC, make files have been removed. Compiling the current file was a little bit silly since most .c files are part of bigger projects and compiling them separately is useless. ** Many new file types are now detected in the [GIT-FTI] section. If `git' seems slow due to the fact that about 300 file patterns are matched for each file entry displayed, consider setting TypeSensitivity to OFF or removing some of the unnecessary patterns from .gitrc.common's [GIT-FTI] section. However, 4.3.8 should work much better than 4.3.7 since the patterns are matched only when necessary and no more than once. ** The ./configure option for requesting the terminfo library is now --with-terminfo. The previous option (--enable-terminfo) is no longer supported. ** A bug preventing users from defining their own colors in the [GIT-FTI] section of their ~/.gitrc.TERM file has been fixed thanks to Marian Ciobanu . ** The delay at the end of the file type sensitive action executed by the gitaction script has been removed. This was annoying, especially under X when starting viewers in background. ** Even though the default .gitrc.xterm is still configured with AnsiColors = OFF, it is highly recommended to set it to ON on terminal emulators that have ANSI colors support (aixterm under AIX, xterm under ULTRIX, color_xterm & rxvt under Linux). ** `git' no longer attempts to execute empty commands at the command prompt (that is, commands that contain only spaces and semi-columns. This is not a bug, is a feature :-) ** Philippe De Muyter ported GIT 4.3.7 to sysV68 R3V7.1 (m68k-motorola-sysv). I have integrated his patch into 4.3.8. * Version 4.3.7 =============== ** Few improvements, mostly fixes. All the compilation/installation problems reported in 4.3.6 have been fixed (I hope :-). ** RUMORS, RUMORS, RUMORS, .... it've heard that newer Linux systems use "linux" instead of "console" for the TERM environment variable. Due to this, I've linked .gitrc.linux to .gitrc.console. I'm not sure if it will really be useful, but it won't hurt. ** `git' can now display files using different colors, depending on their types as specified by the [GIT-FTI] section (FTI stands for file type information). See .gitrc.common for more details. If you don't want/like colors, they can be disabled by setting the TypeSensitivity variable to OFF. Note that I've considered more important to emphasize the file type and *NOT* the fact that it is compressed. That means that foo.c and foo.c.gz will be displayed using the same color. Of course, this approach can be changed by modifying the configuration file... ** GIT_PAGER is a new environment variable that replaces "more" in all the user defined commands described in the configuration files. If your system has "less", just add GIT_PAGER=less to your environment. By default GIT_PAGER='more'. gitaction & .gitaction use GIT_PAGER too. ** conform-current-directory & conform-other-directory now save the new directory into the directory history. ** Faster startup. ** ^C= now performs recursive diff. ** `flip' is the default action for *.fli and *.flc. See gitaction for details. ** tty.c now uses /dev/vcsa to dump/restore the screen. The ioctl() system call is no longer used. You should have the right to r/w the corresponding /dev/vcsaX since I don't like setuids, and I also think that the appropriate permission/owner should be set by the login utility in the same way as for /dev/ttyX. Until then, if you are on a single-user machine or you don't care much about security, you can give unrestricted r/w permission on /dev/vcsaX. * Version 4.3.6 =============== ** Added scroll step. A new built-in function (set-scroll-step) lets you modify the panel scroll step. It is also possible to set it in the configuration file using the StartupScrollStep variable. The built-in function set-scroll-step is binded on ^XP. ** Added incremental search. The built-in functions isearch-backward and isearch-forward are mapped on ^S and ^R (as in emacs). If the hardware doesn't let you change the default meaning of ^S, you can use the alternate key sequences ^Xs and ^Xr. Wrapped isearch is also provided. ** select-file has been moved on ^T since ^R is now used for isearch-backward. You can also use Ctrl-\ (^\) for select-file (if available). Sorry, I promise that this is the last time I am moving this one :-). Anyway, if you are using Linux, you can continue to press the 'Insert' key. ** Verdoolaege Sven has contributed an enhanced gitaction script. Default actions are now available for many new file extensions: zip, arj, rar, mod, s3m, voc, wav, lsm, jpeg, mpg, ps, dvi and tex. I also added support for compressed and uncompressed manual pages. ** A bug in getting the size of symbolic links has been fixed. Only symbolic links with no target have been affected. ** It is now possible to have a command with no body, still being able to chdir to the directory specified in the configuration line. You can switch between directories much faster. A command name is still required. - M-/ (ESC-/, Alt-/ under Linux) goes to / - M-. (ESC-., Alt-. under Linux) goes to .. - M-h (ESC-h, Alt-h under Linux) goes to $HOME - M-i (ESC-i, Alt-i under Linux) goes to /usr/include ** Han Holl made gitrgrep work on SCO 3.2 V 4.2. He also reported some other problems under SCO. See the PROBLEMS file. ** Alexander Jolk requested that the Makefiles makes no provisions in order not to display the commands. Done. ** Preformatted manual pages are no longer part of the distribution. In fact, manual pages have not been updated in this version. The GNU projects seems to consider them obsolete, and I think that updating only the info file will be enough. Each release will have a decent set of manual pages, but only to figure out what it is all about, not as a reliable source of information about GIT. ** A directory history is provided, making it easy to switch between directories within a given set. If you change the current directory with ^Xd or you specify a new-dir field to a command, the directory is added to the directory history. You can switch to the previous directory with ^X^P, to the next directory with ^X^N and you can reset the entire directory history with ^X^R. After reseting the directory history, the current directory is automatically added to it. ** A new variable (ConfirmOnExit) has been added to the [GIT-Setup] section, allowing you to specify if you want to be asked for confirmation at exit. The default is not to be asked for confirmation. ** Added tilde expansion on 'copy' and on 'move'. It should have been there from the very beginning. ** make-directory no longer expect a base-name. The directory name is tilde_expand()-ed and then created, if possible. ** The FIND function no longer asks for the start directory. It simply ask the file name and starts searching it from the current directory. ** It is now possible to select directories and delete / copy / move them using the same builtin functions used in the previous versions for file only operations. Since it is inherently dangerous to delete directories, if the directory to be deleted is not empty, the user is prompted twice, in order to reduce the possibility of an error. Briefly, you can use the same key binding for both file and directories common operations (i.e. pressing F8 or ^C D will delete the current file (or directory) if there are no selected files / directories, or all the selected files and directories otherwise). You should pay attention because directories are deleted recursively. Also note that the select-all built-in function doesn't select directories. You should select them "by hand". Just for safety... ** Most file commands have been changed in order to act on the selected files. As an example, if you select some files in a panel and then start the COMPRESS command, `git' will compress all the selected files, not only the current one. If the command used (gzip in our case) exits successfully, all the selected files will become unselected. However, if an error occur, `git' will *not* unselect the selected files since there is no way to tell (in general) which files have been successfully processed. ** An utility for wiping files is provided. Its name is (of course) gitwipe and is binded on ^C W. gitwipe overwrites the file contents with a random sequence of numbers and then calls sync(). Note that gitwipe does *not* delete the file since (under Linux at least) the sync() system call might return before actually writing the new file contents to disk. Deleting the file might be dangerous because some file systems can detect that the blocks in the file are no longer used and never write them back to disk in order to improve performance. It is up to you to delete the file(s) at a later moment. ** A new scheme is used for the configuration files. Since most of the key bindings are common to all the terminal types and only a few are really terminal specific, a new configuration file called .gitrc.common is used to keep the 'common' ones. This new confi- guration file contains only the [GITxxx-Keys] sections. Terminal specific key bindings can be defined as usual in the .gitrc.TERM files and, if a conflict occurs, the .gitrc.TERM definition is used, giving the user the possibility to overwrite a 'common' key binding if it wishes to do so. ** The configuration files commands have been enhanced with a new format specifier: '%?{confirmation}' This format specifier only asks for confirmation before expanding / executing the current command. The 'confirmation' string is displayed and if the user doesn't confirm, the command is aborted. Otherwise, %?{...} expands to a null string and the command is expanded / executed normally. ** A separate history is kept for each command. This is true for both built-in and user-defined commands. For example, if you search a file using the user-defined FIND command and, later, you call the FIND function again, you can walk through the file names history using the arrow keys or ESC p / ESC n (M-p / M-n in emacs). ** Three built-in functions have been added: *** enlarge-panel - binded on ^X1 (C-X 1) *** enlarge-other-panel - binded on ^X0 (C-X 0) *** two-panels - binded on ^X2 (C-X 2) enlarge-panel will maximize the current panel, enlarge-other-panel the other one. One of the panels will become invisible. However, *all* the operations can still be performed. The invisible panel will remain the default destination for copy/move operations. TAB will also continue to work. two-panels will restore the original two panels mode. ** A new display mode, suitable for enlarged panels, is provided. This new mode combines all the other modes, displaying the owner, group, date, time, size and mode of a file. It is automatically selected by enlarge-panel and enlarge-other-panel but can be changed afterward, by pressing ^] (C-]). ** A 'lock' built-in function has been added. It is binded on ^X p (C-x p) and locks the terminal until the password typed at lock time is correctly retyped. ** The `git' panels are no longer deleted/restored when a background command is started. ** A .gitrc.sun configuration file has been added. It is a link to .gitrc.generic. ** New Linux kernels seem to use the /dev/vcs devices to dump the screen contents. I dont' have access to such a kernel right know, but I will fix this in the next release. See the file PROBLEMS for details. ** The texinfo documentation has been rewritten from scratch. It is better organized and has many new additions. It also contains an exhaustive description of all the default key bindings. There are still many things that can be done, though. ** A dvi Makefile target has been aded. Type 'make dvi' if you want to create the git.dvi file from git.texinfo. After that, you should be able to get a PostScript documentation using dvips. ** A last minute Minix 1.6.25.1 port. Works fine, has colors. A .gitrc.minix has been added to the distribution. * Version 4.3.5 =============== ** Owner and group names are now being cached using hash tables in order to increase the directory reading speed. ** `git' is now able to display the file system free space on many systems. GIT 4.3.4 was only able to do this under Linux, using the statfs() system call. GIT 4.3.5 uses a modified version of the fsusage.c file from the GNU fileutils 3.2 package. ** ^H (8), ^I (9), ^J (10), ^M (13), ^SPC (0) and BACKSPACE (127) can be configured in the configuration files. ** The interrupt & quit characters are both ^G now. You can exit from GIT with ^X^C (this is the default binding but you can change it, of course :-) ). ** The entire set of default key bindings has been changed. I have tried to make them be more emacs-like (where possible). Since it is impossible to use 'z' to compress a file or 'Z' to uncompress it as emacs does in the 'dired' mode because 'a', 'A', ... 'z', 'Z', etc are used to enter commands in the input line, I have decided to use the ^C prefix key for file operations. Background commands are prefixed with ^Cb. You should read the configuration files for more details. ** `git' now has an editable input line. Most emacs-like editing functions suitable for editing one line of input are now available: Function: GIT style: Emacs style: *** backward-char ^B C-b *** forward-char ^F C-f *** backward-word ^[b M-b *** forward-word ^[f M-f *** beginning-of-line ^A C-a *** end-of-line ^E C-e *** delete-char ^D C-d *** backward-delete-char ^_ DEL *** backward-kill-word ^[^_ M-DEL *** kill-line ^[k C-k *** kill-to-beginning-of-line ^U *** kill-to-end-of-line ^K *** just-one-space ^[^@ M-SPC *** delete-horizontal-space ^[\ M-\ *** action ^M RET *** set-mark ^$ C-SPC *** kill-region ^W C-w *** kill-ring-save ^[w M-w *** yank ^Y C-Y *** exchange-point-and-mark ^X^X C-x C-x ** Since the entire input line code has been changed / improved, the 2048 bytes length limit no longer exist. The input line can hold as many characters as you want. ** All the built-in command names have been changed in order to match the emacs style function names: has become change-panel. By convention, built-in commands are now lowercase while user defined commands are uppercase. ** When copying files that are longer than 32 Kb, the copied percent is displayed on the status bar. ** The copy_files built-in command can be interrupted in the middle of a file copy action. If the operation is interrupted in the middle, the incomplete file is deleted. ** The configuration files are using now shell environment variables to call the shell, editor, mail reader, compress and virtual memory status utility. That means that if you set GIT_SHELL, GIT_EDITOR, GIT_RMAIL, GIT_COMPRESS or GIT_VMSTAT to some value, that value will be used instead of the default one. The defaults are: *** GIT_SHELL='/bin/sh' *** GIT_EDITOR='vi' *** GIT_RMAIL='emacs -f rmail' *** GIT_COMPRESS='gzip -9' *** GIT_VMSTAT='free' If GIT_SHELL is not defined but SHELL is, GIT_SHELL will be set to that value. If GIT_EDITOR is not defined but EDITOR is, GIT_EDITOR will be set to that value. ** History expansion has been added. `git' now takes advantage of the full power of the history library. Each command entered at the prompt is expanded and added to the history. !!, !?, !-n, ... are now available. See the history library documentation for more details. ** The package can be compiled in a different directory, keeping the source tree unmodified. You should be able to make an empty directory, chdir to it and start git-4.3.5/configure, then make. ** The distribution has been split into three directories: src, man and info. ** GIT has been tested on IRIX 4.0.5F. It works. It also works on SunOS 4.1.3, Solaris 2.3 and Irix 5.2 according to Eric Jaron Stieglitz . ** `make install' creates a symbolic link from $(libdir)/.gitrc.xterm to $(libdir)/.gitrc.xterms in order to avoid problems on systems that have the TERM environment variable defined as xterms instead of xterm. ** A script doing recursive grep (gitrgrep) has been added to the distribution. It might be useful. * Version 4.3.4 =============== ** Richard Stallman saw it and agreed to be part of the GNU project. ** The package is no longer called 'UNIX Interactive Tools'. I've changed its name to 'GNU Interactive Tools'. ** GIT is now able to correctly restore the terminal foreground and background under X. The previous version had a problem with this because there is no way to find out the terminal colors at startup. The [Setup] section of the configuration file specifies the colors that GIT should set at exit. ** If gcc is detected at configure time, -Wall is added to CFLAGS. ** A bug in Makefile.in has been fixed. ** Two gitps bugs have been fixed. ** Better ^Z (suspend) management. GIT doesn't wait any longer for a key to be pressed after the 'fg' command is entered at the shell prompt. ** The hpterm terminal emulator support works better. It is far from being perfect, but it works better than the previous versions. ** Added support for System V and BSD terminal interfaces. ** Added support for AIX aixterm terminal emulator. ** If a .gitrc.TERM file cannot be found for a specific terminal, a generic configuration file (.gitrc.generic) is used. ** Tested on a Bull computer running AIX. ** Tested on some BSD 4.3 systems at FSF. ** Tested on a Sun running SunOS 4.0.3 at FSF. ** A better Sun port thanks to Johann Friedrich Heinrichmeyer. ** A better Alpha port thanks to Dan Pop. ** Added some emacs-like key bindings. There will be more in the next version. ** Code cleanup. * Version 4.3.3 =============== ** Added support for moving files on MS-DOS file systems. ** Added support for terminals that can't write on the last character of the screen without scrolling the entire screen. ** Alt-k starts diff with the two panels current files as arguments. ** Cosmetic changes. ** Bug fixes. * Version 4.3.2 =============== ** A lot of work has been done to make the UIT package compile with traditional K&R compilers. I've successfully compiled it with such a compiler on our HP-UX 9000/715. ** The installation procedure has been simplified: UIT 4.3.2 uses the 'configure' script! The 'configure' script was generated from the file configure.in (available in the package) using the autoconf utility version 1.11. To install the UIT 4.3.2 package just type: ./configure make make install ** The configure script first check for the termcap library. If the termcap library is not found, some terminfo libraries will be searched: ncurses, curses, termlib, tinfo, terminfo. If you want to change this default behavior and search for terminfo libraries before searching the termcap library, run ./configure --enable-terminfo instead of ./configure ** UIT now understands some symbolic key names in the configuration files: F0, F1, F2, ... F10, UP, DOWN, RIGHT, LEFT, INS, DEL, HOME, END, PGUP, PGDOWN. You can still specify a key sequence, but, for the function & cursor keys, it's a better idea to get them from the termcap/terminfo database if they can be found there. So, the command for the F1 key on the Linux console (the configuration file is .uitrc.console) can be: F1 = UIT-HELP; man uit or ^[A = UIT-HELP; man uit ** If some key doesn't have a termcap/terminfo description (like the F11/F12 keys on the Linux console) you can specify the key sequence in the usual way. ** The UIT package will use the GNU readline library if available. If this library is not installed on your system, uit will use the sources for the history and tilde expansion included in the package. For Linux systems, the DLL readline library version 2.0.1 is available at sunsite.unc.edu in the directory /pub/Linux/libs. The package name is librl-2.0.1.tar.gz. This package also includes a readline linked ftp, bash-1.14.1 and gdb-4.12 binaries. The bash binary is about 60k smaller that the SLACKWARE 2.0.0 version and, hold your breath..., the gdb binary is about 500k smaller too. So, if you really want things to work better, install this DLL readline library. UIT will work just fine without it, but using a shared library generally means shorter binaries ... ** Changes in the configuration files: *** ^De starts the editor sending the selected files as para- meters. So, if you want to edit multiple files at once, select them, then press ^De . The default editor is joe, but you can use any other editor if you change the corresponding line in the configuration file. *** ^Dd starts the 'more' viewer sending the selected files as parameters. See above. *** ^Du displays on the status bar the result of the 'du -s' command *** ^Df displays on the status bar the result of the 'df' command, one line at a time *** ^Dm displays on the status bar the result of the 'mount' command, one line at a time *** ^Dv displays on the status bar the result of the 'free' command, one line at a time *** ^Dw displays on the status bar the result of the 'whereis' command, one line at a time *** ^DW displays on the status bar the result of the 'which' command, one line at a time *** ^Dh displays on the status bar the result of the 'users' command, one line at a time ** The file and path names copied to the command line are now quoted because files residing on ISO9660 CDs may contain ';' and the shell will fail to expand the resulting string. ** Three new default actions have been added to the uitaction script for *.texi, *.texinfo and *.man. See the uitaction script for more details. ** 3 bugs have been fixed. * Version 4.3.1 =============== ** UIT now uses the GNU history library. The default history file is ~/.uithistory. ** The number of files in a panel is no longer limited to 1024. If you have enough memory, UIT can now display all the files in the directory, even if the directory is a very big one. UIT dynamically allocates memory for the directory data so UIT 4.3.1 needs about 120k-140k of memory less than UIT 4.3 (for usual directories). ** UIT can move files between file systems by copying the source file to the destination file and then removing the source file. ** The source files termcap.l and termcap.h have been removed. UIT 4.3.1 now use the standard termcap library. If you want to use a local termcap database (like .termcap), you can do it by setting the TERMCAP environment variable to point to it: TERMCAP = /home/joe/.termcap ** UIT 4.3.1 needs only the 'cm' and the 'cl' terminal capability. If available, 'me', 'md', 'mr', 'vi' and 've' are also used. ** Using the standard termcap database has some advantages: *** UIT 4.3.1 now does padding (if padding is required) *** UIT 4.3.1 can handle any kind of parameterized terminal capabilities. *** uit, uitps, uitview are smaller. *** No more problems with different versions of lex/flex... ** UIT has now terminfo support. You can choose between termcap and terminfo at compile time. ** The selected files are marked with a '*' in the right side. This can be useful if your terminal doesn't know about brightness (the me & md terminal capabilities). ** The current file of the current panel is marked with a '>' in the left side. ** The current file of the other panel is marked with a '*' in the left side. You can see this way which is the current file of the other panel. ** UIT is able to run a command sending to it the selected file names as parameters. This is done using the new %i and %I parameters available in the formatted string. Suppose the current directory test_dir contains the files foo, bar, tutu and gogu, and foo & tutu are selected, the following command ^Wyt = TAR; tar cf %b.tar %i;;;;y will be expanded as tar cf test_dir.bar foo tutu Thus, you can make your favorite commands act only on the selected files. ** A new builtin command () is available. This command lets you to insert all the selected files names into the command line. I've mapped it on ^Kg. If there is no selected file, only the current file name is copied. ** Changes in the configuration files: *** the archive (.tar.gz) created with ^Wz get its name from the directory under the cursor. So, in the configuration files, ^Wz = tar cf - * | gzip -9cf > %b.tar.gz is now ^Wz = tar cf - %d | gzip -9c > %d.tar.gz *** elm can be started with ^Ke *** the shell can be started with ^Kj *** as explained before, I've added ^Kg & ^Wyt ** A new utility (uitkeys) is provided to help users to set up the configuration files .uitrc.TERM. ** If uit/uitps/uitview doesn't find a local configuration file .uitrc.TERM, it tries to use the global version (usually found in the /usr/local/lib directory). This way, users are able to run uit/ uitps/uitview without having to copy the configuration file(s) in their home directory. ** uit now understands '~' in the 'newdir' field, in the builtin command, etc ... ** The procedure of setting up colors has been simplified. If you want to try to run UIT with colors, just set AnsiColorSequences to ON in the configuration files. ** MS-DOS files are copied without the __x bits. ** UIT can now display the host-name, system type, machine type and the current date on the status bar using the following escape sequences: \h -> the host name \s -> the system type \m -> the machine type \t -> the date Please read the configuration files for more details. ** For the sake of readability, in the configuration files '1' and '0' have been replaced by 'y' and 'n'. ** The size of the command line has been increased to 2k. ** alloca.c is now included in the distribution. You should be able to compile the UIT 4.3.1 package even if the target system does not support the alloca() function. For such systems, define in the Makefile ALLOCAOBJ = alloca.o . ** A better Makefile: - you can uninstall the UIT package using 'make uninstall' - you can build a distribution file using 'make dist' ** A *MUCH* *MUCH* *MUCH* better code. ** N bugs have been fixed :-(. * Version 4.3 ============= ** A new script that executes a different action for each file type specified. If you press F2 or ^Kz on a "*.c" file, UIT will compile it, if you press F2 or ^Kz on a "*.tar.gz" file, UIT will list the tar archive contents, if you press the same keys on a "*.gz" file UIT will display its uncompressed contents on the screen, etc ... By default uitaction checks for the following patterns: "*.cc" "*.c" "*.l" "*.y" "*.h" "*.s" "*.S" "*.o" "*.a" "*.sa" "Makefile" "makefile" "*.tar.gz" "*.tgz" "*.tar.z" "*.tar.Z" "*.taz" "*.tar" "*.gz" "*.z" "*.Z" "*.doc" "*.txt" "*.gif" "*.jpg" "*.tif" "*.bmp" and acts as appropriate. If no pattern is found, the file is displayed using more. Feel free to change this. If you press F2 or ^Kz on a "*.gif" file or a "*.jpg" file and you have the zgv utility installed, you will be able to see it. If you want to change the gif/jpeg viewer, all you need to do is to change its name in the uitaction script. I don't know a "*.bmp" or "*.tif" viewer. Feel free to add one in the uitaction script. The script can be easy enhanced. Just read it. You can have a local version of this script (in the current directory). Please read the manual page for more details. ** UIT 4.3 was tested on DEC OSF/1 operating system. ** Enhanced configuration files: - uitaction (F2 or ^Kz) - grep (^Vr) - ispell (^Vi) - ' | more' added to finger, w, ... - reset (terminal reset) (^WR) - mv (you can now change a file name even if the two panels don't show the same directory) (^Vr) - chmod for a group of files (^Wlm) - chown for a group of files (^Wlo) - chgrp for a group of files (^Wlg) - conform the current directory to the other panel directory (Alt-c c, ESC c c, ^[cc) - - conform the other panel directory to the current panel directory (Alt-c o, ESC c o, ^[co) - - tar + gzip in one shot (^Wz). Something like that is executed: tar cf - * | gzip -9cf > %b.tar.gz - the background version of the previous command (^Wbz) - gunzip + un-tar in one shot (^Wv). Something like that is executed: gzip -dc %f | tar xf - - the background version of the previous command (^Wbv) - copy the other panel path to the command line (^Ka) ** Enhanced manual pages. ** A better Makefile ** 3 bugs have been fixed. ** Better error checking on directories. ** ^H support (treated as backspace). ** The ASCII documentation has been removed. I think that every modern UNIX system should have the man utility. * Version 4.2c ============== ** UIT 4.2c was tested on HP-UX operating system. ** UIT 4.2c implements a curses-like algorithm to prevent useless screen refreshes. *NOTHING* will be displayed on the screen if it is already there. This will speed up UIT when working on terminals. To force a screen refresh you can use ^Wr ( ). ** UIT 4.2c is able to select/unselect files using a pattern matching method. You can now select something like *.c, *.h or unselect *.o. This is done with ^Vs (select) / ^Vu (unselect). ** The configuration files .uitrc.TERM where enhanced. You can now start tar xf, tar cf, gzip, gunzip, uuencode, uudecode as foreground or background commands. This is done with ^Wx / ^Wbx, ^Wt / ^Wbt, ^Wc / ^Wbc, ^Wu / ^Wbu, etc. There is also possible to directly send by mail a file to someone as an ASCII file (^Va) or as an uuencoded binary file (^Vb). ** Bug fix: UIT 4.2c now correctly stops when it is started as a background job. ** Files can be sorted in 9 different ways. The most important sorting methods are "by name", "by extension", "by size" and "by date". ** A new script uitmount which allows you to mount any block device without specifying the fs type. You may now insert the floppy in the drive and type 'uitmount fd0' and the first floppy will be mounted in the directory /mnt/fd0. Under Linux just press F11 or F12. You don't need to know the fs type anymore. The directories /mnt/fd0 and /mnt/fd1 must exist. If you want to use uitmount with the block device /dev/xxx then the directory /mnt/xxx must exist. ** You can now install uit with 'make install' ** A new feature has been added to the command line: pressing Alt-h you can delete the last command line word. The built-in command name is . I now that the command line is not very flexible and I'll probably change it in the future. ** can now use ~ as home directory specification. ** can now be canceled with TAB. ** UIT 4.2c is now able now to display up to 99G of free file system space. Big enough, I suppose :-) . * Version 4.2b ============== ** UIT 4.2b now contains info format documentation. ** UIT 4.2b has separate configuration files for each type of terminal. ** An ASCII version of the manual page (uit.doc) included for those who can't read neither the nroff version nor the info version. ** New built-in function for changing the current panel directory. ** uit, uitps and uitview are a little bit smaller than the previous versions (uitcmp was small enough :-) ). ** UIT 4.2b package now correctly runs under X (in an xterm window). Previous versions did not due to a bug in handling the ioctl() call to get the screen contents. ** UIT 4.2b now supports full configurable key sequences. The key pressed is identified faster. ** 5 minor bugs have been fixed. See the ChangeLog file for details. * Version 4.2a and older ======================== ** UIT 4.2a has been tested with Linux 1.0 and ULTRIX V4.2A. ** As to Linux 1.0 you can't do a screen dump if you are not super user so the command is no longer completely supported for the normal users. Even if you are not super user, is still useful because you can see the result of the latest command. ** As to Linux 1.0 MS-DOS files are all executable (__x__x__x). UIT now checks the file system type and ignores the executable bits if the current directory belongs to a MS-DOS file system. ** UIT 4.2a can now display longer file names (with the 'FullName' FileDisplayMode value). ** UIT 4.2a can now display setuid, set group id attributes and the sticky bit. ** Lots of optimizations have been made to speed up UIT when working with terminals. ** Filenames containing control characters are correctly displayed. (control characters are displayed as '?') ** New options in the configuration file permitting to increase the displaying speed on very slow terminals. ** An interactive process viewer / killer utility is provided. ** An interactive HEX/ASCII file viewer is now available. * Notes ======= *** Starting with version 4.0, this program is no longer named PSH. PSH was the name used until version 3.2b. *** Please read the INSTALL file before starting UIT 4.3. Tudor & Andi gnuit-4.9.5/m4/0000777000175000017500000000000011146672034010210 500000000000000gnuit-4.9.5/m4/human.m40000644000175000017500000000056411146671375011512 00000000000000#serial 10 dnl Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_HUMAN], [ AC_LIBOBJ([human]) dnl Prerequisites of lib/human.c. : ]) gnuit-4.9.5/m4/dirname.m40000644000175000017500000000106211146671375012013 00000000000000#serial 7 -*- autoconf -*- dnl Copyright (C) 2002-2006 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_DIRNAME], [ AC_LIBOBJ([basename]) AC_LIBOBJ([dirname]) AC_LIBOBJ([stripslash]) dnl Prerequisites of lib/dirname.h. AC_REQUIRE([gl_AC_DOS]) AC_REQUIRE([gl_DOUBLE_SLASH_ROOT]) dnl No prerequisites of lib/basename.c, lib/dirname.c, lib/stripslash.c. ]) gnuit-4.9.5/m4/strcasestr.m40000644000175000017500000000501311146671376012572 00000000000000# strcasestr.m4 serial 12 dnl Copyright (C) 2005, 2007, 2008 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl Check that strcasestr is present. AC_DEFUN([gl_FUNC_STRCASESTR_SIMPLE], [ dnl Persuade glibc to declare strcasestr(). AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) AC_REPLACE_FUNCS([strcasestr]) if test $ac_cv_func_strcasestr = no; then HAVE_STRCASESTR=0 gl_PREREQ_STRCASESTR fi ]) # gl_FUNC_STRCASESTR_SIMPLE dnl Additionally, check that strcasestr is efficient. AC_DEFUN([gl_FUNC_STRCASESTR], [ AC_REQUIRE([gl_FUNC_STRCASESTR_SIMPLE]) if test $ac_cv_func_strcasestr = yes; then AC_CACHE_CHECK([whether strcasestr works in linear time], [gl_cv_func_strcasestr_linear], [AC_RUN_IFELSE([AC_LANG_PROGRAM([[ #include /* for signal */ #include /* for memmem */ #include /* for malloc */ #include /* for alarm */ ]], [[size_t m = 1000000; char *haystack = (char *) malloc (2 * m + 2); char *needle = (char *) malloc (m + 2); void *result = 0; /* Failure to compile this test due to missing alarm is okay, since all such platforms (mingw) also lack strcasestr. */ signal (SIGALRM, SIG_DFL); alarm (5); /* Check for quadratic performance. */ if (haystack && needle) { memset (haystack, 'A', 2 * m); haystack[2 * m] = 'B'; haystack[2 * m + 1] = 0; memset (needle, 'A', m); needle[m] = 'B'; needle[m + 1] = 0; result = strcasestr (haystack, needle); } return !result;]])], [gl_cv_func_strcasestr_linear=yes], [gl_cv_func_strcasestr_linear=no], [dnl Only glibc >= 2.9 and cygwin >= 1.7.0 are known to have a dnl strcasestr that works in linear time. AC_EGREP_CPP([Lucky user], [ #include #ifdef __GNU_LIBRARY__ #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 9) || (__GLIBC__ > 2) Lucky user #endif #endif #ifdef __CYGWIN__ #include #if CYGWIN_VERSION_DLL_MAJOR >= 1007 Lucky user #endif #endif ], [gl_cv_func_strcasestr_linear=yes], [gl_cv_func_strcasestr_linear="guessing no"]) ]) ]) if test "$gl_cv_func_strcasestr_linear" != yes; then REPLACE_STRCASESTR=1 AC_LIBOBJ([strcasestr]) fi fi ]) # gl_FUNC_STRCASESTR # Prerequisites of lib/strcasestr.c. AC_DEFUN([gl_PREREQ_STRCASESTR], [ : ]) gnuit-4.9.5/m4/lstat.m40000644000175000017500000000153511146671376011531 00000000000000# serial 19 # Copyright (C) 1997-2001, 2003-2009 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. dnl From Jim Meyering. AC_DEFUN([gl_FUNC_LSTAT], [ AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS]) dnl If lstat does not exist, the replacement does dnl "#define lstat stat", and lstat.c does not need to be compiled. AC_CHECK_FUNCS_ONCE([lstat]) if test $ac_cv_func_lstat = yes; then AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK dnl Note: AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK does AC_LIBOBJ([lstat]). if test $ac_cv_func_lstat_dereferences_slashed_symlink = no; then REPLACE_LSTAT=1 fi # Prerequisites of lib/lstat.c. AC_REQUIRE([AC_C_INLINE]) fi ]) gnuit-4.9.5/m4/gnulib-cache.m40000644000175000017500000000271711146671375012725 00000000000000# Copyright (C) 2002-2009 Free Software Foundation, Inc. # # This file is free software, distributed under the terms of the GNU # General Public License. As a special exception to the GNU General # Public License, this file may be distributed as part of a program # that contains a configuration script generated by Autoconf, under # the same distribution terms as the rest of that program. # # Generated by gnulib-tool. # # This file represents the specification of how gnulib-tool is used. # It acts as a cache: It is written and read by gnulib-tool. # In projects using CVS, this file is meant to be stored in CVS, # like the configure.ac and various Makefile.am files. # Specification in the form of a command-line invocation: # gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=. --no-libtool --macro-prefix=gl fnmatch fnmatch-gnu fsusage getopt human idcache mbsstr memmove mkstemp nanosleep putenv readlink rename strcase strcasestr utime xalloc # Specification in the form of a few gnulib-tool.m4 macro invocations: gl_LOCAL_DIR([]) gl_MODULES([ fnmatch fnmatch-gnu fsusage getopt human idcache mbsstr memmove mkstemp nanosleep putenv readlink rename strcase strcasestr utime xalloc ]) gl_AVOID([]) gl_SOURCE_BASE([lib]) gl_M4_BASE([m4]) gl_PO_BASE([]) gl_DOC_BASE([doc]) gl_TESTS_BASE([tests]) gl_LIB([libgnu]) gl_MAKEFILE_NAME([]) gl_MACRO_PREFIX([gl]) gl_PO_DOMAIN([]) gnuit-4.9.5/m4/gettime.m40000644000175000017500000000075211146671375012037 00000000000000# gettime.m4 serial 7 dnl Copyright (C) 2002, 2004, 2005, 2006, 2009 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_GETTIME], [ AC_LIBOBJ([gettime]) dnl Prerequisites of lib/gettime.c. AC_REQUIRE([gl_CLOCK_TIME]) AC_REQUIRE([gl_TIMESPEC]) AC_CHECK_FUNCS_ONCE([gettimeofday nanotime]) ]) gnuit-4.9.5/m4/readlink.m40000644000175000017500000000137111146671376012171 00000000000000# readlink.m4 serial 5 dnl Copyright (C) 2003, 2007, 2009 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_READLINK], [ AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) AC_CHECK_FUNCS_ONCE([readlink]) if test $ac_cv_func_readlink = no; then HAVE_READLINK=0 AC_LIBOBJ([readlink]) gl_PREREQ_READLINK fi ]) # Like gl_FUNC_READLINK, except prepare for separate compilation (no AC_LIBOBJ). AC_DEFUN([gl_FUNC_READLINK_SEPARATE], [ AC_CHECK_FUNCS_ONCE([readlink]) gl_PREREQ_READLINK ]) # Prerequisites of lib/readlink.c. AC_DEFUN([gl_PREREQ_READLINK], [ : ]) gnuit-4.9.5/m4/error.m40000644000175000017500000000103411146671375011524 00000000000000#serial 11 # Copyright (C) 1996, 1997, 1998, 2001, 2002, 2003, 2004 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. AC_DEFUN([gl_ERROR], [ AC_FUNC_ERROR_AT_LINE dnl Note: AC_FUNC_ERROR_AT_LINE does AC_LIBSOURCES([error.h, error.c]). gl_PREREQ_ERROR ]) # Prerequisites of lib/error.c. AC_DEFUN([gl_PREREQ_ERROR], [ AC_REQUIRE([AC_FUNC_STRERROR_R]) : ]) gnuit-4.9.5/m4/nanosleep.m40000644000175000017500000000652211146671376012367 00000000000000# serial 27 dnl From Jim Meyering. dnl Check for the nanosleep function. dnl If not found, use the supplied replacement. dnl # Copyright (C) 1999-2001, 2003-2009 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. AC_DEFUN([gl_FUNC_NANOSLEEP], [ dnl Persuade glibc and Solaris to declare nanosleep. AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) AC_REQUIRE([gl_HEADER_TIME_H_DEFAULTS]) AC_REQUIRE([gl_CLOCK_TIME]) AC_CHECK_HEADERS_ONCE([sys/time.h]) nanosleep_save_libs=$LIBS # Solaris 2.5.1 needs -lposix4 to get the nanosleep function. # Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4. AC_SEARCH_LIBS([nanosleep], [rt posix4], [test "$ac_cv_search_nanosleep" = "none required" || LIB_NANOSLEEP=$ac_cv_search_nanosleep]) AC_REQUIRE([gl_MULTIARCH]) if test $APPLE_UNIVERSAL_BUILD = 1; then # A universal build on Apple MacOS X platforms. # The test result would be 'no (mishandles large arguments)' in 64-bit mode # but 'yes' in 32-bit mode. But we need a configuration result that is # valid in both modes. gl_cv_func_nanosleep='no (mishandles large arguments)' fi AC_CACHE_CHECK([for working nanosleep], [gl_cv_func_nanosleep], [ AC_RUN_IFELSE( [AC_LANG_SOURCE([[ #include #include #include #if HAVE_SYS_TIME_H #include #endif #include #include #define TYPE_SIGNED(t) (! ((t) 0 < (t) -1)) #define TYPE_MAXIMUM(t) \ ((t) (! TYPE_SIGNED (t) \ ? (t) -1 \ : ~ (~ (t) 0 << (sizeof (t) * CHAR_BIT - 1)))) static void check_for_SIGALRM (int sig) { if (sig != SIGALRM) _exit (1); } int main () { static struct timespec ts_sleep; static struct timespec ts_remaining; static struct sigaction act; if (! nanosleep) return 1; act.sa_handler = check_for_SIGALRM; sigemptyset (&act.sa_mask); sigaction (SIGALRM, &act, NULL); ts_sleep.tv_sec = 0; ts_sleep.tv_nsec = 1; alarm (1); if (nanosleep (&ts_sleep, NULL) != 0) return 1; ts_sleep.tv_sec = TYPE_MAXIMUM (time_t); ts_sleep.tv_nsec = 999999999; alarm (1); if (nanosleep (&ts_sleep, &ts_remaining) == -1 && errno == EINTR && TYPE_MAXIMUM (time_t) - 10 < ts_remaining.tv_sec) return 0; return 119; }]])], [gl_cv_func_nanosleep=yes], [case $? in dnl ( 119) gl_cv_func_nanosleep='no (mishandles large arguments)';; dnl ( *) gl_cv_func_nanosleep=no;; esac], [gl_cv_func_nanosleep=cross-compiling]) ]) if test "$gl_cv_func_nanosleep" = yes; then REPLACE_NANOSLEEP=0 else REPLACE_NANOSLEEP=1 if test "$gl_cv_func_nanosleep" = 'no (mishandles large arguments)'; then AC_DEFINE([HAVE_BUG_BIG_NANOSLEEP], [1], [Define to 1 if nanosleep mishandles large arguments.]) for ac_lib in $LIB_CLOCK_GETTIME; do case " $LIB_NANOSLEEP " in *" $ac_lib "*) ;; *) LIB_NANOSLEEP="$LIB_NANOSLEEP $ac_lib";; esac done fi AC_LIBOBJ([nanosleep]) gl_PREREQ_NANOSLEEP fi AC_SUBST([LIB_NANOSLEEP]) LIBS=$nanosleep_save_libs ]) # Prerequisites of lib/nanosleep.c. AC_DEFUN([gl_PREREQ_NANOSLEEP], [ AC_CHECK_HEADERS_ONCE([sys/select.h]) gl_PREREQ_SIG_HANDLER_H ]) gnuit-4.9.5/m4/safe-read.m40000644000175000017500000000073311146671376012230 00000000000000# safe-read.m4 serial 5 dnl Copyright (C) 2002, 2003, 2005, 2006 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_SAFE_READ], [ AC_LIBOBJ([safe-read]) gl_PREREQ_SAFE_READ ]) # Prerequisites of lib/safe-read.c. AC_DEFUN([gl_PREREQ_SAFE_READ], [ AC_REQUIRE([gt_TYPE_SSIZE_T]) ]) gnuit-4.9.5/m4/eealloc.m40000644000175000017500000000171611146671375012006 00000000000000# eealloc.m4 serial 2 dnl Copyright (C) 2003, 2009 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_EEALLOC], [ AC_REQUIRE([gl_EEMALLOC]) AC_REQUIRE([gl_EEREALLOC]) AC_REQUIRE([AC_C_INLINE]) ]) AC_DEFUN([gl_EEMALLOC], [ _AC_FUNC_MALLOC_IF( [gl_cv_func_malloc_0_nonnull=1], [gl_cv_func_malloc_0_nonnull=0]) AC_DEFINE_UNQUOTED([MALLOC_0_IS_NONNULL], [$gl_cv_func_malloc_0_nonnull], [If malloc(0) is != NULL, define this to 1. Otherwise define this to 0.]) ]) AC_DEFUN([gl_EEREALLOC], [ _AC_FUNC_REALLOC_IF( [gl_cv_func_realloc_0_nonnull=1], [gl_cv_func_realloc_0_nonnull=0]) AC_DEFINE_UNQUOTED([REALLOC_0_IS_NONNULL], [$gl_cv_func_realloc_0_nonnull], [If realloc(NULL,0) is != NULL, define this to 1. Otherwise define this to 0.]) ]) gnuit-4.9.5/m4/sys_stat_h.m40000644000175000017500000000350011146671376012554 00000000000000# sys_stat_h.m4 serial 10 -*- Autoconf -*- dnl Copyright (C) 2006-2008 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Eric Blake. dnl Test whether contains lstat and mkdir or must be substituted. AC_DEFUN([gl_HEADER_SYS_STAT_H], [ AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS]) dnl Check for lstat. Systems that lack it (mingw) also lack symlinks, so dnl stat is a good replacement. AC_CHECK_FUNCS_ONCE([lstat]) if test $ac_cv_func_lstat = yes; then HAVE_LSTAT=1 else HAVE_LSTAT=0 fi AC_SUBST([HAVE_LSTAT]) dnl For the mkdir substitute. AC_REQUIRE([AC_C_INLINE]) dnl Check for broken stat macros. AC_REQUIRE([AC_HEADER_STAT]) gl_CHECK_NEXT_HEADERS([sys/stat.h]) SYS_STAT_H='sys/stat.h' AC_SUBST([SYS_STAT_H]) dnl Define types that are supposed to be defined in or dnl . AC_CHECK_TYPE([nlink_t], [], [AC_DEFINE([nlink_t], [int], [Define to the type of st_nlink in struct stat, or a supertype.])], [#include #include ]) ]) # gl_HEADER_SYS_STAT_H AC_DEFUN([gl_SYS_STAT_MODULE_INDICATOR], [ dnl Use AC_REQUIRE here, so that the default settings are expanded once only. AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS]) GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1 ]) AC_DEFUN([gl_SYS_STAT_H_DEFAULTS], [ GNULIB_LCHMOD=0; AC_SUBST([GNULIB_LCHMOD]) GNULIB_LSTAT=0; AC_SUBST([GNULIB_LSTAT]) dnl Assume proper GNU behavior unless another module says otherwise. HAVE_LCHMOD=1; AC_SUBST([HAVE_LCHMOD]) REPLACE_LSTAT=0; AC_SUBST([REPLACE_LSTAT]) REPLACE_MKDIR=0; AC_SUBST([REPLACE_MKDIR]) ]) gnuit-4.9.5/m4/argmatch.m40000644000175000017500000000047611146671375012172 00000000000000#serial 3 dnl Copyright (C) 2005, 2006 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_ARGMATCH], [ AC_LIBOBJ([argmatch]) ]) gnuit-4.9.5/m4/fsusage.m40000644000175000017500000001766711146671375012053 00000000000000# serial 24 # Obtaining file system usage information. # Copyright (C) 1997-1998, 2000-2001, 2003-2009 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. # Written by Jim Meyering. AC_DEFUN([gl_FSUSAGE], [ AC_CHECK_HEADERS_ONCE([sys/param.h]) AC_CHECK_HEADERS_ONCE([sys/vfs.h sys/fs_types.h]) AC_CHECK_HEADERS([sys/mount.h], [], [], [AC_INCLUDES_DEFAULT [#if HAVE_SYS_PARAM_H #include #endif]]) gl_FILE_SYSTEM_USAGE([gl_cv_fs_space=yes], [gl_cv_fs_space=no]) if test $gl_cv_fs_space = yes; then AC_LIBOBJ([fsusage]) gl_PREREQ_FSUSAGE_EXTRA fi ]) # Try to determine how a program can obtain file system usage information. # If successful, define the appropriate symbol (see fsusage.c) and # execute ACTION-IF-FOUND. Otherwise, execute ACTION-IF-NOT-FOUND. # # gl_FILE_SYSTEM_USAGE([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) AC_DEFUN([gl_FILE_SYSTEM_USAGE], [ AC_MSG_NOTICE([checking how to get file system space usage]) ac_fsusage_space=no # Perform only the link test since it seems there are no variants of the # statvfs function. This check is more than just AC_CHECK_FUNCS([statvfs]) # because that got a false positive on SCO OSR5. Adding the declaration # of a `struct statvfs' causes this test to fail (as it should) on such # systems. That system is reported to work fine with STAT_STATFS4 which # is what it gets when this test fails. if test $ac_fsusage_space = no; then # SVR4 AC_CACHE_CHECK([for statvfs function (SVR4)], [fu_cv_sys_stat_statvfs], [AC_TRY_LINK([#include #if defined __GLIBC__ && defined __linux__ Do not use statvfs on systems with GNU libc on Linux, because that function stats all preceding entries in /proc/mounts, and that makes df hang if even one of the corresponding file systems is hard-mounted, but not available. statvfs in GNU libc on Hurd, BeOS, Haiku operates differently: it only makes a system call. #endif #ifdef __osf__ "Do not use Tru64's statvfs implementation" #endif #include ], [struct statvfs fsd; statvfs (0, &fsd);], fu_cv_sys_stat_statvfs=yes, fu_cv_sys_stat_statvfs=no)]) if test $fu_cv_sys_stat_statvfs = yes; then ac_fsusage_space=yes AC_DEFINE([STAT_STATVFS], [1], [ Define if there is a function named statvfs. (SVR4)]) fi fi if test $ac_fsusage_space = no; then # DEC Alpha running OSF/1 AC_MSG_CHECKING([for 3-argument statfs function (DEC OSF/1)]) AC_CACHE_VAL([fu_cv_sys_stat_statfs3_osf1], [AC_TRY_RUN([ #include #include #include int main () { struct statfs fsd; fsd.f_fsize = 0; return statfs (".", &fsd, sizeof (struct statfs)) != 0; }], fu_cv_sys_stat_statfs3_osf1=yes, fu_cv_sys_stat_statfs3_osf1=no, fu_cv_sys_stat_statfs3_osf1=no)]) AC_MSG_RESULT([$fu_cv_sys_stat_statfs3_osf1]) if test $fu_cv_sys_stat_statfs3_osf1 = yes; then ac_fsusage_space=yes AC_DEFINE([STAT_STATFS3_OSF1], [1], [ Define if statfs takes 3 args. (DEC Alpha running OSF/1)]) fi fi if test $ac_fsusage_space = no; then # AIX AC_MSG_CHECKING([for two-argument statfs with statfs.bsize dnl member (AIX, 4.3BSD)]) AC_CACHE_VAL([fu_cv_sys_stat_statfs2_bsize], [AC_TRY_RUN([ #ifdef HAVE_SYS_PARAM_H #include #endif #ifdef HAVE_SYS_MOUNT_H #include #endif #ifdef HAVE_SYS_VFS_H #include #endif int main () { struct statfs fsd; fsd.f_bsize = 0; return statfs (".", &fsd) != 0; }], fu_cv_sys_stat_statfs2_bsize=yes, fu_cv_sys_stat_statfs2_bsize=no, fu_cv_sys_stat_statfs2_bsize=no)]) AC_MSG_RESULT([$fu_cv_sys_stat_statfs2_bsize]) if test $fu_cv_sys_stat_statfs2_bsize = yes; then ac_fsusage_space=yes AC_DEFINE([STAT_STATFS2_BSIZE], [1], [ Define if statfs takes 2 args and struct statfs has a field named f_bsize. (4.3BSD, SunOS 4, HP-UX, AIX PS/2)]) fi fi if test $ac_fsusage_space = no; then # SVR3 AC_MSG_CHECKING([for four-argument statfs (AIX-3.2.5, SVR3)]) AC_CACHE_VAL([fu_cv_sys_stat_statfs4], [AC_TRY_RUN([#include #include int main () { struct statfs fsd; return statfs (".", &fsd, sizeof fsd, 0) != 0; }], fu_cv_sys_stat_statfs4=yes, fu_cv_sys_stat_statfs4=no, fu_cv_sys_stat_statfs4=no)]) AC_MSG_RESULT([$fu_cv_sys_stat_statfs4]) if test $fu_cv_sys_stat_statfs4 = yes; then ac_fsusage_space=yes AC_DEFINE([STAT_STATFS4], [1], [ Define if statfs takes 4 args. (SVR3, Dynix, Irix, Dolphin)]) fi fi if test $ac_fsusage_space = no; then # 4.4BSD and NetBSD AC_MSG_CHECKING([for two-argument statfs with statfs.fsize dnl member (4.4BSD and NetBSD)]) AC_CACHE_VAL([fu_cv_sys_stat_statfs2_fsize], [AC_TRY_RUN([#include #ifdef HAVE_SYS_PARAM_H #include #endif #ifdef HAVE_SYS_MOUNT_H #include #endif int main () { struct statfs fsd; fsd.f_fsize = 0; return statfs (".", &fsd) != 0; }], fu_cv_sys_stat_statfs2_fsize=yes, fu_cv_sys_stat_statfs2_fsize=no, fu_cv_sys_stat_statfs2_fsize=no)]) AC_MSG_RESULT([$fu_cv_sys_stat_statfs2_fsize]) if test $fu_cv_sys_stat_statfs2_fsize = yes; then ac_fsusage_space=yes AC_DEFINE([STAT_STATFS2_FSIZE], [1], [ Define if statfs takes 2 args and struct statfs has a field named f_fsize. (4.4BSD, NetBSD)]) fi fi if test $ac_fsusage_space = no; then # Ultrix AC_MSG_CHECKING([for two-argument statfs with struct fs_data (Ultrix)]) AC_CACHE_VAL([fu_cv_sys_stat_fs_data], [AC_TRY_RUN([#include #ifdef HAVE_SYS_PARAM_H #include #endif #ifdef HAVE_SYS_MOUNT_H #include #endif #ifdef HAVE_SYS_FS_TYPES_H #include #endif int main () { struct fs_data fsd; /* Ultrix's statfs returns 1 for success, 0 for not mounted, -1 for failure. */ return statfs (".", &fsd) != 1; }], fu_cv_sys_stat_fs_data=yes, fu_cv_sys_stat_fs_data=no, fu_cv_sys_stat_fs_data=no)]) AC_MSG_RESULT([$fu_cv_sys_stat_fs_data]) if test $fu_cv_sys_stat_fs_data = yes; then ac_fsusage_space=yes AC_DEFINE([STAT_STATFS2_FS_DATA], [1], [ Define if statfs takes 2 args and the second argument has type struct fs_data. (Ultrix)]) fi fi if test $ac_fsusage_space = no; then # SVR2 AC_TRY_CPP([#include ], AC_DEFINE([STAT_READ_FILSYS], [1], [Define if there is no specific function for reading file systems usage information and you have the header file. (SVR2)]) ac_fsusage_space=yes) fi AS_IF([test $ac_fsusage_space = yes], [$1], [$2]) ]) # Check for SunOS statfs brokenness wrt partitions 2GB and larger. # If exists and struct statfs has a member named f_spare, # enable the work-around code in fsusage.c. AC_DEFUN([gl_STATFS_TRUNCATES], [ AC_MSG_CHECKING([for statfs that truncates block counts]) AC_CACHE_VAL([fu_cv_sys_truncating_statfs], [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #if !defined(sun) && !defined(__sun) choke -- this is a workaround for a Sun-specific problem #endif #include #include ]], [[struct statfs t; long c = *(t.f_spare); if (c) return 0;]])], [fu_cv_sys_truncating_statfs=yes], [fu_cv_sys_truncating_statfs=no])]) if test $fu_cv_sys_truncating_statfs = yes; then AC_DEFINE([STATFS_TRUNCATES_BLOCK_COUNTS], [1], [Define if the block counts reported by statfs may be truncated to 2GB and the correct values may be stored in the f_spare array. (SunOS 4.1.2, 4.1.3, and 4.1.3_U1 are reported to have this problem. SunOS 4.1.1 seems not to be affected.)]) fi AC_MSG_RESULT([$fu_cv_sys_truncating_statfs]) ]) # Prerequisites of lib/fsusage.c not done by gl_FILE_SYSTEM_USAGE. AC_DEFUN([gl_PREREQ_FSUSAGE_EXTRA], [ AC_CHECK_HEADERS([dustat.h sys/fs/s5param.h sys/filsys.h sys/statfs.h]) gl_STATFS_TRUNCATES ]) gnuit-4.9.5/m4/dos.m40000644000175000017500000000454611146671375011173 00000000000000#serial 10 -*- autoconf -*- # Define some macros required for proper operation of code in lib/*.c # on MSDOS/Windows systems. # Copyright (C) 2000, 2001, 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. # From Jim Meyering. AC_DEFUN([gl_AC_DOS], [ AC_CACHE_CHECK([whether system is Windows or MSDOS], [ac_cv_win_or_dos], [ AC_TRY_COMPILE([], [#if !defined _WIN32 && !defined __WIN32__ && !defined __MSDOS__ && !defined __CYGWIN__ neither MSDOS nor Windows #endif], [ac_cv_win_or_dos=yes], [ac_cv_win_or_dos=no]) ]) if test x"$ac_cv_win_or_dos" = xyes; then ac_fs_accepts_drive_letter_prefix=1 ac_fs_backslash_is_file_name_separator=1 AC_CACHE_CHECK([whether drive letter can start relative path], [ac_cv_drive_letter_can_be_relative], [ AC_TRY_COMPILE([], [#if defined __CYGWIN__ drive letters are always absolute #endif], [ac_cv_drive_letter_can_be_relative=yes], [ac_cv_drive_letter_can_be_relative=no]) ]) if test x"$ac_cv_drive_letter_can_be_relative" = xyes; then ac_fs_drive_letter_can_be_relative=1 else ac_fs_drive_letter_can_be_relative=0 fi else ac_fs_accepts_drive_letter_prefix=0 ac_fs_backslash_is_file_name_separator=0 ac_fs_drive_letter_can_be_relative=0 fi AC_DEFINE_UNQUOTED([FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX], $ac_fs_accepts_drive_letter_prefix, [Define on systems for which file names may have a so-called `drive letter' prefix, define this to compute the length of that prefix, including the colon.]) AH_VERBATIM(ISSLASH, [#if FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR # define ISSLASH(C) ((C) == '/' || (C) == '\\') #else # define ISSLASH(C) ((C) == '/') #endif]) AC_DEFINE_UNQUOTED([FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR], $ac_fs_backslash_is_file_name_separator, [Define if the backslash character may also serve as a file name component separator.]) AC_DEFINE_UNQUOTED([FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE], $ac_fs_drive_letter_can_be_relative, [Define if a drive letter prefix denotes a relative path if it is not followed by a file name component separator.]) ]) gnuit-4.9.5/m4/inttypes-pri.m40000644000175000017500000000220211146671375013040 00000000000000# inttypes-pri.m4 serial 6 (gettext-0.18) dnl Copyright (C) 1997-2002, 2006, 2008, 2009 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Bruno Haible. AC_PREREQ([2.52]) # Define PRI_MACROS_BROKEN if exists and defines the PRI* # macros to non-string values. This is the case on AIX 4.3.3. AC_DEFUN([gt_INTTYPES_PRI], [ AC_CHECK_HEADERS([inttypes.h]) if test $ac_cv_header_inttypes_h = yes; then AC_CACHE_CHECK([whether the inttypes.h PRIxNN macros are broken], [gt_cv_inttypes_pri_broken], [ AC_TRY_COMPILE([#include #ifdef PRId32 char *p = PRId32; #endif ], [], [gt_cv_inttypes_pri_broken=no], [gt_cv_inttypes_pri_broken=yes]) ]) fi if test "$gt_cv_inttypes_pri_broken" = yes; then AC_DEFINE_UNQUOTED([PRI_MACROS_BROKEN], [1], [Define if exists and defines unusable PRI* macros.]) PRI_MACROS_BROKEN=1 else PRI_MACROS_BROKEN=0 fi AC_SUBST([PRI_MACROS_BROKEN]) ]) gnuit-4.9.5/m4/sigaction.m40000644000175000017500000000243711146671376012364 00000000000000# sigaction.m4 serial 5 dnl Copyright (C) 2008 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. # Determine if sigaction interface is present. AC_DEFUN([gl_SIGACTION], [ AC_REQUIRE([gl_SIGNAL_H_DEFAULTS]) AC_CHECK_FUNCS_ONCE([sigaction]) if test $ac_cv_func_sigaction = yes; then AC_CHECK_MEMBERS([struct sigaction.sa_sigaction], , , [[#include ]]) if test $ac_cv_member_struct_sigaction_sa_sigaction = no; then HAVE_STRUCT_SIGACTION_SA_SIGACTION=0 fi else HAVE_SIGACTION=0 AC_LIBOBJ([sigaction]) gl_PREREQ_SIGACTION fi ]) # Prerequisites of the part of lib/signal.in.h and of lib/sigaction.c. AC_DEFUN([gl_PREREQ_SIGACTION], [ AC_REQUIRE([gl_SIGNAL_H_DEFAULTS]) AC_REQUIRE([AC_C_RESTRICT]) AC_REQUIRE([AC_TYPE_UID_T]) AC_REQUIRE([gl_PREREQ_SIG_HANDLER_H]) AC_CHECK_FUNCS_ONCE([sigaltstack siginterrupt]) AC_CHECK_TYPES([siginfo_t], [], [], [[ #include ]]) if test $ac_cv_type_siginfo_t = no; then HAVE_SIGINFO_T=0 fi ]) # Prerequisites of lib/sig-handler.h. AC_DEFUN([gl_PREREQ_SIG_HANDLER_H], [ AC_REQUIRE([AC_C_INLINE]) ]) gnuit-4.9.5/m4/flexmember.m40000644000175000017500000000275111146671375012530 00000000000000# serial 2 # Check for flexible array member support. # Copyright (C) 2006, 2009 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. # Written by Paul Eggert. AC_DEFUN([AC_C_FLEXIBLE_ARRAY_MEMBER], [ AC_CACHE_CHECK([for flexible array member], ac_cv_c_flexmember, [AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [[#include #include #include struct s { int n; double d[]; };]], [[int m = getchar (); struct s *p = malloc (offsetof (struct s, d) + m * sizeof (double)); p->d[0] = 0.0; return p->d != (double *) NULL;]])], [ac_cv_c_flexmember=yes], [ac_cv_c_flexmember=no])]) if test $ac_cv_c_flexmember = yes; then AC_DEFINE([FLEXIBLE_ARRAY_MEMBER], [], [Define to nothing if C supports flexible array members, and to 1 if it does not. That way, with a declaration like `struct s { int n; double d@<:@FLEXIBLE_ARRAY_MEMBER@:>@; };', the struct hack can be used with pre-C99 compilers. When computing the size of such an object, don't use 'sizeof (struct s)' as it overestimates the size. Use 'offsetof (struct s, d)' instead. Don't use 'offsetof (struct s, d@<:@0@:>@)', as this doesn't work with MSVC and with C++ compilers.]) else AC_DEFINE([FLEXIBLE_ARRAY_MEMBER], [1]) fi ]) gnuit-4.9.5/m4/utimes-null.m40000644000175000017500000000226111146671376012655 00000000000000# serial 8 # Copyright (C) 1998-1999, 2001, 2003-2004, 2006, 2009 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. dnl Shamelessly cloned from acspecific.m4's AC_FUNC_UTIME_NULL, dnl then do case-insensitive s/utime/utimes/. AC_DEFUN([gl_FUNC_UTIMES_NULL], [AC_CACHE_CHECK([whether utimes accepts a null argument], [ac_cv_func_utimes_null], [rm -f conftest.data; > conftest.data AC_TRY_RUN([ /* In case stat has been defined to rpl_stat, undef it here. */ #undef stat #include #include #include int main () { struct stat s, t; return ! (stat ("conftest.data", &s) == 0 && utimes ("conftest.data", 0) == 0 && stat ("conftest.data", &t) == 0 && t.st_mtime >= s.st_mtime && t.st_mtime - s.st_mtime < 120)); }], ac_cv_func_utimes_null=yes, ac_cv_func_utimes_null=no, ac_cv_func_utimes_null=no) rm -f core core.* *.core]) if test $ac_cv_func_utimes_null = yes; then AC_DEFINE([HAVE_UTIMES_NULL], [1], [Define if utimes accepts a null argument]) fi ] ) gnuit-4.9.5/m4/locale-ja.m40000644000175000017500000000774311146671376012240 00000000000000# locale-ja.m4 serial 7 dnl Copyright (C) 2003, 2005-2009 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Bruno Haible. dnl Determine the name of a japanese locale with EUC-JP encoding. AC_DEFUN([gt_LOCALE_JA], [ AC_REQUIRE([AC_CANONICAL_HOST]) AC_REQUIRE([AM_LANGINFO_CODESET]) AC_CACHE_CHECK([for a traditional japanese locale], [gt_cv_locale_ja], [ AC_LANG_CONFTEST([AC_LANG_SOURCE([ changequote(,)dnl #include #include #if HAVE_LANGINFO_CODESET # include #endif #include #include struct tm t; char buf[16]; int main () { const char *p; /* Check whether the given locale name is recognized by the system. */ if (setlocale (LC_ALL, "") == NULL) return 1; /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) is empty, and the behaviour of Tcl 8.4 in this locale is not useful. On OpenBSD 4.0, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "646". In this situation, some unit tests fail. */ #if HAVE_LANGINFO_CODESET { const char *cs = nl_langinfo (CODESET); if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0) return 1; } #endif #ifdef __CYGWIN__ /* On Cygwin, avoid locale names without encoding suffix, because the locale_charset() function relies on the encoding suffix. Note that LC_ALL is set on the command line. */ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; #endif /* Check whether MB_CUR_MAX is > 1. This excludes the dysfunctional locales on Cygwin 1.5.x. */ if (MB_CUR_MAX == 1) return 1; /* Check whether in a month name, no byte in the range 0x80..0x9F occurs. This excludes the UTF-8 encoding. */ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1; for (p = buf; *p != '\0'; p++) if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0) return 1; return 0; } changequote([,])dnl ])]) if AC_TRY_EVAL([ac_link]) && test -s conftest$ac_exeext; then # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the # configure script would override the LC_ALL setting. Likewise for # LC_CTYPE, which is also set at the beginning of the configure script. # Test for the AIX locale name. if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_ja=ja_JP else # Test for the locale name with explicit encoding suffix. if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_ja=ja_JP.EUC-JP else # Test for the HP-UX, OSF/1, NetBSD locale name. if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_ja=ja_JP.eucJP else # Test for the IRIX, FreeBSD locale name. if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_ja=ja_JP.EUC else # Test for the Solaris 7 locale name. if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_ja=ja else # Special test for NetBSD 1.6. if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then gt_cv_locale_ja=ja_JP.eucJP else # None found. gt_cv_locale_ja=none fi fi fi fi fi fi fi rm -fr conftest* ]) LOCALE_JA=$gt_cv_locale_ja AC_SUBST([LOCALE_JA]) ]) gnuit-4.9.5/m4/strings_h.m40000644000175000017500000000215011146671376012374 00000000000000# Configure a replacement for . # Copyright (C) 2007 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. AC_DEFUN([gl_HEADER_STRINGS_H], [ dnl Use AC_REQUIRE here, so that the default behavior below is expanded dnl once only, before all statements that occur in other macros. AC_REQUIRE([gl_HEADER_STRINGS_H_BODY]) ]) AC_DEFUN([gl_HEADER_STRINGS_H_BODY], [ AC_REQUIRE([gl_HEADER_STRINGS_H_DEFAULTS]) gl_CHECK_NEXT_HEADERS([strings.h]) ]) AC_DEFUN([gl_STRINGS_MODULE_INDICATOR], [ dnl Use AC_REQUIRE here, so that the default settings are expanded once only. AC_REQUIRE([gl_HEADER_STRINGS_H_DEFAULTS]) GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1 ]) AC_DEFUN([gl_HEADER_STRINGS_H_DEFAULTS], [ dnl Assume proper GNU behavior unless another module says otherwise. HAVE_STRCASECMP=1; AC_SUBST([HAVE_STRCASECMP]) HAVE_DECL_STRNCASECMP=1; AC_SUBST([HAVE_DECL_STRNCASECMP]) ]) gnuit-4.9.5/m4/getopt.m40000644000175000017500000000470311146671375011703 00000000000000# getopt.m4 serial 14 dnl Copyright (C) 2002-2006, 2008 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. # The getopt module assume you want GNU getopt, with getopt_long etc, # rather than vanilla POSIX getopt. This means your code should # always include for the getopt prototypes. AC_DEFUN([gl_GETOPT_SUBSTITUTE], [ AC_LIBOBJ([getopt]) AC_LIBOBJ([getopt1]) gl_GETOPT_SUBSTITUTE_HEADER gl_PREREQ_GETOPT ]) AC_DEFUN([gl_GETOPT_SUBSTITUTE_HEADER], [ GETOPT_H=getopt.h AC_DEFINE([__GETOPT_PREFIX], [[rpl_]], [Define to rpl_ if the getopt replacement functions and variables should be used.]) AC_SUBST([GETOPT_H]) ]) AC_DEFUN([gl_GETOPT_CHECK_HEADERS], [ if test -z "$GETOPT_H"; then AC_CHECK_HEADERS([getopt.h], [], [GETOPT_H=getopt.h]) fi if test -z "$GETOPT_H"; then AC_CHECK_FUNCS([getopt_long_only], [], [GETOPT_H=getopt.h]) fi dnl BSD getopt_long uses an incompatible method to reset option processing, dnl and (as of 2004-10-15) mishandles optional option-arguments. if test -z "$GETOPT_H"; then AC_CHECK_DECL([optreset], [GETOPT_H=getopt.h], [], [#include ]) fi dnl Solaris 10 getopt doesn't handle `+' as a leading character in an dnl option string (as of 2005-05-05). if test -z "$GETOPT_H"; then AC_CACHE_CHECK([for working GNU getopt function], [gl_cv_func_gnu_getopt], [AC_RUN_IFELSE( [AC_LANG_PROGRAM([[#include ]], [[ char *myargv[3]; myargv[0] = "conftest"; myargv[1] = "-+"; myargv[2] = 0; return getopt (2, myargv, "+a") != '?'; ]])], [gl_cv_func_gnu_getopt=yes], [gl_cv_func_gnu_getopt=no], [dnl cross compiling - pessimistically guess based on decls dnl Solaris 10 getopt doesn't handle `+' as a leading character in an dnl option string (as of 2005-05-05). AC_CHECK_DECL([getopt_clip], [gl_cv_func_gnu_getopt=no], [gl_cv_func_gnu_getopt=yes], [#include ])])]) if test "$gl_cv_func_gnu_getopt" = "no"; then GETOPT_H=getopt.h fi fi ]) AC_DEFUN([gl_GETOPT_IFELSE], [ AC_REQUIRE([gl_GETOPT_CHECK_HEADERS]) AS_IF([test -n "$GETOPT_H"], [$1], [$2]) ]) AC_DEFUN([gl_GETOPT], [gl_GETOPT_IFELSE([gl_GETOPT_SUBSTITUTE])]) # Prerequisites of lib/getopt*. AC_DEFUN([gl_PREREQ_GETOPT], [ AC_CHECK_DECLS_ONCE([getenv]) ]) gnuit-4.9.5/m4/tempname.m40000644000175000017500000000111111146671376012176 00000000000000#serial 3 # Copyright (C) 2006-2007 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. # glibc provides __gen_tempname as a wrapper for mk[ds]temp. Expose # it as a public API, and provide it on systems that are lacking. AC_DEFUN([gl_FUNC_GEN_TEMPNAME], [ AC_REQUIRE([AC_SYS_LARGEFILE]) AC_LIBOBJ([tempname]) gl_PREREQ_TEMPNAME ]) # Prerequisites of lib/tempname.c. AC_DEFUN([gl_PREREQ_TEMPNAME], [ : ]) gnuit-4.9.5/m4/wint_t.m40000644000175000017500000000172611146671376011710 00000000000000# wint_t.m4 serial 4 (gettext-0.18) dnl Copyright (C) 2003, 2007-2009 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Bruno Haible. dnl Test whether has the 'wint_t' type. dnl Prerequisite: AC_PROG_CC AC_DEFUN([gt_TYPE_WINT_T], [ AC_CACHE_CHECK([for wint_t], [gt_cv_c_wint_t], [AC_TRY_COMPILE([ /* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #include #include wint_t foo = (wchar_t)'\0';], , [gt_cv_c_wint_t=yes], [gt_cv_c_wint_t=no])]) if test $gt_cv_c_wint_t = yes; then AC_DEFINE([HAVE_WINT_T], [1], [Define if you have the 'wint_t' type.]) fi ]) gnuit-4.9.5/m4/gnulib-common.m40000644000175000017500000001012511146671375013142 00000000000000# gnulib-common.m4 serial 10 dnl Copyright (C) 2007-2009 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. # gl_COMMON # is expanded unconditionally through gnulib-tool magic. AC_DEFUN([gl_COMMON], [ dnl Use AC_REQUIRE here, so that the code is expanded once only. AC_REQUIRE([gl_00GNULIB]) AC_REQUIRE([gl_COMMON_BODY]) ]) AC_DEFUN([gl_COMMON_BODY], [ AH_VERBATIM([isoc99_inline], [/* Work around a bug in Apple GCC 4.0.1 build 5465: In C99 mode, it supports the ISO C 99 semantics of 'extern inline' (unlike the GNU C semantics of earlier versions), but does not display it by setting __GNUC_STDC_INLINE__. __APPLE__ && __MACH__ test for MacOS X. __APPLE_CC__ tests for the Apple compiler and its version. __STDC_VERSION__ tests for the C99 mode. */ #if defined __APPLE__ && defined __MACH__ && __APPLE_CC__ >= 5465 && !defined __cplusplus && __STDC_VERSION__ >= 199901L && !defined __GNUC_STDC_INLINE__ # define __GNUC_STDC_INLINE__ 1 #endif]) AH_VERBATIM([unused_parameter], [/* Define as a marker that can be attached to function parameter declarations for parameters that are not used. This helps to reduce warnings, such as from GCC -Wunused-parameter. */ #if __GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) # define _UNUSED_PARAMETER_ __attribute__ ((__unused__)) #else # define _UNUSED_PARAMETER_ #endif ]) ]) # gl_MODULE_INDICATOR([modulename]) # defines a C macro indicating the presence of the given module. AC_DEFUN([gl_MODULE_INDICATOR], [ AC_DEFINE([GNULIB_]translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___]), [1], [Define to 1 when using the gnulib module ]$1[.]) ]) # m4_foreach_w # is a backport of autoconf-2.59c's m4_foreach_w. # Remove this macro when we can assume autoconf >= 2.60. m4_ifndef([m4_foreach_w], [m4_define([m4_foreach_w], [m4_foreach([$1], m4_split(m4_normalize([$2]), [ ]), [$3])])]) # AC_PROG_MKDIR_P # is a backport of autoconf-2.60's AC_PROG_MKDIR_P. # Remove this macro when we can assume autoconf >= 2.60. m4_ifdef([AC_PROG_MKDIR_P], [], [ AC_DEFUN_ONCE([AC_PROG_MKDIR_P], [AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake MKDIR_P='$(mkdir_p)' AC_SUBST([MKDIR_P])])]) # AC_C_RESTRICT # This definition overrides the AC_C_RESTRICT macro from autoconf 2.60..2.61, # so that mixed use of GNU C and GNU C++ and mixed use of Sun C and Sun C++ # works. # This definition can be removed once autoconf >= 2.62 can be assumed. AC_DEFUN([AC_C_RESTRICT], [AC_CACHE_CHECK([for C/C++ restrict keyword], [ac_cv_c_restrict], [ac_cv_c_restrict=no # The order here caters to the fact that C++ does not require restrict. for ac_kw in __restrict __restrict__ _Restrict restrict; do AC_COMPILE_IFELSE([AC_LANG_PROGRAM( [[typedef int * int_ptr; int foo (int_ptr $ac_kw ip) { return ip[0]; }]], [[int s[1]; int * $ac_kw t = s; t[0] = 0; return foo(t)]])], [ac_cv_c_restrict=$ac_kw]) test "$ac_cv_c_restrict" != no && break done ]) AH_VERBATIM([restrict], [/* Define to the equivalent of the C99 'restrict' keyword, or to nothing if this is not supported. Do not define if restrict is supported directly. */ #undef restrict /* Work around a bug in Sun C++: it does not support _Restrict, even though the corresponding Sun C compiler does, which causes "#define restrict _Restrict" in the previous line. Perhaps some future version of Sun C++ will work with _Restrict; if so, it'll probably define __RESTRICT, just as Sun C does. */ #if defined __SUNPRO_CC && !defined __RESTRICT # define _Restrict #endif]) case $ac_cv_c_restrict in restrict) ;; no) AC_DEFINE([restrict], []) ;; *) AC_DEFINE_UNQUOTED([restrict], [$ac_cv_c_restrict]) ;; esac ]) # gl_BIGENDIAN # is like AC_C_BIGENDIAN, except that it can be AC_REQUIREd. # Note that AC_REQUIRE([AC_C_BIGENDIAN]) does not work reliably because some # macros invoke AC_C_BIGENDIAN with arguments. AC_DEFUN([gl_BIGENDIAN], [ AC_C_BIGENDIAN ]) gnuit-4.9.5/m4/inttypes.m40000644000175000017500000002242411146671375012260 00000000000000# inttypes.m4 serial 14 dnl Copyright (C) 2006-2009 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Derek Price, Bruno Haible. dnl Test whether is supported or must be substituted. AC_DEFUN([gl_INTTYPES_H], [ AC_REQUIRE([gl_STDINT_H]) AC_REQUIRE([gt_INTTYPES_PRI]) AC_CHECK_DECLS_ONCE([imaxabs]) AC_CHECK_DECLS_ONCE([imaxdiv]) AC_CHECK_DECLS_ONCE([strtoimax]) AC_CHECK_DECLS_ONCE([strtoumax]) dnl Now see if we need a substitute . dnl A complete requires dnl - a complete , dnl - the existence of an , dnl - that imaxabs, imaxdiv, strtoimax, strtoumax are declared, dnl - some additional tests. AC_CACHE_CHECK([whether inttypes.h conforms to C99], [gl_cv_header_working_inttypes_h], [gl_cv_header_working_inttypes_h=no if test "$gl_cv_header_working_stdint_h" = yes \ && test $ac_cv_header_inttypes_h = yes \ && test "$ac_cv_have_decl_imaxabs" = yes \ && test "$ac_cv_have_decl_imaxdiv" = yes \ && test "$ac_cv_have_decl_strtoimax" = yes \ && test "$ac_cv_have_decl_strtoumax" = yes; then AC_COMPILE_IFELSE([ AC_LANG_PROGRAM([[ #include #define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */ #define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */ #define __STDC_FORMAT_MACROS 1 /* to make it work also in C++ mode */ #define _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H /* work if build isn't clean */ #include /* No need to duplicate the tests of stdint.m4; they are subsumed by $gl_cv_header_working_stdint_h = yes. */ /* Tests for macros supposed to be defined in inttypes.h. */ const char *k = /* implicit string concatenation */ #ifdef INT8_MAX PRId8 PRIi8 #endif #ifdef UINT8_MAX PRIo8 PRIu8 PRIx8 PRIX8 #endif #ifdef INT16_MAX PRId16 PRIi16 #endif #ifdef UINT16_MAX PRIo16 PRIu16 PRIx16 PRIX16 #endif #ifdef INT32_MAX PRId32 PRIi32 #endif #ifdef UINT32_MAX PRIo32 PRIu32 PRIx32 PRIX32 #endif #ifdef INT64_MAX PRId64 PRIi64 #endif #ifdef UINT64_MAX PRIo64 PRIu64 PRIx64 PRIX64 #endif PRIdLEAST8 PRIiLEAST8 PRIoLEAST8 PRIuLEAST8 PRIxLEAST8 PRIXLEAST8 PRIdLEAST16 PRIiLEAST16 PRIoLEAST16 PRIuLEAST16 PRIxLEAST16 PRIXLEAST16 PRIdLEAST32 PRIiLEAST32 PRIoLEAST32 PRIuLEAST32 PRIxLEAST32 PRIXLEAST32 PRIdLEAST64 PRIiLEAST64 PRIoLEAST64 PRIuLEAST64 PRIxLEAST64 PRIXLEAST64 PRIdFAST8 PRIiFAST8 PRIoFAST8 PRIuFAST8 PRIxFAST8 PRIXFAST8 PRIdFAST16 PRIiFAST16 PRIoFAST16 PRIuFAST16 PRIxFAST16 PRIXFAST16 PRIdFAST32 PRIiFAST32 PRIoFAST32 PRIuFAST32 PRIxFAST32 PRIXFAST32 PRIdFAST64 PRIiFAST64 PRIoFAST64 PRIuFAST64 PRIxFAST64 PRIXFAST64 PRIdMAX PRIiMAX PRIoMAX PRIuMAX PRIxMAX PRIXMAX #ifdef INTPTR_MAX PRIdPTR PRIiPTR #endif #ifdef UINTPTR_MAX PRIoPTR PRIuPTR PRIxPTR PRIXPTR #endif ; const char *l = /* implicit string concatenation */ #ifdef INT8_MAX SCNd8 SCNi8 #endif #ifdef UINT8_MAX SCNo8 SCNu8 SCNx8 #endif #ifdef INT16_MAX SCNd16 SCNi16 #endif #ifdef UINT16_MAX SCNo16 SCNu16 SCNx16 #endif #ifdef INT32_MAX SCNd32 SCNi32 #endif #ifdef UINT32_MAX SCNo32 SCNu32 SCNx32 #endif #ifdef INT64_MAX SCNd64 SCNi64 #endif #ifdef UINT64_MAX SCNo64 SCNu64 SCNx64 #endif SCNdLEAST8 SCNiLEAST8 SCNoLEAST8 SCNuLEAST8 SCNxLEAST8 SCNdLEAST16 SCNiLEAST16 SCNoLEAST16 SCNuLEAST16 SCNxLEAST16 SCNdLEAST32 SCNiLEAST32 SCNoLEAST32 SCNuLEAST32 SCNxLEAST32 SCNdLEAST64 SCNiLEAST64 SCNoLEAST64 SCNuLEAST64 SCNxLEAST64 SCNdFAST8 SCNiFAST8 SCNoFAST8 SCNuFAST8 SCNxFAST8 SCNdFAST16 SCNiFAST16 SCNoFAST16 SCNuFAST16 SCNxFAST16 SCNdFAST32 SCNiFAST32 SCNoFAST32 SCNuFAST32 SCNxFAST32 SCNdFAST64 SCNiFAST64 SCNoFAST64 SCNuFAST64 SCNxFAST64 SCNdMAX SCNiMAX SCNoMAX SCNuMAX SCNxMAX #ifdef INTPTR_MAX SCNdPTR SCNiPTR #endif #ifdef UINTPTR_MAX SCNoPTR SCNuPTR SCNxPTR #endif ; ]])], [gl_cv_header_working_inttypes_h=yes]) fi]) dnl Override always, so that the portability warnings work. if false && test $gl_cv_header_working_inttypes_h = yes; then dnl Use the existing . INTTYPES_H='' else AC_REQUIRE([gl_INTTYPES_H_DEFAULTS]) gl_CHECK_NEXT_HEADERS([inttypes.h]) AC_REQUIRE([gl_MULTIARCH]) dnl Ensure that defines the limit macros, since gnulib's dnl relies on them. This macro is only needed when a dnl C++ compiler is in use; it has no effect for a C compiler. dnl Also be careful to define __STDC_LIMIT_MACROS only when gnulib's dnl is going to be created, and to avoid redefinition warnings dnl if the __STDC_LIMIT_MACROS is already defined through the CPPFLAGS. AC_DEFINE([GL_TRIGGER_STDC_LIMIT_MACROS], [1], [Define to make the limit macros in visible.]) AH_VERBATIM([__STDC_LIMIT_MACROS_ZZZ], [/* Ensure that defines the limit macros, since gnulib's relies on them. */ #if defined __cplusplus && !defined __STDC_LIMIT_MACROS && GL_TRIGGER_STDC_LIMIT_MACROS # define __STDC_LIMIT_MACROS 1 #endif ]) PRIPTR_PREFIX= if test -n "$STDINT_H"; then dnl Using the gnulib . It always defines intptr_t to 'long'. PRIPTR_PREFIX='"l"' else dnl Using the system's . for glpfx in '' l ll I64; do case $glpfx in '') gltype1='int';; l) gltype1='long int';; ll) gltype1='long long int';; I64) gltype1='__int64';; esac AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([[#include extern intptr_t foo; extern $gltype1 foo;]])], [PRIPTR_PREFIX='"'$glpfx'"']) test -n "$PRIPTR_PREFIX" && break done fi AC_SUBST([PRIPTR_PREFIX]) if test "$ac_cv_have_decl_imaxabs" = yes; then HAVE_DECL_IMAXABS=1 else HAVE_DECL_IMAXABS=0 fi if test "$ac_cv_have_decl_imaxdiv" = yes; then HAVE_DECL_IMAXDIV=1 else HAVE_DECL_IMAXDIV=0 fi if test "$ac_cv_have_decl_strtoimax" = yes; then HAVE_DECL_STRTOIMAX=1 else HAVE_DECL_STRTOIMAX=0 fi if test "$ac_cv_have_decl_strtoumax" = yes; then HAVE_DECL_STRTOUMAX=1 else HAVE_DECL_STRTOUMAX=0 fi gl_INTTYPES_CHECK_LONG_LONG_INT_CONDITION( [INT32_MAX_LT_INTMAX_MAX], [defined INT32_MAX && defined INTMAX_MAX], [INT32_MAX < INTMAX_MAX], [sizeof (int) < sizeof (long long int)]) if test $APPLE_UNIVERSAL_BUILD = 0; then gl_INTTYPES_CHECK_LONG_LONG_INT_CONDITION( [INT64_MAX_EQ_LONG_MAX], [defined INT64_MAX], [INT64_MAX == LONG_MAX], [sizeof (long long int) == sizeof (long int)]) else INT64_MAX_EQ_LONG_MAX=-1 fi gl_INTTYPES_CHECK_LONG_LONG_INT_CONDITION( [UINT32_MAX_LT_UINTMAX_MAX], [defined UINT32_MAX && defined UINTMAX_MAX], [UINT32_MAX < UINTMAX_MAX], [sizeof (unsigned int) < sizeof (unsigned long long int)]) if test $APPLE_UNIVERSAL_BUILD = 0; then gl_INTTYPES_CHECK_LONG_LONG_INT_CONDITION( [UINT64_MAX_EQ_ULONG_MAX], [defined UINT64_MAX], [UINT64_MAX == ULONG_MAX], [sizeof (unsigned long long int) == sizeof (unsigned long int)]) else UINT64_MAX_EQ_ULONG_MAX=-1 fi INTTYPES_H='inttypes.h' fi AC_SUBST([INTTYPES_H]) ]) # Define the symbol $1 to be 1 if the condition is true, 0 otherwise. # If $2 is true, the condition is $3; otherwise if long long int is supported # approximate the condition with $4; otherwise, assume the condition is false. # The condition should work on all C99 platforms; the approximations should be # good enough to work on all practical pre-C99 platforms. # $2 is evaluated by the C preprocessor, $3 and $4 as compile-time constants. AC_DEFUN([gl_INTTYPES_CHECK_LONG_LONG_INT_CONDITION], [ AC_CACHE_CHECK([whether $3], [gl_cv_test_$1], [AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [[/* Work also in C++ mode. */ #define __STDC_LIMIT_MACROS 1 /* Work if build is not clean. */ #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H #include #if HAVE_STDINT_H #include #endif #if $2 #define CONDITION ($3) #elif HAVE_LONG_LONG_INT #define CONDITION ($4) #else #define CONDITION 0 #endif int test[CONDITION ? 1 : -1];]])], [gl_cv_test_$1=yes], [gl_cv_test_$1=no])]) if test $gl_cv_test_$1 = yes; then $1=1; else $1=0; fi AC_SUBST([$1]) ]) AC_DEFUN([gl_INTTYPES_MODULE_INDICATOR], [ dnl Use AC_REQUIRE here, so that the default settings are expanded once only. AC_REQUIRE([gl_INTTYPES_H_DEFAULTS]) GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1 ]) AC_DEFUN([gl_INTTYPES_H_DEFAULTS], [ GNULIB_IMAXABS=0; AC_SUBST([GNULIB_IMAXABS]) GNULIB_IMAXDIV=0; AC_SUBST([GNULIB_IMAXDIV]) GNULIB_STRTOIMAX=0; AC_SUBST([GNULIB_STRTOIMAX]) GNULIB_STRTOUMAX=0; AC_SUBST([GNULIB_STRTOUMAX]) dnl Assume proper GNU behavior unless another module says otherwise. HAVE_DECL_IMAXABS=1; AC_SUBST([HAVE_DECL_IMAXABS]) HAVE_DECL_IMAXDIV=1; AC_SUBST([HAVE_DECL_IMAXDIV]) HAVE_DECL_STRTOIMAX=1; AC_SUBST([HAVE_DECL_STRTOIMAX]) HAVE_DECL_STRTOUMAX=1; AC_SUBST([HAVE_DECL_STRTOUMAX]) ]) gnuit-4.9.5/m4/xstrtol.m40000644000175000017500000000061611146671376012120 00000000000000#serial 10 dnl Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 Free Software dnl Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_XSTRTOL], [ AC_LIBOBJ([xstrtol]) AC_LIBOBJ([xstrtoul]) AC_LIBOBJ([xstrtol-error]) ]) gnuit-4.9.5/m4/sys_socket_h.m40000644000175000017500000001042211146671376013072 00000000000000# sys_socket_h.m4 serial 12 dnl Copyright (C) 2005-2008 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Simon Josefsson. AC_DEFUN([gl_HEADER_SYS_SOCKET], [ AC_REQUIRE([gl_SYS_SOCKET_H_DEFAULTS]) AC_REQUIRE([AC_C_INLINE]) AC_CACHE_CHECK([whether is self-contained], [gl_cv_header_sys_socket_h_selfcontained], [ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], [[]])], [gl_cv_header_sys_socket_h_selfcontained=yes], [gl_cv_header_sys_socket_h_selfcontained=no]) ]) if test $gl_cv_header_sys_socket_h_selfcontained = yes; then SYS_SOCKET_H='' dnl If the shutdown function exists, should define dnl SHUT_RD, SHUT_WR, SHUT_RDWR. AC_CHECK_FUNCS([shutdown]) if test $ac_cv_func_shutdown = yes; then AC_CACHE_CHECK([whether defines the SHUT_* macros], [gl_cv_header_sys_socket_h_shut], [ AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([[#include ]], [[int a[] = { SHUT_RD, SHUT_WR, SHUT_RDWR };]])], [gl_cv_header_sys_socket_h_shut=yes], [gl_cv_header_sys_socket_h_shut=no]) ]) if test $gl_cv_header_sys_socket_h_shut = no; then SYS_SOCKET_H='sys/socket.h' fi fi else SYS_SOCKET_H='sys/socket.h' fi if test -n "$SYS_SOCKET_H"; then dnl Check prerequisites of the replacement. gl_CHECK_NEXT_HEADERS([sys/socket.h]) if test $ac_cv_header_sys_socket_h = yes; then HAVE_SYS_SOCKET_H=1 HAVE_WS2TCPIP_H=0 else HAVE_SYS_SOCKET_H=0 dnl We cannot use AC_CHECK_HEADERS_ONCE here, because that would make dnl the check for those headers unconditional; yet cygwin reports dnl that the headers are present but cannot be compiled (since on dnl cygwin, all socket information should come from sys/socket.h). AC_CHECK_HEADERS([ws2tcpip.h]) if test $ac_cv_header_ws2tcpip_h = yes; then HAVE_WS2TCPIP_H=1 else HAVE_WS2TCPIP_H=0 fi fi gl_PREREQ_SYS_H_WINSOCK2 AC_SUBST([HAVE_SYS_SOCKET_H]) AC_SUBST([HAVE_WS2TCPIP_H]) fi AC_SUBST([SYS_SOCKET_H]) ]) # Common prerequisites of of the replacement and of the # replacement. # Sets and substitutes HAVE_WINSOCK2_H. AC_DEFUN([gl_PREREQ_SYS_H_WINSOCK2], [ m4_ifdef([gl_UNISTD_H_DEFAULTS], [AC_REQUIRE([gl_UNISTD_H_DEFAULTS])]) m4_ifdef([gl_SYS_IOCTL_H_DEFAULTS], [AC_REQUIRE([gl_SYS_IOCTL_H_DEFAULTS])]) AC_CHECK_HEADERS_ONCE([sys/socket.h]) if test $ac_cv_header_sys_socket_h != yes; then dnl We cannot use AC_CHECK_HEADERS_ONCE here, because that would make dnl the check for those headers unconditional; yet cygwin reports dnl that the headers are present but cannot be compiled (since on dnl cygwin, all socket information should come from sys/socket.h). AC_CHECK_HEADERS([winsock2.h]) fi if test "$ac_cv_header_winsock2_h" = yes; then HAVE_WINSOCK2_H=1 UNISTD_H_HAVE_WINSOCK2_H=1 SYS_IOCTL_H_HAVE_WINSOCK2_H=1 else HAVE_WINSOCK2_H=0 fi AC_SUBST([HAVE_WINSOCK2_H]) ]) AC_DEFUN([gl_SYS_SOCKET_MODULE_INDICATOR], [ dnl Use AC_REQUIRE here, so that the default settings are expanded once only. AC_REQUIRE([gl_SYS_SOCKET_H_DEFAULTS]) GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1 ]) AC_DEFUN([gl_SYS_SOCKET_H_DEFAULTS], [ GNULIB_SOCKET=0; AC_SUBST([GNULIB_SOCKET]) GNULIB_CONNECT=0; AC_SUBST([GNULIB_CONNECT]) GNULIB_ACCEPT=0; AC_SUBST([GNULIB_ACCEPT]) GNULIB_BIND=0; AC_SUBST([GNULIB_BIND]) GNULIB_GETPEERNAME=0; AC_SUBST([GNULIB_GETPEERNAME]) GNULIB_GETSOCKNAME=0; AC_SUBST([GNULIB_GETSOCKNAME]) GNULIB_GETSOCKOPT=0; AC_SUBST([GNULIB_GETSOCKOPT]) GNULIB_LISTEN=0; AC_SUBST([GNULIB_LISTEN]) GNULIB_RECV=0; AC_SUBST([GNULIB_RECV]) GNULIB_SEND=0; AC_SUBST([GNULIB_SEND]) GNULIB_RECVFROM=0; AC_SUBST([GNULIB_RECVFROM]) GNULIB_SENDTO=0; AC_SUBST([GNULIB_SENDTO]) GNULIB_SETSOCKOPT=0; AC_SUBST([GNULIB_SETSOCKOPT]) GNULIB_SHUTDOWN=0; AC_SUBST([GNULIB_SHUTDOWN]) ]) gnuit-4.9.5/m4/stdlib_h.m40000644000175000017500000000600211146671376012164 00000000000000# stdlib_h.m4 serial 14 dnl Copyright (C) 2007-2009 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_STDLIB_H], [ AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) gl_CHECK_NEXT_HEADERS([stdlib.h]) AC_CHECK_HEADERS([random.h]) if test $ac_cv_header_random_h = yes; then HAVE_RANDOM_H=1 else HAVE_RANDOM_H=0 fi AC_SUBST([HAVE_RANDOM_H]) AC_CHECK_TYPES([struct random_data], [], [HAVE_STRUCT_RANDOM_DATA=0], [[#include #if HAVE_RANDOM_H # include #endif ]]) ]) AC_DEFUN([gl_STDLIB_MODULE_INDICATOR], [ dnl Use AC_REQUIRE here, so that the default settings are expanded once only. AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1 ]) AC_DEFUN([gl_STDLIB_H_DEFAULTS], [ GNULIB_MALLOC_POSIX=0; AC_SUBST([GNULIB_MALLOC_POSIX]) GNULIB_REALLOC_POSIX=0; AC_SUBST([GNULIB_REALLOC_POSIX]) GNULIB_CALLOC_POSIX=0; AC_SUBST([GNULIB_CALLOC_POSIX]) GNULIB_ATOLL=0; AC_SUBST([GNULIB_ATOLL]) GNULIB_GETLOADAVG=0; AC_SUBST([GNULIB_GETLOADAVG]) GNULIB_GETSUBOPT=0; AC_SUBST([GNULIB_GETSUBOPT]) GNULIB_MKDTEMP=0; AC_SUBST([GNULIB_MKDTEMP]) GNULIB_MKSTEMP=0; AC_SUBST([GNULIB_MKSTEMP]) GNULIB_PUTENV=0; AC_SUBST([GNULIB_PUTENV]) GNULIB_RANDOM_R=0; AC_SUBST([GNULIB_RANDOM_R]) GNULIB_RPMATCH=0; AC_SUBST([GNULIB_RPMATCH]) GNULIB_SETENV=0; AC_SUBST([GNULIB_SETENV]) GNULIB_STRTOD=0; AC_SUBST([GNULIB_STRTOD]) GNULIB_STRTOLL=0; AC_SUBST([GNULIB_STRTOLL]) GNULIB_STRTOULL=0; AC_SUBST([GNULIB_STRTOULL]) GNULIB_UNSETENV=0; AC_SUBST([GNULIB_UNSETENV]) dnl Assume proper GNU behavior unless another module says otherwise. HAVE_ATOLL=1; AC_SUBST([HAVE_ATOLL]) HAVE_CALLOC_POSIX=1; AC_SUBST([HAVE_CALLOC_POSIX]) HAVE_GETSUBOPT=1; AC_SUBST([HAVE_GETSUBOPT]) HAVE_MALLOC_POSIX=1; AC_SUBST([HAVE_MALLOC_POSIX]) HAVE_MKDTEMP=1; AC_SUBST([HAVE_MKDTEMP]) HAVE_REALLOC_POSIX=1; AC_SUBST([HAVE_REALLOC_POSIX]) HAVE_RANDOM_R=1; AC_SUBST([HAVE_RANDOM_R]) HAVE_RPMATCH=1; AC_SUBST([HAVE_RPMATCH]) HAVE_SETENV=1; AC_SUBST([HAVE_SETENV]) HAVE_STRTOD=1; AC_SUBST([HAVE_STRTOD]) HAVE_STRTOLL=1; AC_SUBST([HAVE_STRTOLL]) HAVE_STRTOULL=1; AC_SUBST([HAVE_STRTOULL]) HAVE_STRUCT_RANDOM_DATA=1; AC_SUBST([HAVE_STRUCT_RANDOM_DATA]) HAVE_SYS_LOADAVG_H=0; AC_SUBST([HAVE_SYS_LOADAVG_H]) HAVE_UNSETENV=1; AC_SUBST([HAVE_UNSETENV]) HAVE_DECL_GETLOADAVG=1; AC_SUBST([HAVE_DECL_GETLOADAVG]) REPLACE_MKSTEMP=0; AC_SUBST([REPLACE_MKSTEMP]) REPLACE_PUTENV=0; AC_SUBST([REPLACE_PUTENV]) REPLACE_STRTOD=0; AC_SUBST([REPLACE_STRTOD]) VOID_UNSETENV=0; AC_SUBST([VOID_UNSETENV]) ]) gnuit-4.9.5/m4/wcwidth.m40000644000175000017500000000456011146671376012054 00000000000000# wcwidth.m4 serial 14 dnl Copyright (C) 2006-2008 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_WCWIDTH], [ AC_REQUIRE([gl_WCHAR_H_DEFAULTS]) dnl Persuade glibc to declare wcwidth(). AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) AC_REQUIRE([gt_TYPE_WCHAR_T]) AC_REQUIRE([gt_TYPE_WINT_T]) AC_CHECK_HEADERS_ONCE([wchar.h]) AC_CHECK_FUNCS_ONCE([wcwidth]) AC_CHECK_DECLS([wcwidth], [], [], [ /* AIX 3.2.5 declares wcwidth in . */ #include /* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #include #include ]) if test $ac_cv_have_decl_wcwidth != yes; then HAVE_DECL_WCWIDTH=0 fi if test $ac_cv_func_wcwidth = no; then REPLACE_WCWIDTH=1 else dnl On MacOS X 10.3, wcwidth(0x0301) (COMBINING ACUTE ACCENT) returns 1. dnl On OSF/1 5.1, wcwidth(0x200B) (ZERO WIDTH SPACE) returns 1. dnl This leads to bugs in 'ls' (coreutils). AC_CACHE_CHECK([whether wcwidth works reasonably in UTF-8 locales], [gl_cv_func_wcwidth_works], [ AC_TRY_RUN([ #include /* AIX 3.2.5 declares wcwidth in . */ #include /* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #include #include #if !HAVE_DECL_WCWIDTH extern # ifdef __cplusplus "C" # endif int wcwidth (int); #endif int main () { if (setlocale (LC_ALL, "fr_FR.UTF-8") != NULL) if (wcwidth (0x0301) > 0 || wcwidth (0x200B) > 0) return 1; return 0; }], [gl_cv_func_wcwidth_works=yes], [gl_cv_func_wcwidth_works=no], [gl_cv_func_wcwidth_works="guessing no"]) ]) case "$gl_cv_func_wcwidth_works" in *yes) ;; *no) REPLACE_WCWIDTH=1 ;; esac fi if test $REPLACE_WCWIDTH = 1; then AC_LIBOBJ([wcwidth]) fi if test $REPLACE_WCWIDTH = 1 || test $HAVE_DECL_WCWIDTH = 0; then gl_REPLACE_WCHAR_H fi ]) gnuit-4.9.5/m4/open.m40000644000175000017500000000326211146671376011342 00000000000000# open.m4 serial 5 dnl Copyright (C) 2007-2009 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_OPEN], [ AC_REQUIRE([AC_CANONICAL_HOST]) case "$host_os" in mingw* | pw*) gl_REPLACE_OPEN ;; *) dnl open("foo/") should not create a file when the file name has a dnl trailing slash. AC_CACHE_CHECK([whether open recognizes a trailing slash], [gl_cv_func_open_slash], [ AC_TRY_RUN([ #include #if HAVE_UNISTD_H # include #endif int main () { return open ("conftest.sl/", O_CREAT, 0600) >= 0; }], [gl_cv_func_open_slash=yes], [gl_cv_func_open_slash=no], [ changequote(,)dnl case "$host_os" in solaris2.[0-9]*) gl_cv_func_open_slash="guessing no" ;; hpux*) gl_cv_func_open_slash="guessing no" ;; *) gl_cv_func_open_slash="guessing yes" ;; esac changequote([,])dnl ]) rm -f conftest.sl ]) case "$gl_cv_func_open_slash" in *no) AC_DEFINE([OPEN_TRAILING_SLASH_BUG], [1], [Define to 1 if open() fails to recognize a trailing slash.]) gl_REPLACE_OPEN ;; esac ;; esac ]) AC_DEFUN([gl_REPLACE_OPEN], [ AC_REQUIRE([gl_FCNTL_H_DEFAULTS]) if test $REPLACE_OPEN != 1; then AC_LIBOBJ([open]) gl_PREREQ_OPEN fi REPLACE_OPEN=1 ]) # Prerequisites of lib/open.c. AC_DEFUN([gl_PREREQ_OPEN], [ AC_REQUIRE([AC_C_INLINE]) : ]) gnuit-4.9.5/m4/unistd_h.m40000644000175000017500000000715711146671376012225 00000000000000# unistd_h.m4 serial 17 dnl Copyright (C) 2006-2009 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl Written by Simon Josefsson, Bruno Haible. AC_DEFUN([gl_UNISTD_H], [ dnl Use AC_REQUIRE here, so that the default behavior below is expanded dnl once only, before all statements that occur in other macros. AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) gl_CHECK_NEXT_HEADERS([unistd.h]) AC_CHECK_HEADERS_ONCE([unistd.h]) if test $ac_cv_header_unistd_h = yes; then HAVE_UNISTD_H=1 else HAVE_UNISTD_H=0 fi AC_SUBST([HAVE_UNISTD_H]) ]) AC_DEFUN([gl_UNISTD_MODULE_INDICATOR], [ dnl Use AC_REQUIRE here, so that the default settings are expanded once only. AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1 ]) AC_DEFUN([gl_UNISTD_H_DEFAULTS], [ GNULIB_CHOWN=0; AC_SUBST([GNULIB_CHOWN]) GNULIB_CLOSE=0; AC_SUBST([GNULIB_CLOSE]) GNULIB_DUP2=0; AC_SUBST([GNULIB_DUP2]) GNULIB_ENVIRON=0; AC_SUBST([GNULIB_ENVIRON]) GNULIB_EUIDACCESS=0; AC_SUBST([GNULIB_EUIDACCESS]) GNULIB_FCHDIR=0; AC_SUBST([GNULIB_FCHDIR]) GNULIB_FSYNC=0; AC_SUBST([GNULIB_FSYNC]) GNULIB_FTRUNCATE=0; AC_SUBST([GNULIB_FTRUNCATE]) GNULIB_GETCWD=0; AC_SUBST([GNULIB_GETCWD]) GNULIB_GETDOMAINNAME=0; AC_SUBST([GNULIB_GETDOMAINNAME]) GNULIB_GETDTABLESIZE=0; AC_SUBST([GNULIB_GETDTABLESIZE]) GNULIB_GETHOSTNAME=0; AC_SUBST([GNULIB_GETHOSTNAME]) GNULIB_GETLOGIN_R=0; AC_SUBST([GNULIB_GETLOGIN_R]) GNULIB_GETPAGESIZE=0; AC_SUBST([GNULIB_GETPAGESIZE]) GNULIB_GETUSERSHELL=0; AC_SUBST([GNULIB_GETUSERSHELL]) GNULIB_LCHOWN=0; AC_SUBST([GNULIB_LCHOWN]) GNULIB_LINK=0; AC_SUBST([GNULIB_LINK]) GNULIB_LSEEK=0; AC_SUBST([GNULIB_LSEEK]) GNULIB_READLINK=0; AC_SUBST([GNULIB_READLINK]) GNULIB_SLEEP=0; AC_SUBST([GNULIB_SLEEP]) GNULIB_UNISTD_H_SIGPIPE=0; AC_SUBST([GNULIB_UNISTD_H_SIGPIPE]) GNULIB_WRITE=0; AC_SUBST([GNULIB_WRITE]) dnl Assume proper GNU behavior unless another module says otherwise. HAVE_DUP2=1; AC_SUBST([HAVE_DUP2]) HAVE_EUIDACCESS=1; AC_SUBST([HAVE_EUIDACCESS]) HAVE_FSYNC=1; AC_SUBST([HAVE_FSYNC]) HAVE_FTRUNCATE=1; AC_SUBST([HAVE_FTRUNCATE]) HAVE_GETDOMAINNAME=1; AC_SUBST([HAVE_GETDOMAINNAME]) HAVE_GETDTABLESIZE=1; AC_SUBST([HAVE_GETDTABLESIZE]) HAVE_GETHOSTNAME=1; AC_SUBST([HAVE_GETHOSTNAME]) HAVE_GETPAGESIZE=1; AC_SUBST([HAVE_GETPAGESIZE]) HAVE_GETUSERSHELL=1; AC_SUBST([HAVE_GETUSERSHELL]) HAVE_LINK=1; AC_SUBST([HAVE_LINK]) HAVE_READLINK=1; AC_SUBST([HAVE_READLINK]) HAVE_SLEEP=1; AC_SUBST([HAVE_SLEEP]) HAVE_DECL_ENVIRON=1; AC_SUBST([HAVE_DECL_ENVIRON]) HAVE_DECL_GETLOGIN_R=1; AC_SUBST([HAVE_DECL_GETLOGIN_R]) HAVE_OS_H=0; AC_SUBST([HAVE_OS_H]) HAVE_SYS_PARAM_H=0; AC_SUBST([HAVE_SYS_PARAM_H]) REPLACE_CHOWN=0; AC_SUBST([REPLACE_CHOWN]) REPLACE_CLOSE=0; AC_SUBST([REPLACE_CLOSE]) REPLACE_FCHDIR=0; AC_SUBST([REPLACE_FCHDIR]) REPLACE_GETCWD=0; AC_SUBST([REPLACE_GETCWD]) REPLACE_GETPAGESIZE=0; AC_SUBST([REPLACE_GETPAGESIZE]) REPLACE_LCHOWN=0; AC_SUBST([REPLACE_LCHOWN]) REPLACE_LSEEK=0; AC_SUBST([REPLACE_LSEEK]) REPLACE_WRITE=0; AC_SUBST([REPLACE_WRITE]) UNISTD_H_HAVE_WINSOCK2_H=0; AC_SUBST([UNISTD_H_HAVE_WINSOCK2_H]) ]) gnuit-4.9.5/m4/mkstemp.m40000644000175000017500000000315411146671376012061 00000000000000#serial 17 # Copyright (C) 2001, 2003, 2004, 2005, 2006, 2007 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. # On some hosts (e.g., HP-UX 10.20, SunOS 4.1.4, Solaris 2.5.1), mkstemp has a # silly limit that it can create no more than 26 files from a given template. # Other systems lack mkstemp altogether. # On OSF1/Tru64 V4.0F, the system-provided mkstemp function can create # only 32 files per process. # On systems like the above, arrange to use the replacement function. AC_DEFUN([gl_FUNC_MKSTEMP], [ AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) AC_REQUIRE([AC_SYS_LARGEFILE]) AC_CACHE_CHECK([for working mkstemp], [gl_cv_func_working_mkstemp], [ mkdir conftest.mkstemp AC_RUN_IFELSE( [AC_LANG_PROGRAM( [AC_INCLUDES_DEFAULT], [[int i; off_t large = (off_t) 4294967295u; if (large < 0) large = 2147483647; for (i = 0; i < 70; i++) { char templ[] = "conftest.mkstemp/coXXXXXX"; int (*mkstemp_function) (char *) = mkstemp; int fd = mkstemp_function (templ); if (fd < 0 || lseek (fd, large, SEEK_SET) != large) return 1; close (fd); } return 0;]])], [gl_cv_func_working_mkstemp=yes], [gl_cv_func_working_mkstemp=no], [gl_cv_func_working_mkstemp=no]) rm -rf conftest.mkstemp ]) if test $gl_cv_func_working_mkstemp != yes; then REPLACE_MKSTEMP=1 AC_LIBOBJ([mkstemp]) gl_PREREQ_MKSTEMP fi ]) # Prerequisites of lib/mkstemp.c. AC_DEFUN([gl_PREREQ_MKSTEMP], [ ]) gnuit-4.9.5/m4/ssize_t.m40000644000175000017500000000136211146671376012060 00000000000000# ssize_t.m4 serial 4 (gettext-0.15) dnl Copyright (C) 2001-2003, 2006 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Bruno Haible. dnl Test whether ssize_t is defined. AC_DEFUN([gt_TYPE_SSIZE_T], [ AC_CACHE_CHECK([for ssize_t], [gt_cv_ssize_t], [AC_TRY_COMPILE([#include ], [int x = sizeof (ssize_t *) + sizeof (ssize_t); return !x;], [gt_cv_ssize_t=yes], [gt_cv_ssize_t=no])]) if test $gt_cv_ssize_t = no; then AC_DEFINE([ssize_t], [int], [Define as a signed type of the same size as size_t.]) fi ]) gnuit-4.9.5/m4/utime.m40000644000175000017500000000144611146671376011526 00000000000000# serial 8 dnl From Jim Meyering dnl Replace the utime function on systems that need it. # Copyright (C) 1998, 2000-2001, 2003-2004, 2009 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. dnl FIXME AC_DEFUN([gl_FUNC_UTIME], [ AC_REQUIRE([AC_FUNC_UTIME_NULL]) if test $ac_cv_func_utime_null = no; then AC_LIBOBJ([utime]) AC_DEFINE([utime], [rpl_utime], [Define to rpl_utime if the replacement function should be used.]) gl_PREREQ_UTIME fi ]) # Prerequisites of lib/utime.c. AC_DEFUN([gl_PREREQ_UTIME], [ AC_CHECK_HEADERS_ONCE([utime.h]) AC_REQUIRE([gl_CHECK_TYPE_STRUCT_UTIMBUF]) gl_FUNC_UTIMES_NULL ]) gnuit-4.9.5/m4/fcntl_h.m40000644000175000017500000000536311146671375012021 00000000000000# Configure fcntl.h. dnl Copyright (C) 2006, 2007, 2009 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl Written by Paul Eggert. AC_DEFUN([gl_FCNTL_H], [ AC_REQUIRE([gl_FCNTL_H_DEFAULTS]) AC_CACHE_CHECK([for working fcntl.h], [gl_cv_header_working_fcntl_h], [AC_RUN_IFELSE( [AC_LANG_PROGRAM( [[#include #include #include #include #ifndef O_NOATIME #define O_NOATIME 0 #endif #ifndef O_NOFOLLOW #define O_NOFOLLOW 0 #endif static int const constants[] = { O_CREAT, O_EXCL, O_NOCTTY, O_TRUNC, O_APPEND, O_NONBLOCK, O_SYNC, O_ACCMODE, O_RDONLY, O_RDWR, O_WRONLY }; ]], [[ int status = !constants; { static char const sym[] = "conftest.sym"; if (symlink (".", sym) != 0 || close (open (sym, O_RDONLY | O_NOFOLLOW)) == 0) status |= 32; } { static char const file[] = "confdefs.h"; int fd = open (file, O_RDONLY | O_NOATIME); char c; struct stat st0, st1; if (fd < 0 || fstat (fd, &st0) != 0 || sleep (1) != 0 || read (fd, &c, 1) != 1 || close (fd) != 0 || stat (file, &st1) != 0 || st0.st_atime != st1.st_atime) status |= 64; } return status;]])], [gl_cv_header_working_fcntl_h=yes], [case $? in #( 32) gl_cv_header_working_fcntl_h='no (bad O_NOFOLLOW)';; #( 64) gl_cv_header_working_fcntl_h='no (bad O_NOATIME)';; #( 96) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #( *) gl_cv_header_working_fcntl_h='no';; esac], [gl_cv_header_working_fcntl_h=cross-compiling])]) case $gl_cv_header_working_fcntl_h in #( *O_NOATIME* | no | cross-compiling) ac_val=0;; #( *) ac_val=1;; esac AC_DEFINE_UNQUOTED([HAVE_WORKING_O_NOATIME], [$ac_val], [Define to 1 if O_NOATIME works.]) case $gl_cv_header_working_fcntl_h in #( *O_NOFOLLOW* | no | cross-compiling) ac_val=0;; #( *) ac_val=1;; esac AC_DEFINE_UNQUOTED([HAVE_WORKING_O_NOFOLLOW], [$ac_val], [Define to 1 if O_NOFOLLOW works.]) gl_CHECK_NEXT_HEADERS([fcntl.h]) FCNTL_H='fcntl.h' AC_SUBST([FCNTL_H]) ]) AC_DEFUN([gl_FCNTL_MODULE_INDICATOR], [ dnl Use AC_REQUIRE here, so that the default settings are expanded once only. AC_REQUIRE([gl_FCNTL_H_DEFAULTS]) GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1 ]) AC_DEFUN([gl_FCNTL_H_DEFAULTS], [ GNULIB_OPEN=0; AC_SUBST([GNULIB_OPEN]) dnl Assume proper GNU behavior unless another module says otherwise. REPLACE_OPEN=0; AC_SUBST([REPLACE_OPEN]) ]) gnuit-4.9.5/m4/quote.m40000644000175000017500000000060011146671376011527 00000000000000# quote.m4 serial 5 dnl Copyright (C) 2002, 2003, 2005, 2006 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_QUOTE], [ AC_LIBOBJ([quote]) dnl Prerequisites of lib/quote.c. dnl (none) ]) gnuit-4.9.5/m4/wchar.m40000644000175000017500000000676011146671376011513 00000000000000dnl A placeholder for ISO C99 , for platforms that have issues. dnl Copyright (C) 2007-2008 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl Written by Eric Blake. # wchar.m4 serial 22 AC_DEFUN([gl_WCHAR_H], [ AC_REQUIRE([gl_WCHAR_H_DEFAULTS]) AC_CACHE_CHECK([whether is standalone], [gl_cv_header_wchar_h_standalone], [AC_COMPILE_IFELSE([[#include wchar_t w;]], [gl_cv_header_wchar_h_standalone=yes], [gl_cv_header_wchar_h_standalone=no])]) AC_REQUIRE([gt_TYPE_WINT_T]) if test $gt_cv_c_wint_t = yes; then HAVE_WINT_T=1 else HAVE_WINT_T=0 fi AC_SUBST([HAVE_WINT_T]) if test $gl_cv_header_wchar_h_standalone != yes || test $gt_cv_c_wint_t != yes; then WCHAR_H=wchar.h fi dnl Prepare for creating substitute . dnl Do it always: WCHAR_H may be empty here but can be set later. dnl Check for (missing in Linux uClibc when built without wide dnl character support). AC_CHECK_HEADERS_ONCE([wchar.h]) if test $ac_cv_header_wchar_h = yes; then HAVE_WCHAR_H=1 else HAVE_WCHAR_H=0 fi AC_SUBST([HAVE_WCHAR_H]) gl_CHECK_NEXT_HEADERS([wchar.h]) ]) dnl Unconditionally enables the replacement of . AC_DEFUN([gl_REPLACE_WCHAR_H], [ AC_REQUIRE([gl_WCHAR_H_DEFAULTS]) WCHAR_H=wchar.h ]) AC_DEFUN([gl_WCHAR_MODULE_INDICATOR], [ dnl Use AC_REQUIRE here, so that the default settings are expanded once only. AC_REQUIRE([gl_WCHAR_H_DEFAULTS]) GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1 ]) AC_DEFUN([gl_WCHAR_H_DEFAULTS], [ GNULIB_BTOWC=0; AC_SUBST([GNULIB_BTOWC]) GNULIB_WCTOB=0; AC_SUBST([GNULIB_WCTOB]) GNULIB_MBSINIT=0; AC_SUBST([GNULIB_MBSINIT]) GNULIB_MBRTOWC=0; AC_SUBST([GNULIB_MBRTOWC]) GNULIB_MBRLEN=0; AC_SUBST([GNULIB_MBRLEN]) GNULIB_MBSRTOWCS=0; AC_SUBST([GNULIB_MBSRTOWCS]) GNULIB_MBSNRTOWCS=0; AC_SUBST([GNULIB_MBSNRTOWCS]) GNULIB_WCRTOMB=0; AC_SUBST([GNULIB_WCRTOMB]) GNULIB_WCSRTOMBS=0; AC_SUBST([GNULIB_WCSRTOMBS]) GNULIB_WCSNRTOMBS=0; AC_SUBST([GNULIB_WCSNRTOMBS]) GNULIB_WCWIDTH=0; AC_SUBST([GNULIB_WCWIDTH]) dnl Assume proper GNU behavior unless another module says otherwise. HAVE_BTOWC=1; AC_SUBST([HAVE_BTOWC]) HAVE_MBSINIT=1; AC_SUBST([HAVE_MBSINIT]) HAVE_MBRTOWC=1; AC_SUBST([HAVE_MBRTOWC]) HAVE_MBRLEN=1; AC_SUBST([HAVE_MBRLEN]) HAVE_MBSRTOWCS=1; AC_SUBST([HAVE_MBSRTOWCS]) HAVE_MBSNRTOWCS=1; AC_SUBST([HAVE_MBSNRTOWCS]) HAVE_WCRTOMB=1; AC_SUBST([HAVE_WCRTOMB]) HAVE_WCSRTOMBS=1; AC_SUBST([HAVE_WCSRTOMBS]) HAVE_WCSNRTOMBS=1; AC_SUBST([HAVE_WCSNRTOMBS]) HAVE_DECL_WCTOB=1; AC_SUBST([HAVE_DECL_WCTOB]) HAVE_DECL_WCWIDTH=1; AC_SUBST([HAVE_DECL_WCWIDTH]) REPLACE_MBSTATE_T=0; AC_SUBST([REPLACE_MBSTATE_T]) REPLACE_BTOWC=0; AC_SUBST([REPLACE_BTOWC]) REPLACE_WCTOB=0; AC_SUBST([REPLACE_WCTOB]) REPLACE_MBSINIT=0; AC_SUBST([REPLACE_MBSINIT]) REPLACE_MBRTOWC=0; AC_SUBST([REPLACE_MBRTOWC]) REPLACE_MBRLEN=0; AC_SUBST([REPLACE_MBRLEN]) REPLACE_MBSRTOWCS=0; AC_SUBST([REPLACE_MBSRTOWCS]) REPLACE_MBSNRTOWCS=0;AC_SUBST([REPLACE_MBSNRTOWCS]) REPLACE_WCRTOMB=0; AC_SUBST([REPLACE_WCRTOMB]) REPLACE_WCSRTOMBS=0; AC_SUBST([REPLACE_WCSRTOMBS]) REPLACE_WCWIDTH=0; AC_SUBST([REPLACE_WCWIDTH]) WCHAR_H=''; AC_SUBST([WCHAR_H]) ]) gnuit-4.9.5/m4/errno_h.m40000644000175000017500000000560511146671375012037 00000000000000# errno_h.m4 serial 4 dnl Copyright (C) 2004, 2006, 2008, 2009 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl This macro must pass through AC_REQUIRE (never directly invoke it). AC_DEFUN_ONCE([gl_HEADER_ERRNO_H], [ AC_REQUIRE([AC_PROG_CC]) AC_CACHE_CHECK([for complete errno.h], [gl_cv_header_errno_h_complete], [ AC_EGREP_CPP([booboo],[ #include #if !defined ENOMSG booboo #endif #if !defined EIDRM booboo #endif #if !defined ENOLINK booboo #endif #if !defined EPROTO booboo #endif #if !defined EMULTIHOP booboo #endif #if !defined EBADMSG booboo #endif #if !defined EOVERFLOW booboo #endif #if !defined ENOTSUP booboo #endif #if !defined ECANCELED booboo #endif ], [gl_cv_header_errno_h_complete=no], [gl_cv_header_errno_h_complete=yes]) ]) if test $gl_cv_header_errno_h_complete = yes; then ERRNO_H='' else gl_CHECK_NEXT_HEADERS([errno.h]) ERRNO_H='errno.h' fi AC_SUBST([ERRNO_H]) gl_REPLACE_ERRNO_VALUE([EMULTIHOP]) gl_REPLACE_ERRNO_VALUE([ENOLINK]) gl_REPLACE_ERRNO_VALUE([EOVERFLOW]) ]) # Assuming $1 = EOVERFLOW. # The EOVERFLOW errno value ought to be defined in , according to # POSIX. But some systems (like OpenBSD 4.0 or AIX 3) don't define it, and # some systems (like OSF/1) define it when _XOPEN_SOURCE_EXTENDED is defined. # Check for the value of EOVERFLOW. # Set the variables EOVERFLOW_HIDDEN and EOVERFLOW_VALUE. AC_DEFUN([gl_REPLACE_ERRNO_VALUE], [ if test -n "$ERRNO_H"; then AC_CACHE_CHECK([for ]$1[ value], [gl_cv_header_errno_h_]$1, [ AC_EGREP_CPP([yes],[ #include #ifdef ]$1[ yes #endif ], [gl_cv_header_errno_h_]$1[=yes], [gl_cv_header_errno_h_]$1[=no]) if test $gl_cv_header_errno_h_]$1[ = no; then AC_EGREP_CPP([yes],[ #define _XOPEN_SOURCE_EXTENDED 1 #include #ifdef ]$1[ yes #endif ], [gl_cv_header_errno_h_]$1[=hidden]) if test $gl_cv_header_errno_h_]$1[ = hidden; then dnl The macro exists but is hidden. dnl Define it to the same value. AC_COMPUTE_INT([gl_cv_header_errno_h_]$1, $1, [ #define _XOPEN_SOURCE_EXTENDED 1 #include /* The following two lines are a workaround against an autoconf-2.52 bug. */ #include #include ]) fi fi ]) case $gl_cv_header_errno_h_]$1[ in yes | no) ]$1[_HIDDEN=0; ]$1[_VALUE= ;; *) ]$1[_HIDDEN=1; ]$1[_VALUE="$gl_cv_header_errno_h_]$1[" ;; esac AC_SUBST($1[_HIDDEN]) AC_SUBST($1[_VALUE]) fi ]) dnl Autoconf >= 2.61 has AC_COMPUTE_INT built-in. dnl Remove this when we can assume autoconf >= 2.61. m4_ifdef([AC_COMPUTE_INT], [], [ AC_DEFUN([AC_COMPUTE_INT], [_AC_COMPUTE_INT([$2],[$1],[$3],[$4])]) ]) gnuit-4.9.5/m4/onceonly.m40000644000175000017500000000752111146671376012231 00000000000000# onceonly.m4 serial 6 dnl Copyright (C) 2002-2003, 2005-2006, 2008 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General dnl Public License, this file may be distributed as part of a program dnl that contains a configuration script generated by Autoconf, under dnl the same distribution terms as the rest of that program. dnl This file defines some "once only" variants of standard autoconf macros. dnl AC_CHECK_HEADERS_ONCE like AC_CHECK_HEADERS dnl AC_CHECK_FUNCS_ONCE like AC_CHECK_FUNCS dnl AC_CHECK_DECLS_ONCE like AC_CHECK_DECLS dnl AC_REQUIRE([AC_FUNC_STRCOLL]) like AC_FUNC_STRCOLL dnl The advantage is that the check for each of the headers/functions/decls dnl will be put only once into the 'configure' file. It keeps the size of dnl the 'configure' file down, and avoids redundant output when 'configure' dnl is run. dnl The drawback is that the checks cannot be conditionalized. If you write dnl if some_condition; then gl_CHECK_HEADERS(stdlib.h); fi dnl inside an AC_DEFUNed function, the gl_CHECK_HEADERS macro call expands to dnl empty, and the check will be inserted before the body of the AC_DEFUNed dnl function. dnl The original code implemented AC_CHECK_HEADERS_ONCE and AC_CHECK_FUNCS_ONCE dnl in terms of AC_DEFUN and AC_REQUIRE. This implementation uses diversions to dnl named sections DEFAULTS and INIT_PREPARE in order to check all requested dnl headers at once, thus reducing the size of 'configure'. It is known to work dnl with autoconf 2.57..2.62 at least . The size reduction is ca. 9%. dnl Autoconf version 2.59 plus gnulib is required; this file is not needed dnl with Autoconf 2.60 or greater. But note that autoconf's implementation of dnl AC_CHECK_DECLS_ONCE expects a comma-separated list of symbols as first dnl argument! AC_PREREQ([2.59]) # AC_CHECK_HEADERS_ONCE(HEADER1 HEADER2 ...) is a once-only variant of # AC_CHECK_HEADERS(HEADER1 HEADER2 ...). AC_DEFUN([AC_CHECK_HEADERS_ONCE], [ : m4_foreach_w([gl_HEADER_NAME], [$1], [ AC_DEFUN([gl_CHECK_HEADER_]m4_quote(translit(gl_HEADER_NAME, [./-], [___])), [ m4_divert_text([INIT_PREPARE], [gl_header_list="$gl_header_list gl_HEADER_NAME"]) gl_HEADERS_EXPANSION AH_TEMPLATE(AS_TR_CPP([HAVE_]m4_defn([gl_HEADER_NAME])), [Define to 1 if you have the <]m4_defn([gl_HEADER_NAME])[> header file.]) ]) AC_REQUIRE([gl_CHECK_HEADER_]m4_quote(translit(gl_HEADER_NAME, [./-], [___]))) ]) ]) m4_define([gl_HEADERS_EXPANSION], [ m4_divert_text([DEFAULTS], [gl_header_list=]) AC_CHECK_HEADERS([$gl_header_list]) m4_define([gl_HEADERS_EXPANSION], []) ]) # AC_CHECK_FUNCS_ONCE(FUNC1 FUNC2 ...) is a once-only variant of # AC_CHECK_FUNCS(FUNC1 FUNC2 ...). AC_DEFUN([AC_CHECK_FUNCS_ONCE], [ : m4_foreach_w([gl_FUNC_NAME], [$1], [ AC_DEFUN([gl_CHECK_FUNC_]m4_defn([gl_FUNC_NAME]), [ m4_divert_text([INIT_PREPARE], [gl_func_list="$gl_func_list gl_FUNC_NAME"]) gl_FUNCS_EXPANSION AH_TEMPLATE(AS_TR_CPP([HAVE_]m4_defn([gl_FUNC_NAME])), [Define to 1 if you have the `]m4_defn([gl_FUNC_NAME])[' function.]) ]) AC_REQUIRE([gl_CHECK_FUNC_]m4_defn([gl_FUNC_NAME])) ]) ]) m4_define([gl_FUNCS_EXPANSION], [ m4_divert_text([DEFAULTS], [gl_func_list=]) AC_CHECK_FUNCS([$gl_func_list]) m4_define([gl_FUNCS_EXPANSION], []) ]) # AC_CHECK_DECLS_ONCE(DECL1 DECL2 ...) is a once-only variant of # AC_CHECK_DECLS(DECL1, DECL2, ...). AC_DEFUN([AC_CHECK_DECLS_ONCE], [ : m4_foreach_w([gl_DECL_NAME], [$1], [ AC_DEFUN([gl_CHECK_DECL_]m4_defn([gl_DECL_NAME]), [ AC_CHECK_DECLS(m4_defn([gl_DECL_NAME])) ]) AC_REQUIRE([gl_CHECK_DECL_]m4_defn([gl_DECL_NAME])) ]) ]) gnuit-4.9.5/m4/sockpfaf.m40000644000175000017500000000353511146671376012200 00000000000000# sockpfaf.m4 serial 6 dnl Copyright (C) 2004, 2006, 2009 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl Test for some common socket protocol families (PF_INET, PF_INET6, ...) dnl and some common address families (AF_INET, AF_INET6, ...). dnl This test assumes that a system supports an address family if and only if dnl it supports the corresponding protocol family. dnl From Bruno Haible. AC_DEFUN([gl_SOCKET_FAMILIES], [ AC_REQUIRE([gl_HEADER_SYS_SOCKET]) AC_CHECK_HEADERS_ONCE([netinet/in.h]) AC_MSG_CHECKING([for IPv4 sockets]) AC_CACHE_VAL([gl_cv_socket_ipv4], [AC_TRY_COMPILE([#include #ifdef HAVE_SYS_SOCKET_H #include #endif #ifdef HAVE_NETINET_IN_H #include #endif #ifdef HAVE_WINSOCK2_H #include #endif], [int x = AF_INET; struct in_addr y; struct sockaddr_in z; if (&x && &y && &z) return 0;], gl_cv_socket_ipv4=yes, gl_cv_socket_ipv4=no)]) AC_MSG_RESULT([$gl_cv_socket_ipv4]) if test $gl_cv_socket_ipv4 = yes; then AC_DEFINE([HAVE_IPV4], [1], [Define to 1 if defines AF_INET.]) fi AC_MSG_CHECKING([for IPv6 sockets]) AC_CACHE_VAL([gl_cv_socket_ipv6], [AC_TRY_COMPILE([#include #ifdef HAVE_SYS_SOCKET_H #include #endif #ifdef HAVE_NETINET_IN_H #include #endif #ifdef HAVE_WINSOCK2_H #include #endif], [int x = AF_INET6; struct in6_addr y; struct sockaddr_in6 z; if (&x && &y && &z) return 0;], gl_cv_socket_ipv6=yes, gl_cv_socket_ipv6=no)]) AC_MSG_RESULT([$gl_cv_socket_ipv6]) if test $gl_cv_socket_ipv6 = yes; then AC_DEFINE([HAVE_IPV6], [1], [Define to 1 if defines AF_INET6.]) fi ]) gnuit-4.9.5/m4/clock_time.m40000644000175000017500000000246711146671375012517 00000000000000# clock_time.m4 serial 9 dnl Copyright (C) 2002-2006, 2009 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. # Check for clock_gettime and clock_settime, and set LIB_CLOCK_GETTIME. # For a program named, say foo, you should add a line like the following # in the corresponding Makefile.am file: # foo_LDADD = $(LDADD) $(LIB_CLOCK_GETTIME) AC_DEFUN([gl_CLOCK_TIME], [ dnl Persuade glibc and Solaris to declare these functions. AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) # Solaris 2.5.1 needs -lposix4 to get the clock_gettime function. # Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4. # Save and restore LIBS so e.g., -lrt, isn't added to it. Otherwise, *all* # programs in the package would end up linked with that potentially-shared # library, inducing unnecessary run-time overhead. gl_saved_libs=$LIBS AC_SEARCH_LIBS([clock_gettime], [rt posix4], [test "$ac_cv_search_clock_gettime" = "none required" || LIB_CLOCK_GETTIME=$ac_cv_search_clock_gettime]) AC_SUBST([LIB_CLOCK_GETTIME]) AC_CHECK_FUNCS([clock_gettime clock_settime]) LIBS=$gl_saved_libs ]) gnuit-4.9.5/m4/utimes.m40000644000175000017500000000453111146671376011707 00000000000000# Detect some bugs in glibc's implementation of utimes. dnl Copyright (C) 2003, 2004, 2005, 2009 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. # See if we need to work around bugs in glibc's implementation of # utimes from 2003-07-12 to 2003-09-17. # First, there was a bug that would make utimes set mtime # and atime to zero (1970-01-01) unconditionally. # Then, there was code to round rather than truncate. # Then, there was an implementation (sparc64, Linux-2.4.28, glibc-2.3.3) # that didn't honor the NULL-means-set-to-current-time semantics. # Finally, there was also a version of utimes that failed on read-only # files, while utime worked fine (linux-2.2.20, glibc-2.2.5). # # From Jim Meyering, with suggestions from Paul Eggert. AC_DEFUN([gl_FUNC_UTIMES], [ AC_CACHE_CHECK([determine whether the utimes function works], gl_cv_func_working_utimes, [ AC_RUN_IFELSE([AC_LANG_SOURCE([[ #include #include #include #include #include #include #include #include #include int main () { static struct timeval timeval[2] = {{9, 10}, {999999, 999999}}; struct stat sbuf; char const *file = "conftest.utimes"; FILE *f; time_t now; int fd; int ok = ((f = fopen (file, "w")) && fclose (f) == 0 && utimes (file, timeval) == 0 && lstat (file, &sbuf) == 0 && sbuf.st_atime == timeval[0].tv_sec && sbuf.st_mtime == timeval[1].tv_sec); unlink (file); if (!ok) exit (1); ok = ((f = fopen (file, "w")) && fclose (f) == 0 && time (&now) != (time_t)-1 && utimes (file, NULL) == 0 && lstat (file, &sbuf) == 0 && now - sbuf.st_atime <= 2 && now - sbuf.st_mtime <= 2); unlink (file); if (!ok) exit (1); ok = (0 <= (fd = open (file, O_WRONLY|O_CREAT, 0444)) && close (fd) == 0 && utimes (file, NULL) == 0); unlink (file); exit (!ok); } ]])], [gl_cv_func_working_utimes=yes], [gl_cv_func_working_utimes=no], [gl_cv_func_working_utimes=no])]) if test $gl_cv_func_working_utimes = yes; then AC_DEFINE([HAVE_WORKING_UTIMES], [1], [Define if utimes works properly. ]) fi ]) gnuit-4.9.5/m4/strtoll.m40000644000175000017500000000140111146671376012075 00000000000000# strtoll.m4 serial 6 dnl Copyright (C) 2002, 2004, 2006, 2008, 2009 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_STRTOLL], [ AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) dnl We don't need (and can't compile) the replacement strtoll dnl unless the type 'long long int' exists. AC_REQUIRE([AC_TYPE_LONG_LONG_INT]) if test "$ac_cv_type_long_long_int" = yes; then AC_REPLACE_FUNCS([strtoll]) if test $ac_cv_func_strtoll = no; then HAVE_STRTOLL=0 gl_PREREQ_STRTOLL fi fi ]) # Prerequisites of lib/strtoll.c. AC_DEFUN([gl_PREREQ_STRTOLL], [ : ]) gnuit-4.9.5/m4/longlong.m40000644000175000017500000001011311146671376012211 00000000000000# longlong.m4 serial 14 dnl Copyright (C) 1999-2007, 2009 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Paul Eggert. # Define HAVE_LONG_LONG_INT if 'long long int' works. # This fixes a bug in Autoconf 2.61, but can be removed once we # assume 2.62 everywhere. # Note: If the type 'long long int' exists but is only 32 bits large # (as on some very old compilers), HAVE_LONG_LONG_INT will not be # defined. In this case you can treat 'long long int' like 'long int'. AC_DEFUN([AC_TYPE_LONG_LONG_INT], [ AC_CACHE_CHECK([for long long int], [ac_cv_type_long_long_int], [AC_LINK_IFELSE( [_AC_TYPE_LONG_LONG_SNIPPET], [dnl This catches a bug in Tandem NonStop Kernel (OSS) cc -O circa 2004. dnl If cross compiling, assume the bug isn't important, since dnl nobody cross compiles for this platform as far as we know. AC_RUN_IFELSE( [AC_LANG_PROGRAM( [[@%:@include @%:@ifndef LLONG_MAX @%:@ define HALF \ (1LL << (sizeof (long long int) * CHAR_BIT - 2)) @%:@ define LLONG_MAX (HALF - 1 + HALF) @%:@endif]], [[long long int n = 1; int i; for (i = 0; ; i++) { long long int m = n << i; if (m >> i != n) return 1; if (LLONG_MAX / 2 < m) break; } return 0;]])], [ac_cv_type_long_long_int=yes], [ac_cv_type_long_long_int=no], [ac_cv_type_long_long_int=yes])], [ac_cv_type_long_long_int=no])]) if test $ac_cv_type_long_long_int = yes; then AC_DEFINE([HAVE_LONG_LONG_INT], [1], [Define to 1 if the system has the type `long long int'.]) fi ]) # Define HAVE_UNSIGNED_LONG_LONG_INT if 'unsigned long long int' works. # This fixes a bug in Autoconf 2.61, but can be removed once we # assume 2.62 everywhere. # Note: If the type 'unsigned long long int' exists but is only 32 bits # large (as on some very old compilers), AC_TYPE_UNSIGNED_LONG_LONG_INT # will not be defined. In this case you can treat 'unsigned long long int' # like 'unsigned long int'. AC_DEFUN([AC_TYPE_UNSIGNED_LONG_LONG_INT], [ AC_CACHE_CHECK([for unsigned long long int], [ac_cv_type_unsigned_long_long_int], [AC_LINK_IFELSE( [_AC_TYPE_LONG_LONG_SNIPPET], [ac_cv_type_unsigned_long_long_int=yes], [ac_cv_type_unsigned_long_long_int=no])]) if test $ac_cv_type_unsigned_long_long_int = yes; then AC_DEFINE([HAVE_UNSIGNED_LONG_LONG_INT], [1], [Define to 1 if the system has the type `unsigned long long int'.]) fi ]) # Expands to a C program that can be used to test for simultaneous support # of 'long long' and 'unsigned long long'. We don't want to say that # 'long long' is available if 'unsigned long long' is not, or vice versa, # because too many programs rely on the symmetry between signed and unsigned # integer types (excluding 'bool'). AC_DEFUN([_AC_TYPE_LONG_LONG_SNIPPET], [ AC_LANG_PROGRAM( [[/* For now, do not test the preprocessor; as of 2007 there are too many implementations with broken preprocessors. Perhaps this can be revisited in 2012. In the meantime, code should not expect #if to work with literals wider than 32 bits. */ /* Test literals. */ long long int ll = 9223372036854775807ll; long long int nll = -9223372036854775807LL; unsigned long long int ull = 18446744073709551615ULL; /* Test constant expressions. */ typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll) ? 1 : -1)]; typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1 ? 1 : -1)]; int i = 63;]], [[/* Test availability of runtime routines for shift and division. */ long long int llmax = 9223372036854775807ll; unsigned long long int ullmax = 18446744073709551615ull; return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i) | (llmax / ll) | (llmax % ll) | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i) | (ullmax / ull) | (ullmax % ull));]]) ]) gnuit-4.9.5/m4/locale-zh.m40000644000175000017500000000666711146671376012273 00000000000000# locale-zh.m4 serial 6 dnl Copyright (C) 2003, 2005-2009 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Bruno Haible. dnl Determine the name of a chinese locale with GB18030 encoding. AC_DEFUN([gt_LOCALE_ZH_CN], [ AC_REQUIRE([AC_CANONICAL_HOST]) AC_REQUIRE([AM_LANGINFO_CODESET]) AC_CACHE_CHECK([for a transitional chinese locale], [gt_cv_locale_zh_CN], [ AC_LANG_CONFTEST([AC_LANG_SOURCE([ changequote(,)dnl #include #include #include #if HAVE_LANGINFO_CODESET # include #endif #include #include struct tm t; char buf[16]; int main () { const char *p; /* Check whether the given locale name is recognized by the system. */ if (setlocale (LC_ALL, "") == NULL) return 1; /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) is empty, and the behaviour of Tcl 8.4 in this locale is not useful. On OpenBSD 4.0, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "646". In this situation, some unit tests fail. */ #if HAVE_LANGINFO_CODESET { const char *cs = nl_langinfo (CODESET); if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0) return 1; } #endif #ifdef __CYGWIN__ /* On Cygwin, avoid locale names without encoding suffix, because the locale_charset() function relies on the encoding suffix. Note that LC_ALL is set on the command line. */ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; #endif /* Check whether in a month name, no byte in the range 0x80..0x9F occurs. This excludes the UTF-8 encoding. */ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1; for (p = buf; *p != '\0'; p++) if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0) return 1; /* Check whether a typical GB18030 multibyte sequence is recognized as a single wide character. This excludes the GB2312 and GBK encodings. */ if (mblen ("\203\062\332\066", 5) != 4) return 1; return 0; } changequote([,])dnl ])]) if AC_TRY_EVAL([ac_link]) && test -s conftest$ac_exeext; then # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the # configure script would override the LC_ALL setting. Likewise for # LC_CTYPE, which is also set at the beginning of the configure script. # Test for the locale name without encoding suffix. if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_zh_CN=zh_CN else # Test for the locale name with explicit encoding suffix. if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_zh_CN=zh_CN.GB18030 else # None found. gt_cv_locale_zh_CN=none fi fi else # If there was a link error, due to mblen(), the system is so old that # it certainly doesn't have a chinese locale. gt_cv_locale_zh_CN=none fi rm -fr conftest* ]) LOCALE_ZH_CN=$gt_cv_locale_zh_CN AC_SUBST([LOCALE_ZH_CN]) ]) gnuit-4.9.5/m4/idcache.m40000644000175000017500000000052411146671375011756 00000000000000# idcache.m4 serial 6 dnl Copyright (C) 2002, 2003, 2005, 2006 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_IDCACHE], [ AC_LIBOBJ([idcache]) ]) gnuit-4.9.5/m4/strtoumax.m40000644000175000017500000000207011146671376012443 00000000000000# strtoumax.m4 serial 7 dnl Copyright (C) 2002, 2003, 2004, 2006, 2009 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_STRTOUMAX], [ dnl Work around a bug of AC_EGREP_CPP in autoconf-2.57. AC_REQUIRE([AC_PROG_CPP]) AC_REQUIRE([AC_PROG_EGREP]) AC_CACHE_CHECK([whether defines strtoumax as a macro], gl_cv_func_strtoumax_macro, [AC_EGREP_CPP([inttypes_h_defines_strtoumax], [#include #ifdef strtoumax inttypes_h_defines_strtoumax #endif], gl_cv_func_strtoumax_macro=yes, gl_cv_func_strtoumax_macro=no)]) if test "$gl_cv_func_strtoumax_macro" != yes; then AC_REPLACE_FUNCS([strtoumax]) if test $ac_cv_func_strtoumax = no; then gl_PREREQ_STRTOUMAX fi fi ]) # Prerequisites of lib/strtoumax.c. AC_DEFUN([gl_PREREQ_STRTOUMAX], [ AC_CHECK_DECLS([strtoull]) AC_REQUIRE([AC_TYPE_UNSIGNED_LONG_LONG_INT]) ]) gnuit-4.9.5/m4/xstrndup.m40000644000175000017500000000061611146671376012270 00000000000000# xstrndup.m4 serial 2 dnl Copyright (C) 2003 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_XSTRNDUP], [ gl_PREREQ_XSTRNDUP ]) # Prerequisites of lib/xstrndup.c. AC_DEFUN([gl_PREREQ_XSTRNDUP], [ : ]) gnuit-4.9.5/m4/putenv.m40000644000175000017500000000226011146671376011717 00000000000000# putenv.m4 serial 16 dnl Copyright (C) 2002-2009 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Jim Meyering. dnl dnl Check whether putenv ("FOO") removes FOO from the environment. dnl The putenv in libc on at least SunOS 4.1.4 does *not* do that. AC_DEFUN([gl_FUNC_PUTENV], [ AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) AC_CACHE_CHECK([for putenv compatible with GNU and SVID], [gl_cv_func_svid_putenv], [AC_RUN_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT],[[ /* Put it in env. */ if (putenv ("CONFTEST_putenv=val")) return 1; /* Try to remove it. */ if (putenv ("CONFTEST_putenv")) return 1; /* Make sure it was deleted. */ if (getenv ("CONFTEST_putenv") != 0) return 1; return 0; ]])], gl_cv_func_svid_putenv=yes, gl_cv_func_svid_putenv=no, dnl When crosscompiling, assume putenv is broken. gl_cv_func_svid_putenv=no) ]) if test $gl_cv_func_svid_putenv = no; then REPLACE_PUTENV=1 AC_LIBOBJ([putenv]) fi ]) gnuit-4.9.5/m4/mbchar.m40000644000175000017500000000064011146671376011632 00000000000000# mbchar.m4 serial 7 dnl Copyright (C) 2005-2007 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl autoconf tests required for use of mbchar.m4 dnl From Bruno Haible. AC_DEFUN([gl_MBCHAR], [ AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) ]) gnuit-4.9.5/m4/inline.m40000644000175000017500000000314711146671375011660 00000000000000# inline.m4 serial 4 dnl Copyright (C) 2006, 2009 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl Test for the 'inline' keyword or equivalent. dnl Define 'inline' to a supported equivalent, or to nothing if not supported, dnl like AC_C_INLINE does. Also, define HAVE_INLINE if 'inline' or an dnl equivalent is effectively supported, i.e. if the compiler is likely to dnl drop unused 'static inline' functions. AC_DEFUN([gl_INLINE], [ AC_REQUIRE([AC_C_INLINE]) AC_CACHE_CHECK([whether the compiler generally respects inline], [gl_cv_c_inline_effective], [if test $ac_cv_c_inline = no; then gl_cv_c_inline_effective=no else dnl GCC defines __NO_INLINE__ if not optimizing or if -fno-inline is dnl specified. dnl Use AC_COMPILE_IFELSE here, not AC_EGREP_CPP, because the result dnl depends on optimization flags, which can be in CFLAGS. dnl (AC_EGREP_CPP looks only at the CPPFLAGS.) AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([[]], [[#ifdef __NO_INLINE__ #error "inline is not effective" #endif]])], [gl_cv_c_inline_effective=yes], [gl_cv_c_inline_effective=no]) fi ]) if test $gl_cv_c_inline_effective = yes; then AC_DEFINE([HAVE_INLINE], [1], [Define to 1 if the compiler supports one of the keywords 'inline', '__inline__', '__inline' and effectively inlines functions marked as such.]) fi ]) gnuit-4.9.5/m4/wctype.m40000644000175000017500000000435011146671376011713 00000000000000# wctype.m4 serial 2 dnl A placeholder for ISO C99 , for platforms that lack it. dnl Copyright (C) 2006-2008 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl Written by Paul Eggert. AC_DEFUN([gl_WCTYPE_H], [ AC_REQUIRE([AC_PROG_CC]) AC_CHECK_FUNCS_ONCE([iswcntrl]) if test $ac_cv_func_iswcntrl = yes; then HAVE_ISWCNTRL=1 else HAVE_ISWCNTRL=0 fi AC_SUBST([HAVE_ISWCNTRL]) AC_CHECK_HEADERS_ONCE([wctype.h]) AC_REQUIRE([AC_C_INLINE]) AC_REQUIRE([gt_TYPE_WINT_T]) if test $gt_cv_c_wint_t = yes; then HAVE_WINT_T=1 else HAVE_WINT_T=0 fi AC_SUBST([HAVE_WINT_T]) WCTYPE_H=wctype.h if test $ac_cv_header_wctype_h = yes; then if test $ac_cv_func_iswcntrl = yes; then dnl Linux libc5 has an iswprint function that returns 0 for all arguments. dnl The other functions are likely broken in the same way. AC_CACHE_CHECK([whether iswcntrl works], [gl_cv_func_iswcntrl_works], [ AC_TRY_RUN([#include #include #include #include #include int main () { return iswprint ('x') == 0; }], [gl_cv_func_iswcntrl_works=yes], [gl_cv_func_iswcntrl_works=no], [AC_TRY_COMPILE([#include #if __GNU_LIBRARY__ == 1 Linux libc5 i18n is broken. #endif], [], [gl_cv_func_iswcntrl_works=yes], [gl_cv_func_iswcntrl_works=no]) ]) ]) if test $gl_cv_func_iswcntrl_works = yes; then WCTYPE_H= fi fi dnl Compute NEXT_WCTYPE_H even if WCTYPE_H is empty, dnl for the benefit of builds from non-distclean directories. gl_CHECK_NEXT_HEADERS([wctype.h]) HAVE_WCTYPE_H=1 else HAVE_WCTYPE_H=0 fi AC_SUBST([HAVE_WCTYPE_H]) AC_SUBST([WCTYPE_H]) if test "$gl_cv_func_iswcntrl_works" = no; then REPLACE_ISWCNTRL=1 else REPLACE_ISWCNTRL=0 fi AC_SUBST([REPLACE_ISWCNTRL]) ]) gnuit-4.9.5/m4/gnulib-tool.m40000644000175000017500000000263411146671375012635 00000000000000# gnulib-tool.m4 serial 2 dnl Copyright (C) 2004-2005 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl The following macros need not be invoked explicitly. dnl Invoking them does nothing except to declare default arguments dnl for "gnulib-tool --import". dnl Usage: gl_LOCAL_DIR([DIR]) AC_DEFUN([gl_LOCAL_DIR], []) dnl Usage: gl_MODULES([module1 module2 ...]) AC_DEFUN([gl_MODULES], []) dnl Usage: gl_AVOID([module1 module2 ...]) AC_DEFUN([gl_AVOID], []) dnl Usage: gl_SOURCE_BASE([DIR]) AC_DEFUN([gl_SOURCE_BASE], []) dnl Usage: gl_M4_BASE([DIR]) AC_DEFUN([gl_M4_BASE], []) dnl Usage: gl_PO_BASE([DIR]) AC_DEFUN([gl_PO_BASE], []) dnl Usage: gl_DOC_BASE([DIR]) AC_DEFUN([gl_DOC_BASE], []) dnl Usage: gl_TESTS_BASE([DIR]) AC_DEFUN([gl_TESTS_BASE], []) dnl Usage: gl_WITH_TESTS AC_DEFUN([gl_WITH_TESTS], []) dnl Usage: gl_LIB([LIBNAME]) AC_DEFUN([gl_LIB], []) dnl Usage: gl_LGPL or gl_LGPL([VERSION]) AC_DEFUN([gl_LGPL], []) dnl Usage: gl_MAKEFILE_NAME([FILENAME]) AC_DEFUN([gl_MAKEFILE_NAME], []) dnl Usage: gl_LIBTOOL AC_DEFUN([gl_LIBTOOL], []) dnl Usage: gl_MACRO_PREFIX([PREFIX]) AC_DEFUN([gl_MACRO_PREFIX], []) dnl Usage: gl_PO_DOMAIN([DOMAIN]) AC_DEFUN([gl_PO_DOMAIN], []) dnl Usage: gl_VC_FILES([BOOLEAN]) AC_DEFUN([gl_VC_FILES], []) gnuit-4.9.5/m4/strerror.m40000644000175000017500000000442111146671376012261 00000000000000# strerror.m4 serial 9 dnl Copyright (C) 2002, 2007-2008 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_STRERROR], [ AC_REQUIRE([gl_FUNC_STRERROR_SEPARATE]) if test $REPLACE_STRERROR = 1; then AC_LIBOBJ([strerror]) AC_DEFINE_UNQUOTED([REPLACE_STRERROR], [$REPLACE_STRERROR], [Define this to 1 if strerror is broken.]) fi ]) # Like gl_FUNC_STRERROR, except prepare for separate compilation (no AC_LIBOBJ). AC_DEFUN([gl_FUNC_STRERROR_SEPARATE], [ AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) AC_REQUIRE([gl_HEADER_ERRNO_H]) if test -z "$ERRNO_H"; then AC_CACHE_CHECK([for working strerror function], [gl_cv_func_working_strerror], [AC_RUN_IFELSE( [AC_LANG_PROGRAM( [[#include ]], [[return !*strerror (-2);]])], [gl_cv_func_working_strerror=yes], [gl_cv_func_working_strerror=no], [dnl Assume crossbuild works if it compiles. AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [[#include ]], [[return !*strerror (-2);]])], [gl_cv_func_working_strerror=yes], [gl_cv_func_working_strerror=no]) ]) ]) if test $gl_cv_func_working_strerror = no; then dnl The system's strerror() fails to return a string for out-of-range dnl integers. Replace it. REPLACE_STRERROR=1 fi else dnl The system's strerror() cannot know about the new errno values we add dnl to . Replace it. REPLACE_STRERROR=1 fi if test $REPLACE_STRERROR = 1; then gl_PREREQ_STRERROR fi ]) # Prerequisites of lib/strerror.c. AC_DEFUN([gl_PREREQ_STRERROR], [ AC_CHECK_DECLS([strerror]) AC_CHECK_HEADERS_ONCE([sys/socket.h]) if test $ac_cv_header_sys_socket_h != yes; then dnl We cannot use AC_CHECK_HEADERS_ONCE here, because that would make dnl the check for those headers unconditional; yet cygwin reports dnl that the headers are present but cannot be compiled (since on dnl cygwin, all socket information should come from sys/socket.h). AC_CHECK_HEADERS([winsock2.h]) fi ]) gnuit-4.9.5/m4/gettimeofday.m40000644000175000017500000000563511146671375013067 00000000000000# serial 12 # Copyright (C) 2001-2003, 2005, 2007, 2009 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. dnl From Jim Meyering. AC_DEFUN([gl_FUNC_GETTIMEOFDAY], [ AC_REQUIRE([AC_C_RESTRICT]) AC_REQUIRE([gl_HEADER_SYS_TIME_H]) AC_CHECK_FUNCS_ONCE([gettimeofday]) AC_CACHE_CHECK([for gettimeofday with POSIX signature], [gl_cv_func_gettimeofday_posix_signature], [AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [[#include struct timeval c; ]], [[ int (*f) (struct timeval *restrict, void *restrict) = gettimeofday; int x = f (&c, 0); return !(x | c.tv_sec | c.tv_usec); ]])], [gl_cv_func_gettimeofday_posix_signature=yes], [gl_cv_func_gettimeofday_posix_signature=no])]) gl_FUNC_GETTIMEOFDAY_CLOBBER if test $gl_cv_func_gettimeofday_posix_signature != yes; then REPLACE_GETTIMEOFDAY=1 SYS_TIME_H=sys/time.h if test $gl_cv_func_gettimeofday_clobber != yes; then AC_LIBOBJ([gettimeofday]) gl_PREREQ_GETTIMEOFDAY fi fi ]) dnl See if gettimeofday clobbers the static buffer that localtime uses dnl for its return value. The gettimeofday function from Mac OS X 10.0.4 dnl (i.e., Darwin 1.3.7) has this problem. dnl dnl If it does, then arrange to use gettimeofday and localtime only via dnl the wrapper functions that work around the problem. AC_DEFUN([gl_FUNC_GETTIMEOFDAY_CLOBBER], [ AC_REQUIRE([gl_HEADER_SYS_TIME_H]) AC_CACHE_CHECK([whether gettimeofday clobbers localtime buffer], [gl_cv_func_gettimeofday_clobber], [AC_RUN_IFELSE( [AC_LANG_PROGRAM( [[#include #include #include #include ]], [[ time_t t = 0; struct tm *lt; struct tm saved_lt; struct timeval tv; lt = localtime (&t); saved_lt = *lt; gettimeofday (&tv, NULL); return memcmp (lt, &saved_lt, sizeof (struct tm)) != 0; ]])], [gl_cv_func_gettimeofday_clobber=no], [gl_cv_func_gettimeofday_clobber=yes], dnl When crosscompiling, assume it is broken. [gl_cv_func_gettimeofday_clobber=yes])]) if test $gl_cv_func_gettimeofday_clobber = yes; then REPLACE_GETTIMEOFDAY=1 SYS_TIME_H=sys/time.h gl_GETTIMEOFDAY_REPLACE_LOCALTIME AC_DEFINE([GETTIMEOFDAY_CLOBBERS_LOCALTIME], [1], [Define if gettimeofday clobbers the localtime buffer.]) fi ]) AC_DEFUN([gl_GETTIMEOFDAY_REPLACE_LOCALTIME], [ AC_LIBOBJ([gettimeofday]) gl_PREREQ_GETTIMEOFDAY AC_DEFINE([gmtime], [rpl_gmtime], [Define to rpl_gmtime if the replacement function should be used.]) AC_DEFINE([localtime], [rpl_localtime], [Define to rpl_localtime if the replacement function should be used.]) ]) # Prerequisites of lib/gettimeofday.c. AC_DEFUN([gl_PREREQ_GETTIMEOFDAY], [ AC_CHECK_HEADERS([sys/timeb.h]) AC_CHECK_FUNCS([_ftime]) ]) gnuit-4.9.5/m4/strnlen.m40000644000175000017500000000201511146671376012061 00000000000000# strnlen.m4 serial 10 dnl Copyright (C) 2002-2003, 2005-2007, 2009 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_STRNLEN], [ dnl Persuade glibc to declare strnlen(). AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) AC_CHECK_DECLS_ONCE([strnlen]) if test $ac_cv_have_decl_strnlen = no; then HAVE_DECL_STRNLEN=0 fi AC_FUNC_STRNLEN if test $ac_cv_func_strnlen_working = no; then # This is necessary because automake-1.6.1 doesn't understand # that the above use of AC_FUNC_STRNLEN means we may have to use # lib/strnlen.c. #AC_LIBOBJ([strnlen]) AC_DEFINE([strnlen], [rpl_strnlen], [Define to rpl_strnlen if the replacement function should be used.]) gl_PREREQ_STRNLEN fi ]) # Prerequisites of lib/strnlen.c. AC_DEFUN([gl_PREREQ_STRNLEN], [:]) gnuit-4.9.5/m4/wchar_t.m40000644000175000017500000000135411146671376012030 00000000000000# wchar_t.m4 serial 3 (gettext-0.18) dnl Copyright (C) 2002-2003, 2008, 2009 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Bruno Haible. dnl Test whether has the 'wchar_t' type. dnl Prerequisite: AC_PROG_CC AC_DEFUN([gt_TYPE_WCHAR_T], [ AC_CACHE_CHECK([for wchar_t], [gt_cv_c_wchar_t], [AC_TRY_COMPILE([#include wchar_t foo = (wchar_t)'\0';], , [gt_cv_c_wchar_t=yes], [gt_cv_c_wchar_t=no])]) if test $gt_cv_c_wchar_t = yes; then AC_DEFINE([HAVE_WCHAR_T], [1], [Define if you have the 'wchar_t' type.]) fi ]) gnuit-4.9.5/m4/mbrtowc.m40000644000175000017500000002252611146671376012062 00000000000000# mbrtowc.m4 serial 13 dnl Copyright (C) 2001-2002, 2004-2005, 2008, 2009 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_MBRTOWC], [ AC_REQUIRE([gl_WCHAR_H_DEFAULTS]) AC_REQUIRE([AC_TYPE_MBSTATE_T]) gl_MBSTATE_T_BROKEN if test $REPLACE_MBSTATE_T = 1; then REPLACE_MBRTOWC=1 fi AC_CHECK_FUNCS_ONCE([mbrtowc]) if test $ac_cv_func_mbrtowc = no; then HAVE_MBRTOWC=0 fi if test $HAVE_MBRTOWC != 0 && test $REPLACE_MBRTOWC != 1; then gl_MBRTOWC_NULL_ARG gl_MBRTOWC_RETVAL gl_MBRTOWC_NUL_RETVAL case "$gl_cv_func_mbrtowc_null_arg" in *yes) ;; *) AC_DEFINE([MBRTOWC_NULL_ARG_BUG], [1], [Define if the mbrtowc function has the NULL string argument bug.]) REPLACE_MBRTOWC=1 ;; esac case "$gl_cv_func_mbrtowc_retval" in *yes) ;; *) AC_DEFINE([MBRTOWC_RETVAL_BUG], [1], [Define if the mbrtowc function returns a wrong return value.]) REPLACE_MBRTOWC=1 ;; esac case "$gl_cv_func_mbrtowc_nul_retval" in *yes) ;; *) AC_DEFINE([MBRTOWC_NUL_RETVAL_BUG], [1], [Define if the mbrtowc function does not return 0 for a NUL character.]) REPLACE_MBRTOWC=1 ;; esac fi if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then gl_REPLACE_WCHAR_H AC_LIBOBJ([mbrtowc]) gl_PREREQ_MBRTOWC fi ]) dnl Test whether mbsinit() and mbrtowc() need to be overridden in a way that dnl redefines the semantics of the given mbstate_t type. dnl Result is REPLACE_MBSTATE_T. dnl When this is set to 1, we replace both mbsinit() and mbrtowc(), in order to dnl avoid inconsistencies. AC_DEFUN([gl_MBSTATE_T_BROKEN], [ AC_REQUIRE([gl_WCHAR_H_DEFAULTS]) AC_REQUIRE([AC_TYPE_MBSTATE_T]) AC_CHECK_FUNCS_ONCE([mbsinit]) AC_CHECK_FUNCS_ONCE([mbrtowc]) if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then gl_MBRTOWC_INCOMPLETE_STATE case "$gl_cv_func_mbrtowc_incomplete_state" in *yes) REPLACE_MBSTATE_T=0 ;; *) REPLACE_MBSTATE_T=1 ;; esac else REPLACE_MBSTATE_T=1 fi if test $REPLACE_MBSTATE_T = 1; then gl_REPLACE_WCHAR_H fi ]) dnl Test whether mbrtowc puts the state into non-initial state when parsing an dnl incomplete multibyte character. dnl Result is gl_cv_func_mbrtowc_incomplete_state. AC_DEFUN([gl_MBRTOWC_INCOMPLETE_STATE], [ AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([gt_LOCALE_JA]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_CACHE_CHECK([whether mbrtowc handles incomplete characters], [gl_cv_func_mbrtowc_incomplete_state], [ dnl Initial guess, used when cross-compiling or when no suitable locale dnl is present. changequote(,)dnl case "$host_os" in # Guess no on AIX and OSF/1. osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;; # Guess yes otherwise. *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;; esac changequote([,])dnl if test $LOCALE_JA != none; then AC_TRY_RUN([ #include #include #include int main () { if (setlocale (LC_ALL, "$LOCALE_JA") != NULL) { const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */ mbstate_t state; wchar_t wc; memset (&state, '\0', sizeof (mbstate_t)); if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2)) if (mbsinit (&state)) return 1; } return 0; }], [gl_cv_func_mbrtowc_incomplete_state=yes], [gl_cv_func_mbrtowc_incomplete_state=no], []) fi ]) ]) dnl Test whether mbrtowc supports a NULL string argument correctly. dnl Result is gl_cv_func_mbrtowc_null_arg. AC_DEFUN([gl_MBRTOWC_NULL_ARG], [ AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([gt_LOCALE_FR_UTF8]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_CACHE_CHECK([whether mbrtowc handles a NULL string argument], [gl_cv_func_mbrtowc_null_arg], [ dnl Initial guess, used when cross-compiling or when no suitable locale dnl is present. changequote(,)dnl case "$host_os" in # Guess no on OSF/1. osf*) gl_cv_func_mbrtowc_null_arg="guessing no" ;; # Guess yes otherwise. *) gl_cv_func_mbrtowc_null_arg="guessing yes" ;; esac changequote([,])dnl if test $LOCALE_FR_UTF8 != none; then AC_TRY_RUN([ #include #include #include int main () { if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL) { mbstate_t state; wchar_t wc; int ret; memset (&state, '\0', sizeof (mbstate_t)); wc = (wchar_t) 0xBADFACE; mbrtowc (&wc, NULL, 5, &state); /* Check that wc was not modified. */ if (wc != (wchar_t) 0xBADFACE) return 1; } return 0; }], [gl_cv_func_mbrtowc_null_arg=yes], [gl_cv_func_mbrtowc_null_arg=no], []) fi ]) ]) dnl Test whether mbrtowc, when parsing the end of a multibyte character, dnl correctly returns the number of bytes that were needed to complete the dnl character (not the total number of bytes of the multibyte character). dnl Result is gl_cv_func_mbrtowc_retval. AC_DEFUN([gl_MBRTOWC_RETVAL], [ AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([gt_LOCALE_FR_UTF8]) AC_REQUIRE([gt_LOCALE_JA]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_CACHE_CHECK([whether mbrtowc has a correct return value], [gl_cv_func_mbrtowc_retval], [ dnl Initial guess, used when cross-compiling or when no suitable locale dnl is present. changequote(,)dnl case "$host_os" in # Guess no on HP-UX and Solaris. hpux* | solaris*) gl_cv_func_mbrtowc_retval="guessing no" ;; # Guess yes otherwise. *) gl_cv_func_mbrtowc_retval="guessing yes" ;; esac changequote([,])dnl if test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none; then AC_TRY_RUN([ #include #include #include int main () { /* This fails on Solaris. */ if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL) { char input[] = "B\303\274\303\237er"; /* "Büßer" */ mbstate_t state; wchar_t wc; memset (&state, '\0', sizeof (mbstate_t)); if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2)) { input[1] = '\0'; if (mbrtowc (&wc, input + 2, 5, &state) != 1) return 1; } } /* This fails on HP-UX 11.11. */ if (setlocale (LC_ALL, "$LOCALE_JA") != NULL) { char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */ mbstate_t state; wchar_t wc; memset (&state, '\0', sizeof (mbstate_t)); if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2)) { input[1] = '\0'; if (mbrtowc (&wc, input + 2, 5, &state) != 2) return 1; } } return 0; }], [gl_cv_func_mbrtowc_retval=yes], [gl_cv_func_mbrtowc_retval=no], []) fi ]) ]) dnl Test whether mbrtowc, when parsing a NUL character, correctly returns 0. dnl Result is gl_cv_func_mbrtowc_nul_retval. AC_DEFUN([gl_MBRTOWC_NUL_RETVAL], [ AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([gt_LOCALE_ZH_CN]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_CACHE_CHECK([whether mbrtowc returns 0 when parsing a NUL character], [gl_cv_func_mbrtowc_nul_retval], [ dnl Initial guess, used when cross-compiling or when no suitable locale dnl is present. changequote(,)dnl case "$host_os" in # Guess no on Solaris 9. solaris2.9) gl_cv_func_mbrtowc_nul_retval="guessing no" ;; # Guess yes otherwise. *) gl_cv_func_mbrtowc_nul_retval="guessing yes" ;; esac changequote([,])dnl if test $LOCALE_ZH_CN != none; then AC_TRY_RUN([ #include #include #include int main () { /* This fails on Solaris 9. */ if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL) { mbstate_t state; wchar_t wc; memset (&state, '\0', sizeof (mbstate_t)); if (mbrtowc (&wc, "", 1, &state) != 0) return 1; } return 0; }], [gl_cv_func_mbrtowc_nul_retval=yes], [gl_cv_func_mbrtowc_nul_retval=no], []) fi ]) ]) # Prerequisites of lib/mbrtowc.c. AC_DEFUN([gl_PREREQ_MBRTOWC], [ : ]) dnl From Paul Eggert dnl This override of an autoconf macro can be removed when autoconf 2.60 or dnl newer can be assumed everywhere. m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.60]),[-1],[ AC_DEFUN([AC_FUNC_MBRTOWC], [ dnl Same as AC_FUNC_MBRTOWC in autoconf-2.60. AC_CACHE_CHECK([whether mbrtowc and mbstate_t are properly declared], gl_cv_func_mbrtowc, [AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[#include ]], [[wchar_t wc; char const s[] = ""; size_t n = 1; mbstate_t state; return ! (sizeof state && (mbrtowc) (&wc, s, n, &state));]])], gl_cv_func_mbrtowc=yes, gl_cv_func_mbrtowc=no)]) if test $gl_cv_func_mbrtowc = yes; then AC_DEFINE([HAVE_MBRTOWC], [1], [Define to 1 if mbrtowc and mbstate_t are properly declared.]) fi ]) ]) gnuit-4.9.5/m4/sys_select_h.m40000644000175000017500000000266311146671376013071 00000000000000# sys_select_h.m4 serial 6 dnl Copyright (C) 2006-2008 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_HEADER_SYS_SELECT], [ AC_REQUIRE([gl_HEADER_SYS_SOCKET]) AC_REQUIRE([gl_SYS_SELECT_H_DEFAULTS]) AC_CACHE_CHECK([whether is self-contained], [gl_cv_header_sys_select_h_selfcontained], [ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], [[struct timeval b;]])], [gl_cv_header_sys_select_h_selfcontained=yes], [gl_cv_header_sys_select_h_selfcontained=no]) ]) if test $gl_cv_header_sys_select_h_selfcontained = yes; then SYS_SELECT_H='' else SYS_SELECT_H='sys/select.h' gl_CHECK_NEXT_HEADERS([sys/select.h]) if test $ac_cv_header_sys_select_h = yes; then HAVE_SYS_SELECT_H=1 else HAVE_SYS_SELECT_H=0 fi AC_SUBST([HAVE_SYS_SELECT_H]) gl_PREREQ_SYS_H_WINSOCK2 fi AC_SUBST([SYS_SELECT_H]) ]) AC_DEFUN([gl_SYS_SELECT_MODULE_INDICATOR], [ dnl Use AC_REQUIRE here, so that the default settings are expanded once only. AC_REQUIRE([gl_SYS_SELECT_H_DEFAULTS]) GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1 ]) AC_DEFUN([gl_SYS_SELECT_H_DEFAULTS], [ GNULIB_SELECT=0; AC_SUBST([GNULIB_SELECT]) ]) gnuit-4.9.5/m4/memmove.m40000644000175000017500000000074211146671376012046 00000000000000# memmove.m4 serial 3 dnl Copyright (C) 2002, 2009 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_MEMMOVE], [ AC_REPLACE_FUNCS([memmove]) if test $ac_cv_func_memmove = no; then gl_PREREQ_MEMMOVE fi ]) # Prerequisites of lib/memmove.c. AC_DEFUN([gl_PREREQ_MEMMOVE], [ : ]) gnuit-4.9.5/m4/exitfail.m40000644000175000017500000000060611146671375012204 00000000000000# exitfail.m4 serial 6 dnl Copyright (C) 2002, 2003, 2005, 2006 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_EXITFAIL], [ AC_LIBOBJ([exitfail]) dnl No prerequisites of lib/exitfail.c. : ]) gnuit-4.9.5/m4/extensions.m40000644000175000017500000000727511146671375012607 00000000000000# serial 8 -*- Autoconf -*- # Enable extensions on systems that normally disable them. # Copyright (C) 2003, 2006-2009 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 definition of AC_USE_SYSTEM_EXTENSIONS is stolen from CVS # Autoconf. Perhaps we can remove this once we can assume Autoconf # 2.62 or later everywhere, but since CVS Autoconf mutates rapidly # enough in this area it's likely we'll need to redefine # AC_USE_SYSTEM_EXTENSIONS for quite some time. # AC_USE_SYSTEM_EXTENSIONS # ------------------------ # Enable extensions on systems that normally disable them, # typically due to standards-conformance issues. # Remember that #undef in AH_VERBATIM gets replaced with #define by # AC_DEFINE. The goal here is to define all known feature-enabling # macros, then, if reports of conflicts are made, disable macros that # cause problems on some platforms (such as __EXTENSIONS__). AC_DEFUN_ONCE([AC_USE_SYSTEM_EXTENSIONS], [AC_BEFORE([$0], [AC_COMPILE_IFELSE])dnl AC_BEFORE([$0], [AC_RUN_IFELSE])dnl AC_REQUIRE([AC_CANONICAL_HOST]) AC_CHECK_HEADER([minix/config.h], [MINIX=yes], [MINIX=]) if test "$MINIX" = yes; then AC_DEFINE([_POSIX_SOURCE], [1], [Define to 1 if you need to in order for `stat' and other things to work.]) AC_DEFINE([_POSIX_1_SOURCE], [2], [Define to 2 if the system does not provide POSIX.1 features except with this defined.]) AC_DEFINE([_MINIX], [1], [Define to 1 if on MINIX.]) fi dnl HP-UX 11.11 defines mbstate_t only if _XOPEN_SOURCE is defined to 500, dnl regardless of whether the flags -Ae or _D_HPUX_SOURCE=1 are already dnl provided. case "$host_os" in hpux*) AC_DEFINE([_XOPEN_SOURCE], [500], [Define to 500 only on HP-UX.]) ;; esac AH_VERBATIM([__EXTENSIONS__], [/* Enable extensions on AIX 3, Interix. */ #ifndef _ALL_SOURCE # undef _ALL_SOURCE #endif /* Enable GNU extensions on systems that have them. */ #ifndef _GNU_SOURCE # undef _GNU_SOURCE #endif /* Enable threading extensions on Solaris. */ #ifndef _POSIX_PTHREAD_SEMANTICS # undef _POSIX_PTHREAD_SEMANTICS #endif /* Enable extensions on HP NonStop. */ #ifndef _TANDEM_SOURCE # undef _TANDEM_SOURCE #endif /* Enable general extensions on Solaris. */ #ifndef __EXTENSIONS__ # undef __EXTENSIONS__ #endif ]) AC_CACHE_CHECK([whether it is safe to define __EXTENSIONS__], [ac_cv_safe_to_define___extensions__], [AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([[ # define __EXTENSIONS__ 1 ]AC_INCLUDES_DEFAULT])], [ac_cv_safe_to_define___extensions__=yes], [ac_cv_safe_to_define___extensions__=no])]) test $ac_cv_safe_to_define___extensions__ = yes && AC_DEFINE([__EXTENSIONS__]) AC_DEFINE([_ALL_SOURCE]) AC_DEFINE([_GNU_SOURCE]) AC_DEFINE([_POSIX_PTHREAD_SEMANTICS]) AC_DEFINE([_TANDEM_SOURCE]) ])# AC_USE_SYSTEM_EXTENSIONS # gl_USE_SYSTEM_EXTENSIONS # ------------------------ # Enable extensions on systems that normally disable them, # typically due to standards-conformance issues. AC_DEFUN_ONCE([gl_USE_SYSTEM_EXTENSIONS], [ dnl Require this macro before AC_USE_SYSTEM_EXTENSIONS. dnl gnulib does not need it. But if it gets required by third-party macros dnl after AC_USE_SYSTEM_EXTENSIONS is required, autoconf 2.62..2.63 emit a dnl warning: "AC_COMPILE_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS". dnl Note: We can do this only for one of the macros AC_AIX, AC_GNU_SOURCE, dnl AC_MINIX. If people still use AC_AIX or AC_MINIX, they are out of luck. AC_REQUIRE([AC_GNU_SOURCE]) AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) ]) gnuit-4.9.5/m4/malloca.m40000644000175000017500000000106211146671376012005 00000000000000# malloca.m4 serial 1 dnl Copyright (C) 2003-2004, 2006-2007 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_MALLOCA], [ dnl Use the autoconf tests for alloca(), but not the AC_SUBSTed variables dnl @ALLOCA@ and @LTALLOCA@. dnl gl_FUNC_ALLOCA dnl Already brought in by the module dependencies. AC_REQUIRE([gl_EEMALLOC]) AC_REQUIRE([AC_TYPE_LONG_LONG_INT]) ]) gnuit-4.9.5/m4/strtoimax.m40000644000175000017500000000205611146671376012433 00000000000000# strtoimax.m4 serial 7 dnl Copyright (C) 2002, 2003, 2004, 2006, 2009 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_STRTOIMAX], [ dnl Work around a bug of AC_EGREP_CPP in autoconf-2.57. AC_REQUIRE([AC_PROG_CPP]) AC_REQUIRE([AC_PROG_EGREP]) AC_CACHE_CHECK([whether defines strtoimax as a macro], gl_cv_func_strtoimax_macro, [AC_EGREP_CPP([inttypes_h_defines_strtoimax], [#include #ifdef strtoimax inttypes_h_defines_strtoimax #endif], gl_cv_func_strtoimax_macro=yes, gl_cv_func_strtoimax_macro=no)]) if test "$gl_cv_func_strtoimax_macro" != yes; then AC_REPLACE_FUNCS([strtoimax]) if test $ac_cv_func_strtoimax = no; then gl_PREREQ_STRTOIMAX fi fi ]) # Prerequisites of lib/strtoimax.c. AC_DEFUN([gl_PREREQ_STRTOIMAX], [ AC_CHECK_DECLS([strtoll]) AC_REQUIRE([AC_TYPE_LONG_LONG_INT]) ]) gnuit-4.9.5/m4/write.m40000644000175000017500000000130411146671376011526 00000000000000# write.m4 serial 1 dnl Copyright (C) 2008 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_WRITE], [ AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) dnl This ifdef is just an optimization, to avoid performing a configure dnl check whose result is not used. It does not make the test of dnl GNULIB_UNISTD_H_SIGPIPE or GNULIB_SIGPIPE redundant. m4_ifdef([gl_SIGNAL_SIGPIPE], [ gl_SIGNAL_SIGPIPE if test $gl_cv_header_signal_h_SIGPIPE != yes; then REPLACE_WRITE=1 AC_LIBOBJ([write]) fi ]) ]) gnuit-4.9.5/m4/strtol.m40000644000175000017500000000053511146671376011730 00000000000000# strtol.m4 serial 5 dnl Copyright (C) 2002, 2003, 2006, 2009 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_STRTOL], [ AC_REPLACE_FUNCS([strtol]) ]) gnuit-4.9.5/m4/string_h.m40000644000175000017500000000754111146671376012222 00000000000000# Configure a GNU-like replacement for . # Copyright (C) 2007, 2008 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 6 # Written by Paul Eggert. AC_DEFUN([gl_HEADER_STRING_H], [ dnl Use AC_REQUIRE here, so that the default behavior below is expanded dnl once only, before all statements that occur in other macros. AC_REQUIRE([gl_HEADER_STRING_H_BODY]) ]) AC_DEFUN([gl_HEADER_STRING_H_BODY], [ AC_REQUIRE([AC_C_RESTRICT]) AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) gl_CHECK_NEXT_HEADERS([string.h]) ]) AC_DEFUN([gl_STRING_MODULE_INDICATOR], [ dnl Use AC_REQUIRE here, so that the default settings are expanded once only. AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1 ]) AC_DEFUN([gl_HEADER_STRING_H_DEFAULTS], [ GNULIB_MEMMEM=0; AC_SUBST([GNULIB_MEMMEM]) GNULIB_MEMPCPY=0; AC_SUBST([GNULIB_MEMPCPY]) GNULIB_MEMRCHR=0; AC_SUBST([GNULIB_MEMRCHR]) GNULIB_RAWMEMCHR=0; AC_SUBST([GNULIB_RAWMEMCHR]) GNULIB_STPCPY=0; AC_SUBST([GNULIB_STPCPY]) GNULIB_STPNCPY=0; AC_SUBST([GNULIB_STPNCPY]) GNULIB_STRCHRNUL=0; AC_SUBST([GNULIB_STRCHRNUL]) GNULIB_STRDUP=0; AC_SUBST([GNULIB_STRDUP]) GNULIB_STRNDUP=0; AC_SUBST([GNULIB_STRNDUP]) GNULIB_STRNLEN=0; AC_SUBST([GNULIB_STRNLEN]) GNULIB_STRPBRK=0; AC_SUBST([GNULIB_STRPBRK]) GNULIB_STRSEP=0; AC_SUBST([GNULIB_STRSEP]) GNULIB_STRSTR=0; AC_SUBST([GNULIB_STRSTR]) GNULIB_STRCASESTR=0; AC_SUBST([GNULIB_STRCASESTR]) GNULIB_STRTOK_R=0; AC_SUBST([GNULIB_STRTOK_R]) GNULIB_MBSLEN=0; AC_SUBST([GNULIB_MBSLEN]) GNULIB_MBSNLEN=0; AC_SUBST([GNULIB_MBSNLEN]) GNULIB_MBSCHR=0; AC_SUBST([GNULIB_MBSCHR]) GNULIB_MBSRCHR=0; AC_SUBST([GNULIB_MBSRCHR]) GNULIB_MBSSTR=0; AC_SUBST([GNULIB_MBSSTR]) GNULIB_MBSCASECMP=0; AC_SUBST([GNULIB_MBSCASECMP]) GNULIB_MBSNCASECMP=0; AC_SUBST([GNULIB_MBSNCASECMP]) GNULIB_MBSPCASECMP=0; AC_SUBST([GNULIB_MBSPCASECMP]) GNULIB_MBSCASESTR=0; AC_SUBST([GNULIB_MBSCASESTR]) GNULIB_MBSCSPN=0; AC_SUBST([GNULIB_MBSCSPN]) GNULIB_MBSPBRK=0; AC_SUBST([GNULIB_MBSPBRK]) GNULIB_MBSSPN=0; AC_SUBST([GNULIB_MBSSPN]) GNULIB_MBSSEP=0; AC_SUBST([GNULIB_MBSSEP]) GNULIB_MBSTOK_R=0; AC_SUBST([GNULIB_MBSTOK_R]) GNULIB_STRERROR=0; AC_SUBST([GNULIB_STRERROR]) GNULIB_STRSIGNAL=0; AC_SUBST([GNULIB_STRSIGNAL]) GNULIB_STRVERSCMP=0; AC_SUBST([GNULIB_STRVERSCMP]) dnl Assume proper GNU behavior unless another module says otherwise. HAVE_DECL_MEMMEM=1; AC_SUBST([HAVE_DECL_MEMMEM]) HAVE_MEMPCPY=1; AC_SUBST([HAVE_MEMPCPY]) HAVE_DECL_MEMRCHR=1; AC_SUBST([HAVE_DECL_MEMRCHR]) HAVE_RAWMEMCHR=1; AC_SUBST([HAVE_RAWMEMCHR]) HAVE_STPCPY=1; AC_SUBST([HAVE_STPCPY]) HAVE_STPNCPY=1; AC_SUBST([HAVE_STPNCPY]) HAVE_STRCHRNUL=1; AC_SUBST([HAVE_STRCHRNUL]) HAVE_DECL_STRDUP=1; AC_SUBST([HAVE_DECL_STRDUP]) HAVE_STRNDUP=1; AC_SUBST([HAVE_STRNDUP]) HAVE_DECL_STRNDUP=1; AC_SUBST([HAVE_DECL_STRNDUP]) HAVE_DECL_STRNLEN=1; AC_SUBST([HAVE_DECL_STRNLEN]) HAVE_STRPBRK=1; AC_SUBST([HAVE_STRPBRK]) HAVE_STRSEP=1; AC_SUBST([HAVE_STRSEP]) HAVE_STRCASESTR=1; AC_SUBST([HAVE_STRCASESTR]) HAVE_DECL_STRTOK_R=1; AC_SUBST([HAVE_DECL_STRTOK_R]) HAVE_DECL_STRERROR=1; AC_SUBST([HAVE_DECL_STRERROR]) HAVE_DECL_STRSIGNAL=1; AC_SUBST([HAVE_DECL_STRSIGNAL]) HAVE_STRVERSCMP=1; AC_SUBST([HAVE_STRVERSCMP]) REPLACE_MEMMEM=0; AC_SUBST([REPLACE_MEMMEM]) REPLACE_STRDUP=0; AC_SUBST([REPLACE_STRDUP]) REPLACE_STRSTR=0; AC_SUBST([REPLACE_STRSTR]) REPLACE_STRCASESTR=0; AC_SUBST([REPLACE_STRCASESTR]) REPLACE_STRERROR=0; AC_SUBST([REPLACE_STRERROR]) REPLACE_STRSIGNAL=0; AC_SUBST([REPLACE_STRSIGNAL]) ]) gnuit-4.9.5/m4/signal_h.m40000644000175000017500000000242011146671376012160 00000000000000# signal_h.m4 serial 6 dnl Copyright (C) 2007, 2008 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_SIGNAL_H], [ AC_REQUIRE([gl_SIGNAL_H_DEFAULTS]) gl_CHECK_NEXT_HEADERS([signal.h]) ]) AC_DEFUN([gl_SIGNAL_MODULE_INDICATOR], [ dnl Use AC_REQUIRE here, so that the default settings are expanded once only. AC_REQUIRE([gl_SIGNAL_H_DEFAULTS]) GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1 ]) AC_DEFUN([gl_SIGNAL_H_DEFAULTS], [ GNULIB_SIGNAL_H_SIGPIPE=0; AC_SUBST([GNULIB_SIGNAL_H_SIGPIPE]) GNULIB_SIGPROCMASK=0; AC_SUBST([GNULIB_SIGPROCMASK]) GNULIB_SIGACTION=0; AC_SUBST([GNULIB_SIGACTION]) dnl Assume proper GNU behavior unless another module says otherwise. HAVE_POSIX_SIGNALBLOCKING=1; AC_SUBST([HAVE_POSIX_SIGNALBLOCKING]) HAVE_SIGSET_T=1; AC_SUBST([HAVE_SIGSET_T]) HAVE_SIGINFO_T=1; AC_SUBST([HAVE_SIGINFO_T]) HAVE_SIGACTION=1; AC_SUBST([HAVE_SIGACTION]) HAVE_STRUCT_SIGACTION_SA_SIGACTION=1; AC_SUBST([HAVE_STRUCT_SIGACTION_SA_SIGACTION]) ]) gnuit-4.9.5/m4/timespec.m40000644000175000017500000000063311146671376012211 00000000000000#serial 14 # Copyright (C) 2000, 2001, 2003, 2004, 2005, 2006, 2007 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. dnl From Jim Meyering AC_DEFUN([gl_TIMESPEC], [ dnl Prerequisites of lib/timespec.h. AC_REQUIRE([AC_C_INLINE]) ]) gnuit-4.9.5/m4/stdint.m40000644000175000017500000003260511146671376011711 00000000000000# stdint.m4 serial 33 dnl Copyright (C) 2001-2009 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Paul Eggert and Bruno Haible. dnl Test whether is supported or must be substituted. AC_DEFUN([gl_STDINT_H], [ AC_PREREQ([2.59])dnl dnl Check for long long int and unsigned long long int. AC_REQUIRE([AC_TYPE_LONG_LONG_INT]) if test $ac_cv_type_long_long_int = yes; then HAVE_LONG_LONG_INT=1 else HAVE_LONG_LONG_INT=0 fi AC_SUBST([HAVE_LONG_LONG_INT]) AC_REQUIRE([AC_TYPE_UNSIGNED_LONG_LONG_INT]) if test $ac_cv_type_unsigned_long_long_int = yes; then HAVE_UNSIGNED_LONG_LONG_INT=1 else HAVE_UNSIGNED_LONG_LONG_INT=0 fi AC_SUBST([HAVE_UNSIGNED_LONG_LONG_INT]) dnl Check for . dnl AC_INCLUDES_DEFAULT defines $ac_cv_header_inttypes_h. if test $ac_cv_header_inttypes_h = yes; then HAVE_INTTYPES_H=1 else HAVE_INTTYPES_H=0 fi AC_SUBST([HAVE_INTTYPES_H]) dnl Check for . dnl AC_INCLUDES_DEFAULT defines $ac_cv_header_sys_types_h. if test $ac_cv_header_sys_types_h = yes; then HAVE_SYS_TYPES_H=1 else HAVE_SYS_TYPES_H=0 fi AC_SUBST([HAVE_SYS_TYPES_H]) gl_CHECK_NEXT_HEADERS([stdint.h]) if test $ac_cv_header_stdint_h = yes; then HAVE_STDINT_H=1 else HAVE_STDINT_H=0 fi AC_SUBST([HAVE_STDINT_H]) dnl Now see whether we need a substitute . if test $ac_cv_header_stdint_h = yes; then AC_CACHE_CHECK([whether stdint.h conforms to C99], [gl_cv_header_working_stdint_h], [gl_cv_header_working_stdint_h=no AC_COMPILE_IFELSE([ AC_LANG_PROGRAM([[ #define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */ #define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */ #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */ #include /* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in . */ #if !(defined WCHAR_MIN && defined WCHAR_MAX) #error "WCHAR_MIN, WCHAR_MAX not defined in " #endif ] gl_STDINT_INCLUDES [ #ifdef INT8_MAX int8_t a1 = INT8_MAX; int8_t a1min = INT8_MIN; #endif #ifdef INT16_MAX int16_t a2 = INT16_MAX; int16_t a2min = INT16_MIN; #endif #ifdef INT32_MAX int32_t a3 = INT32_MAX; int32_t a3min = INT32_MIN; #endif #ifdef INT64_MAX int64_t a4 = INT64_MAX; int64_t a4min = INT64_MIN; #endif #ifdef UINT8_MAX uint8_t b1 = UINT8_MAX; #else typedef int b1[(unsigned char) -1 != 255 ? 1 : -1]; #endif #ifdef UINT16_MAX uint16_t b2 = UINT16_MAX; #endif #ifdef UINT32_MAX uint32_t b3 = UINT32_MAX; #endif #ifdef UINT64_MAX uint64_t b4 = UINT64_MAX; #endif int_least8_t c1 = INT8_C (0x7f); int_least8_t c1max = INT_LEAST8_MAX; int_least8_t c1min = INT_LEAST8_MIN; int_least16_t c2 = INT16_C (0x7fff); int_least16_t c2max = INT_LEAST16_MAX; int_least16_t c2min = INT_LEAST16_MIN; int_least32_t c3 = INT32_C (0x7fffffff); int_least32_t c3max = INT_LEAST32_MAX; int_least32_t c3min = INT_LEAST32_MIN; int_least64_t c4 = INT64_C (0x7fffffffffffffff); int_least64_t c4max = INT_LEAST64_MAX; int_least64_t c4min = INT_LEAST64_MIN; uint_least8_t d1 = UINT8_C (0xff); uint_least8_t d1max = UINT_LEAST8_MAX; uint_least16_t d2 = UINT16_C (0xffff); uint_least16_t d2max = UINT_LEAST16_MAX; uint_least32_t d3 = UINT32_C (0xffffffff); uint_least32_t d3max = UINT_LEAST32_MAX; uint_least64_t d4 = UINT64_C (0xffffffffffffffff); uint_least64_t d4max = UINT_LEAST64_MAX; int_fast8_t e1 = INT_FAST8_MAX; int_fast8_t e1min = INT_FAST8_MIN; int_fast16_t e2 = INT_FAST16_MAX; int_fast16_t e2min = INT_FAST16_MIN; int_fast32_t e3 = INT_FAST32_MAX; int_fast32_t e3min = INT_FAST32_MIN; int_fast64_t e4 = INT_FAST64_MAX; int_fast64_t e4min = INT_FAST64_MIN; uint_fast8_t f1 = UINT_FAST8_MAX; uint_fast16_t f2 = UINT_FAST16_MAX; uint_fast32_t f3 = UINT_FAST32_MAX; uint_fast64_t f4 = UINT_FAST64_MAX; #ifdef INTPTR_MAX intptr_t g = INTPTR_MAX; intptr_t gmin = INTPTR_MIN; #endif #ifdef UINTPTR_MAX uintptr_t h = UINTPTR_MAX; #endif intmax_t i = INTMAX_MAX; uintmax_t j = UINTMAX_MAX; #include /* for CHAR_BIT */ #define TYPE_MINIMUM(t) \ ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ (t) 0 << (sizeof (t) * CHAR_BIT - 1))) #define TYPE_MAXIMUM(t) \ ((t) ((t) 0 < (t) -1 ? (t) -1 : ~ (~ (t) 0 << (sizeof (t) * CHAR_BIT - 1)))) struct s { int check_PTRDIFF: PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t) && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t) ? 1 : -1; /* Detect bug in FreeBSD 6.0 / ia64. */ int check_SIG_ATOMIC: SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t) && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t) ? 1 : -1; int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1; int check_WCHAR: WCHAR_MIN == TYPE_MINIMUM (wchar_t) && WCHAR_MAX == TYPE_MAXIMUM (wchar_t) ? 1 : -1; /* Detect bug in mingw. */ int check_WINT: WINT_MIN == TYPE_MINIMUM (wint_t) && WINT_MAX == TYPE_MAXIMUM (wint_t) ? 1 : -1; /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */ int check_UINT8_C: (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1; int check_UINT16_C: (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1; /* Detect bugs in OpenBSD 3.9 stdint.h. */ #ifdef UINT8_MAX int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1; #endif #ifdef UINT16_MAX int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1; #endif #ifdef UINT32_MAX int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1; #endif #ifdef UINT64_MAX int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1; #endif int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1; int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1; int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1; int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1; int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1; int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1; int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1; int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1; int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1; int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1; int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1; }; ]])], [gl_cv_header_working_stdint_h=yes])]) fi if test "$gl_cv_header_working_stdint_h" = yes; then STDINT_H= else dnl Check for , and for dnl (used in Linux libc4 >= 4.6.7 and libc5). AC_CHECK_HEADERS([sys/inttypes.h sys/bitypes.h]) if test $ac_cv_header_sys_inttypes_h = yes; then HAVE_SYS_INTTYPES_H=1 else HAVE_SYS_INTTYPES_H=0 fi AC_SUBST([HAVE_SYS_INTTYPES_H]) if test $ac_cv_header_sys_bitypes_h = yes; then HAVE_SYS_BITYPES_H=1 else HAVE_SYS_BITYPES_H=0 fi AC_SUBST([HAVE_SYS_BITYPES_H]) dnl Check for (missing in Linux uClibc when built without wide dnl character support). AC_CHECK_HEADERS_ONCE([wchar.h]) gl_STDINT_TYPE_PROPERTIES STDINT_H=stdint.h fi AC_SUBST([STDINT_H]) ]) dnl gl_STDINT_BITSIZEOF(TYPES, INCLUDES) dnl Determine the size of each of the given types in bits. AC_DEFUN([gl_STDINT_BITSIZEOF], [ dnl Use a shell loop, to avoid bloating configure, and dnl - extra AH_TEMPLATE calls, so that autoheader knows what to put into dnl config.h.in, dnl - extra AC_SUBST calls, so that the right substitutions are made. m4_foreach_w([gltype], [$1], [AH_TEMPLATE([BITSIZEOF_]translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_]), [Define to the number of bits in type ']gltype['.])]) for gltype in $1 ; do AC_CACHE_CHECK([for bit size of $gltype], [gl_cv_bitsizeof_${gltype}], [AC_COMPUTE_INT([result], [sizeof ($gltype) * CHAR_BIT], [$2 #include ], [result=unknown]) eval gl_cv_bitsizeof_${gltype}=\$result ]) eval result=\$gl_cv_bitsizeof_${gltype} if test $result = unknown; then dnl Use a nonempty default, because some compilers, such as IRIX 5 cc, dnl do a syntax check even on unused #if conditions and give an error dnl on valid C code like this: dnl #if 0 dnl # if > 32 dnl # endif dnl #endif result=0 fi GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` AC_DEFINE_UNQUOTED([BITSIZEOF_${GLTYPE}], [$result]) eval BITSIZEOF_${GLTYPE}=\$result done m4_foreach_w([gltype], [$1], [AC_SUBST([BITSIZEOF_]translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_]))]) ]) dnl gl_CHECK_TYPES_SIGNED(TYPES, INCLUDES) dnl Determine the signedness of each of the given types. dnl Define HAVE_SIGNED_TYPE if type is signed. AC_DEFUN([gl_CHECK_TYPES_SIGNED], [ dnl Use a shell loop, to avoid bloating configure, and dnl - extra AH_TEMPLATE calls, so that autoheader knows what to put into dnl config.h.in, dnl - extra AC_SUBST calls, so that the right substitutions are made. m4_foreach_w([gltype], [$1], [AH_TEMPLATE([HAVE_SIGNED_]translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_]), [Define to 1 if ']gltype[' is a signed integer type.])]) for gltype in $1 ; do AC_CACHE_CHECK([whether $gltype is signed], [gl_cv_type_${gltype}_signed], [AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([$2[ int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];]])], result=yes, result=no) eval gl_cv_type_${gltype}_signed=\$result ]) eval result=\$gl_cv_type_${gltype}_signed GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` if test "$result" = yes; then AC_DEFINE_UNQUOTED([HAVE_SIGNED_${GLTYPE}], [1]) eval HAVE_SIGNED_${GLTYPE}=1 else eval HAVE_SIGNED_${GLTYPE}=0 fi done m4_foreach_w([gltype], [$1], [AC_SUBST([HAVE_SIGNED_]translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_]))]) ]) dnl gl_INTEGER_TYPE_SUFFIX(TYPES, INCLUDES) dnl Determine the suffix to use for integer constants of the given types. dnl Define t_SUFFIX for each such type. AC_DEFUN([gl_INTEGER_TYPE_SUFFIX], [ dnl Use a shell loop, to avoid bloating configure, and dnl - extra AH_TEMPLATE calls, so that autoheader knows what to put into dnl config.h.in, dnl - extra AC_SUBST calls, so that the right substitutions are made. m4_foreach_w([gltype], [$1], [AH_TEMPLATE(translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_])[_SUFFIX], [Define to l, ll, u, ul, ull, etc., as suitable for constants of type ']gltype['.])]) for gltype in $1 ; do AC_CACHE_CHECK([for $gltype integer literal suffix], [gl_cv_type_${gltype}_suffix], [eval gl_cv_type_${gltype}_suffix=no eval result=\$gl_cv_type_${gltype}_signed if test "$result" = yes; then glsufu= else glsufu=u fi for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do case $glsuf in '') gltype1='int';; l) gltype1='long int';; ll) gltype1='long long int';; i64) gltype1='__int64';; u) gltype1='unsigned int';; ul) gltype1='unsigned long int';; ull) gltype1='unsigned long long int';; ui64)gltype1='unsigned __int64';; esac AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([$2[ extern $gltype foo; extern $gltype1 foo;]])], [eval gl_cv_type_${gltype}_suffix=\$glsuf]) eval result=\$gl_cv_type_${gltype}_suffix test "$result" != no && break done]) GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` eval result=\$gl_cv_type_${gltype}_suffix test "$result" = no && result= eval ${GLTYPE}_SUFFIX=\$result AC_DEFINE_UNQUOTED([${GLTYPE}_SUFFIX], [$result]) done m4_foreach_w([gltype], [$1], [AC_SUBST(translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_])[_SUFFIX])]) ]) dnl gl_STDINT_INCLUDES AC_DEFUN([gl_STDINT_INCLUDES], [[ /* BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #if HAVE_WCHAR_H # include # include # include #endif ]]) dnl gl_STDINT_TYPE_PROPERTIES dnl Compute HAVE_SIGNED_t, BITSIZEOF_t and t_SUFFIX, for all the types t dnl of interest to stdint.in.h. AC_DEFUN([gl_STDINT_TYPE_PROPERTIES], [ AC_REQUIRE([gl_MULTIARCH]) if test $APPLE_UNIVERSAL_BUILD = 0; then gl_STDINT_BITSIZEOF([ptrdiff_t size_t], [gl_STDINT_INCLUDES]) fi gl_STDINT_BITSIZEOF([sig_atomic_t wchar_t wint_t], [gl_STDINT_INCLUDES]) gl_CHECK_TYPES_SIGNED([sig_atomic_t wchar_t wint_t], [gl_STDINT_INCLUDES]) gl_cv_type_ptrdiff_t_signed=yes gl_cv_type_size_t_signed=no if test $APPLE_UNIVERSAL_BUILD = 0; then gl_INTEGER_TYPE_SUFFIX([ptrdiff_t size_t], [gl_STDINT_INCLUDES]) fi gl_INTEGER_TYPE_SUFFIX([sig_atomic_t wchar_t wint_t], [gl_STDINT_INCLUDES]) ]) dnl Autoconf >= 2.61 has AC_COMPUTE_INT built-in. dnl Remove this when we can assume autoconf >= 2.61. m4_ifdef([AC_COMPUTE_INT], [], [ AC_DEFUN([AC_COMPUTE_INT], [_AC_COMPUTE_INT([$2],[$1],[$3],[$4])]) ]) # Hey Emacs! # Local Variables: # indent-tabs-mode: nil # End: gnuit-4.9.5/m4/mbstate_t.m40000644000175000017500000000212011146671376012353 00000000000000# mbstate_t.m4 serial 12 dnl Copyright (C) 2000-2002, 2008, 2009 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. # From Paul Eggert. # BeOS 5 has but does not define mbstate_t, # so you can't declare an object of that type. # Check for this incompatibility with Standard C. # AC_TYPE_MBSTATE_T # ----------------- AC_DEFUN([AC_TYPE_MBSTATE_T], [ AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) dnl for HP-UX 11.11 AC_CACHE_CHECK([for mbstate_t], [ac_cv_type_mbstate_t], [AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [AC_INCLUDES_DEFAULT[ # include ]], [[mbstate_t x; return sizeof x;]])], [ac_cv_type_mbstate_t=yes], [ac_cv_type_mbstate_t=no])]) if test $ac_cv_type_mbstate_t = yes; then AC_DEFINE([HAVE_MBSTATE_T], [1], [Define to 1 if declares mbstate_t.]) else AC_DEFINE([mbstate_t], [int], [Define to a type if does not define.]) fi ]) gnuit-4.9.5/m4/mbiter.m40000644000175000017500000000111411146671376011655 00000000000000# mbiter.m4 serial 4 dnl Copyright (C) 2005, 2008 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl autoconf tests required for use of mbiter.h dnl From Bruno Haible. AC_DEFUN([gl_MBITER], [ AC_REQUIRE([AC_TYPE_MBSTATE_T]) dnl The following line is that so the user can test HAVE_MBRTOWC before dnl #include "mbiter.h" or "mbuiter.h". It can be removed in 2010. AC_REQUIRE([AC_FUNC_MBRTOWC]) : ]) gnuit-4.9.5/m4/fnmatch.m40000644000175000017500000001077011146671375012022 00000000000000# Check for fnmatch - serial 2. # Copyright (C) 2000-2007, 2009 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. # Autoconf defines AC_FUNC_FNMATCH, but that is obsolescent. # New applications should use the macros below instead. # _AC_FUNC_FNMATCH_IF([STANDARD = GNU | POSIX], [CACHE_VAR], [IF-TRUE], [IF-FALSE]) # ------------------------------------------------------------------------- # If a STANDARD compliant fnmatch is found, run IF-TRUE, otherwise # IF-FALSE. Use CACHE_VAR. AC_DEFUN([_AC_FUNC_FNMATCH_IF], [AC_CACHE_CHECK( [for working $1 fnmatch], [$2], [dnl Some versions of Solaris, SCO, and the GNU C Library dnl have a broken or incompatible fnmatch. dnl So we run a test program. If we are cross-compiling, take no chance. dnl Thanks to John Oleynick, François Pinard, and Paul Eggert for this test. AC_RUN_IFELSE( [AC_LANG_PROGRAM( [[#include static int y (char const *pattern, char const *string, int flags) { return fnmatch (pattern, string, flags) == 0; } static int n (char const *pattern, char const *string, int flags) { return fnmatch (pattern, string, flags) == FNM_NOMATCH; } ]], [[char const *Apat = 'A' < '\\\\' ? "[A-\\\\\\\\]" : "[\\\\\\\\-A]"; char const *apat = 'a' < '\\\\' ? "[a-\\\\\\\\]" : "[\\\\\\\\-a]"; static char const A_1[] = { 'A' - 1, 0 }; static char const A01[] = { 'A' + 1, 0 }; static char const a_1[] = { 'a' - 1, 0 }; static char const a01[] = { 'a' + 1, 0 }; static char const bs_1[] = { '\\\\' - 1, 0 }; static char const bs01[] = { '\\\\' + 1, 0 }; return !(n ("a*", "", 0) && y ("a*", "abc", 0) && n ("d*/*1", "d/s/1", FNM_PATHNAME) && y ("a\\\\bc", "abc", 0) && n ("a\\\\bc", "abc", FNM_NOESCAPE) && y ("*x", ".x", 0) && n ("*x", ".x", FNM_PERIOD) && y (Apat, "\\\\", 0) && y (Apat, "A", 0) && y (apat, "\\\\", 0) && y (apat, "a", 0) && n (Apat, A_1, 0) == ('A' < '\\\\') && n (apat, a_1, 0) == ('a' < '\\\\') && y (Apat, A01, 0) == ('A' < '\\\\') && y (apat, a01, 0) == ('a' < '\\\\') && y (Apat, bs_1, 0) == ('A' < '\\\\') && y (apat, bs_1, 0) == ('a' < '\\\\') && n (Apat, bs01, 0) == ('A' < '\\\\') && n (apat, bs01, 0) == ('a' < '\\\\') && ]m4_if([$1], [GNU], [y ("xxXX", "xXxX", FNM_CASEFOLD) && y ("a++(x|yy)b", "a+xyyyyxb", FNM_EXTMATCH) && n ("d*/*1", "d/s/1", FNM_FILE_NAME) && y ("*", "x", FNM_FILE_NAME | FNM_LEADING_DIR) && y ("x*", "x/y/z", FNM_FILE_NAME | FNM_LEADING_DIR) && y ("*c*", "c/x", FNM_FILE_NAME | FNM_LEADING_DIR)], 1))[;]])], [$2=yes], [$2=no], [$2=cross])]) AS_IF([test $$2 = yes], [$3], [$4]) ])# _AC_FUNC_FNMATCH_IF # _AC_LIBOBJ_FNMATCH # ------------------ # Prepare the replacement of fnmatch. AC_DEFUN([_AC_LIBOBJ_FNMATCH], [AC_REQUIRE([AC_FUNC_ALLOCA])dnl AC_REQUIRE([AC_TYPE_MBSTATE_T])dnl AC_CHECK_DECLS([isblank], [], [], [#include ]) AC_CHECK_FUNCS_ONCE([btowc isblank iswctype mbsrtowcs mempcpy wmemchr wmemcpy wmempcpy]) AC_CHECK_HEADERS_ONCE([wctype.h]) AC_LIBOBJ([fnmatch]) FNMATCH_H=fnmatch.h ])# _AC_LIBOBJ_FNMATCH AC_DEFUN([gl_FUNC_FNMATCH_POSIX], [ FNMATCH_H= _AC_FUNC_FNMATCH_IF([POSIX], [ac_cv_func_fnmatch_posix], [rm -f lib/fnmatch.h], [_AC_LIBOBJ_FNMATCH]) if test $ac_cv_func_fnmatch_posix != yes; then dnl We must choose a different name for our function, since on ELF systems dnl a broken fnmatch() in libc.so would override our fnmatch() if it is dnl compiled into a shared library. AC_DEFINE([fnmatch], [posix_fnmatch], [Define to a replacement function name for fnmatch().]) fi AC_SUBST([FNMATCH_H]) ]) AC_DEFUN([gl_FUNC_FNMATCH_GNU], [ dnl Persuade glibc to declare FNM_CASEFOLD etc. AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) FNMATCH_H= _AC_FUNC_FNMATCH_IF([GNU], [ac_cv_func_fnmatch_gnu], [rm -f lib/fnmatch.h], [_AC_LIBOBJ_FNMATCH]) if test $ac_cv_func_fnmatch_gnu != yes; then dnl We must choose a different name for our function, since on ELF systems dnl a broken fnmatch() in libc.so would override our fnmatch() if it is dnl compiled into a shared library. AC_DEFINE([fnmatch], [gnu_fnmatch], [Define to a replacement function name for fnmatch().]) fi AC_SUBST([FNMATCH_H]) ]) gnuit-4.9.5/m4/xalloc.m40000644000175000017500000000105511146671376011661 00000000000000# xalloc.m4 serial 16 dnl Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_XALLOC], [ AC_LIBOBJ([xmalloc]) gl_PREREQ_XALLOC gl_PREREQ_XMALLOC ]) # Prerequisites of lib/xalloc.h. AC_DEFUN([gl_PREREQ_XALLOC], [ AC_REQUIRE([gl_INLINE]) : ]) # Prerequisites of lib/xmalloc.c. AC_DEFUN([gl_PREREQ_XMALLOC], [ : ]) gnuit-4.9.5/m4/include_next.m40000644000175000017500000001505711146671375013066 00000000000000# include_next.m4 serial 10 dnl Copyright (C) 2006-2008 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Paul Eggert and Derek Price. dnl Sets INCLUDE_NEXT and PRAGMA_SYSTEM_HEADER. dnl dnl INCLUDE_NEXT expands to 'include_next' if the compiler supports it, or to dnl 'include' otherwise. dnl dnl INCLUDE_NEXT_AS_FIRST_DIRECTIVE expands to 'include_next' if the compiler dnl supports it in the special case that it is the first include directive in dnl the given file, or to 'include' otherwise. dnl dnl PRAGMA_SYSTEM_HEADER can be used in files that contain #include_next, dnl so as to avoid GCC warnings when the gcc option -pedantic is used. dnl '#pragma GCC system_header' has the same effect as if the file was found dnl through the include search path specified with '-isystem' options (as dnl opposed to the search path specified with '-I' options). Namely, gcc dnl does not warn about some things, and on some systems (Solaris and Interix) dnl __STDC__ evaluates to 0 instead of to 1. The latter is an undesired side dnl effect; we are therefore careful to use 'defined __STDC__' or '1' instead dnl of plain '__STDC__'. AC_DEFUN([gl_INCLUDE_NEXT], [ AC_LANG_PREPROC_REQUIRE() AC_CACHE_CHECK([whether the preprocessor supports include_next], [gl_cv_have_include_next], [rm -rf conftestd1a conftestd1b conftestd2 mkdir conftestd1a conftestd1b conftestd2 dnl The include of is because IBM C 9.0 on AIX 6.1 supports dnl include_next when used as first preprocessor directive in a file, dnl but not when preceded by another include directive. Additionally, dnl with this same compiler, include_next is a no-op when used in a dnl header file that was included by specifying its absolute file name. dnl Despite these two bugs, include_next is used in the compiler's dnl . By virtue of the second bug, we need to use include_next dnl as well in this case. cat < conftestd1a/conftest.h #define DEFINED_IN_CONFTESTD1 #include_next #ifdef DEFINED_IN_CONFTESTD2 int foo; #else #error "include_next doesn't work" #endif EOF cat < conftestd1b/conftest.h #define DEFINED_IN_CONFTESTD1 #include #include_next #ifdef DEFINED_IN_CONFTESTD2 int foo; #else #error "include_next doesn't work" #endif EOF cat < conftestd2/conftest.h #ifndef DEFINED_IN_CONFTESTD1 #error "include_next test doesn't work" #endif #define DEFINED_IN_CONFTESTD2 EOF gl_save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2" AC_COMPILE_IFELSE([#include ], [gl_cv_have_include_next=yes], [CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2" AC_COMPILE_IFELSE([#include ], [gl_cv_have_include_next=buggy], [gl_cv_have_include_next=no]) ]) CPPFLAGS="$gl_save_CPPFLAGS" rm -rf conftestd1a conftestd1b conftestd2 ]) PRAGMA_SYSTEM_HEADER= if test $gl_cv_have_include_next = yes; then INCLUDE_NEXT=include_next INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next if test -n "$GCC"; then PRAGMA_SYSTEM_HEADER='#pragma GCC system_header' fi else if test $gl_cv_have_include_next = buggy; then INCLUDE_NEXT=include INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next else INCLUDE_NEXT=include INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include fi fi AC_SUBST([INCLUDE_NEXT]) AC_SUBST([INCLUDE_NEXT_AS_FIRST_DIRECTIVE]) AC_SUBST([PRAGMA_SYSTEM_HEADER]) ]) # gl_CHECK_NEXT_HEADERS(HEADER1 HEADER2 ...) # ------------------------------------------ # For each arg foo.h, if #include_next works, define NEXT_FOO_H to be # ''; otherwise define it to be # '"///usr/include/foo.h"', or whatever other absolute file name is suitable. # That way, a header file with the following line: # #@INCLUDE_NEXT@ @NEXT_FOO_H@ # behaves (after sed substitution) as if it contained # #include_next # even if the compiler does not support include_next. # The three "///" are to pacify Sun C 5.8, which otherwise would say # "warning: #include of /usr/include/... may be non-portable". # Use `""', not `<>', so that the /// cannot be confused with a C99 comment. # Note: This macro assumes that the header file is not empty after # preprocessing, i.e. it does not only define preprocessor macros but also # provides some type/enum definitions or function/variable declarations. AC_DEFUN([gl_CHECK_NEXT_HEADERS], [ AC_REQUIRE([gl_INCLUDE_NEXT]) AC_REQUIRE([AC_CANONICAL_HOST]) AC_CHECK_HEADERS_ONCE([$1]) m4_foreach_w([gl_HEADER_NAME], [$1], [AS_VAR_PUSHDEF([gl_next_header], [gl_cv_next_]m4_quote(m4_defn([gl_HEADER_NAME]))) if test $gl_cv_have_include_next = yes; then AS_VAR_SET([gl_next_header], ['<'gl_HEADER_NAME'>']) else AC_CACHE_CHECK( [absolute name of <]m4_quote(m4_defn([gl_HEADER_NAME]))[>], m4_quote(m4_defn([gl_next_header])), [AS_VAR_PUSHDEF([gl_header_exists], [ac_cv_header_]m4_quote(m4_defn([gl_HEADER_NAME]))) if test AS_VAR_GET(gl_header_exists) = yes; then AC_LANG_CONFTEST( [AC_LANG_SOURCE( [[#include <]]m4_dquote(m4_defn([gl_HEADER_NAME]))[[>]] )]) dnl AIX "xlc -E" and "cc -E" omit #line directives for header files dnl that contain only a #include of other header files and no dnl non-comment tokens of their own. This leads to a failure to dnl detect the absolute name of , , dnl and others. The workaround is to force preservation of comments dnl through option -C. This ensures all necessary #line directives dnl are present. GCC supports option -C as well. case "$host_os" in aix*) gl_absname_cpp="$ac_cpp -C" ;; *) gl_absname_cpp="$ac_cpp" ;; esac dnl eval is necessary to expand gl_absname_cpp. dnl Ultrix and Pyramid sh refuse to redirect output of eval, dnl so use subshell. AS_VAR_SET([gl_next_header], ['"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&AS_MESSAGE_LOG_FD | sed -n '\#/]m4_quote(m4_defn([gl_HEADER_NAME]))[#{ s#.*"\(.*/]m4_quote(m4_defn([gl_HEADER_NAME]))[\)".*#\1# s#^/[^/]#//&# p q }'`'"']) else AS_VAR_SET([gl_next_header], ['<'gl_HEADER_NAME'>']) fi AS_VAR_POPDEF([gl_header_exists])]) fi AC_SUBST( AS_TR_CPP([NEXT_]m4_quote(m4_defn([gl_HEADER_NAME]))), [AS_VAR_GET([gl_next_header])]) AS_VAR_POPDEF([gl_next_header])]) ]) gnuit-4.9.5/m4/stdbool.m40000644000175000017500000000723411146671376012052 00000000000000# Check for stdbool.h that conforms to C99. dnl Copyright (C) 2002-2006, 2009 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. # Prepare for substituting if it is not supported. AC_DEFUN([AM_STDBOOL_H], [ AC_REQUIRE([AC_HEADER_STDBOOL]) # Define two additional variables used in the Makefile substitution. if test "$ac_cv_header_stdbool_h" = yes; then STDBOOL_H='' else STDBOOL_H='stdbool.h' fi AC_SUBST([STDBOOL_H]) if test "$ac_cv_type__Bool" = yes; then HAVE__BOOL=1 else HAVE__BOOL=0 fi AC_SUBST([HAVE__BOOL]) ]) # AM_STDBOOL_H will be renamed to gl_STDBOOL_H in the future. AC_DEFUN([gl_STDBOOL_H], [AM_STDBOOL_H]) # This macro is only needed in autoconf <= 2.59. Newer versions of autoconf # have this macro built-in. AC_DEFUN([AC_HEADER_STDBOOL], [AC_CACHE_CHECK([for stdbool.h that conforms to C99], [ac_cv_header_stdbool_h], [AC_TRY_COMPILE( [ #include #ifndef bool "error: bool is not defined" #endif #ifndef false "error: false is not defined" #endif #if false "error: false is not 0" #endif #ifndef true "error: true is not defined" #endif #if true != 1 "error: true is not 1" #endif #ifndef __bool_true_false_are_defined "error: __bool_true_false_are_defined is not defined" #endif struct s { _Bool s: 1; _Bool t; } s; char a[true == 1 ? 1 : -1]; char b[false == 0 ? 1 : -1]; char c[__bool_true_false_are_defined == 1 ? 1 : -1]; char d[(bool) 0.5 == true ? 1 : -1]; bool e = &s; char f[(_Bool) 0.0 == false ? 1 : -1]; char g[true]; char h[sizeof (_Bool)]; char i[sizeof s.t]; enum { j = false, k = true, l = false * true, m = true * 256 }; _Bool n[m]; char o[sizeof n == m * sizeof n[0] ? 1 : -1]; char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1]; #if defined __xlc__ || defined __GNUC__ /* Catch a bug in IBM AIX xlc compiler version 6.0.0.0 reported by James Lemley on 2005-10-05; see http://lists.gnu.org/archive/html/bug-coreutils/2005-10/msg00086.html This test is not quite right, since xlc is allowed to reject this program, as the initializer for xlcbug is not one of the forms that C requires support for. However, doing the test right would require a run-time test, and that would make cross-compilation harder. Let us hope that IBM fixes the xlc bug, and also adds support for this kind of constant expression. In the meantime, this test will reject xlc, which is OK, since our stdbool.h substitute should suffice. We also test this with GCC, where it should work, to detect more quickly whether someone messes up the test in the future. */ char digs[] = "0123456789"; int xlcbug = 1 / (&(digs + 5)[-2 + (bool) 1] == &digs[4] ? 1 : -1); #endif /* Catch a bug in an HP-UX C compiler. See http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html */ _Bool q = true; _Bool *pq = &q; ], [ *pq |= q; *pq |= ! q; /* Refer to every declared value, to avoid compiler optimizations. */ return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l + !m + !n + !o + !p + !q + !pq); ], [ac_cv_header_stdbool_h=yes], [ac_cv_header_stdbool_h=no])]) AC_CHECK_TYPES([_Bool]) if test $ac_cv_header_stdbool_h = yes; then AC_DEFINE([HAVE_STDBOOL_H], [1], [Define to 1 if stdbool.h conforms to C99.]) fi]) gnuit-4.9.5/m4/malloc.m40000644000175000017500000000270511146671376011651 00000000000000# malloc.m4 serial 9 dnl Copyright (C) 2007, 2009 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. # gl_FUNC_MALLOC_POSIX # -------------------- # Test whether 'malloc' is POSIX compliant (sets errno to ENOMEM when it # fails), and replace malloc if it is not. AC_DEFUN([gl_FUNC_MALLOC_POSIX], [ AC_REQUIRE([gl_CHECK_MALLOC_POSIX]) if test $gl_cv_func_malloc_posix = yes; then HAVE_MALLOC_POSIX=1 AC_DEFINE([HAVE_MALLOC_POSIX], [1], [Define if the 'malloc' function is POSIX compliant.]) else AC_LIBOBJ([malloc]) HAVE_MALLOC_POSIX=0 fi AC_SUBST([HAVE_MALLOC_POSIX]) ]) # Test whether malloc, realloc, calloc are POSIX compliant, # Set gl_cv_func_malloc_posix to yes or no accordingly. AC_DEFUN([gl_CHECK_MALLOC_POSIX], [ AC_CACHE_CHECK([whether malloc, realloc, calloc are POSIX compliant], [gl_cv_func_malloc_posix], [ dnl It is too dangerous to try to allocate a large amount of memory: dnl some systems go to their knees when you do that. So assume that dnl all Unix implementations of the function are POSIX compliant. AC_TRY_COMPILE([], [#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ choke me #endif ], [gl_cv_func_malloc_posix=yes], [gl_cv_func_malloc_posix=no]) ]) ]) gnuit-4.9.5/m4/multiarch.m40000644000175000017500000000434011146671376012367 00000000000000# multiarch.m4 serial 4 dnl Copyright (C) 2008, 2009 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. # Determine whether the compiler is or may be producing universal binaries. # # On MacOS X 10.5 and later systems, the user can create libraries and # executables that work on multiple system types--known as "fat" or # "universal" binaries--by specifying multiple '-arch' options to the # compiler but only a single '-arch' option to the preprocessor. Like # this: # # ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ # CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ # CPP="gcc -E" CXXCPP="g++ -E" # # Detect this situation and set the macro AA_APPLE_UNIVERSAL_BUILD at the # beginning of config.h and set APPLE_UNIVERSAL_BUILD accordingly. dnl This macro must pass through AC_REQUIRE (never directly invoke it). AC_DEFUN_ONCE([gl_MULTIARCH], [ dnl Code similar to autoconf-2.63 AC_C_BIGENDIAN. gl_cv_c_multiarch=no AC_COMPILE_IFELSE( [AC_LANG_SOURCE( [[#ifndef __APPLE_CC__ not a universal capable compiler #endif typedef int dummy; ]])], [ dnl Check for potential -arch flags. It is not universal unless dnl there are at least two -arch flags with different values. arch= prev= for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do if test -n "$prev"; then case $word in i?86 | x86_64 | ppc | ppc64) if test -z "$arch" || test "$arch" = "$word"; then arch="$word" else gl_cv_c_multiarch=yes fi ;; esac prev= else if test "x$word" = "x-arch"; then prev=arch fi fi done ]) if test $gl_cv_c_multiarch = yes; then AC_DEFINE([AA_APPLE_UNIVERSAL_BUILD], [1], [Define if the compiler is building for multiple architectures of Apple platforms at once.]) APPLE_UNIVERSAL_BUILD=1 else APPLE_UNIVERSAL_BUILD=0 fi AC_SUBST([APPLE_UNIVERSAL_BUILD]) ]) gnuit-4.9.5/m4/mbsinit.m40000644000175000017500000000140511146671376012043 00000000000000# mbsinit.m4 serial 3 dnl Copyright (C) 2008 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_MBSINIT], [ AC_REQUIRE([gl_WCHAR_H_DEFAULTS]) AC_REQUIRE([AC_TYPE_MBSTATE_T]) gl_MBSTATE_T_BROKEN if test $REPLACE_MBSTATE_T = 1; then REPLACE_MBSINIT=1 fi AC_CHECK_FUNCS_ONCE([mbsinit]) if test $ac_cv_func_mbsinit = no; then HAVE_MBSINIT=0 fi if test $HAVE_MBSINIT = 0 || test $REPLACE_MBSINIT = 1; then gl_REPLACE_WCHAR_H AC_LIBOBJ([mbsinit]) gl_PREREQ_MBSINIT fi ]) # Prerequisites of lib/mbsinit.c. AC_DEFUN([gl_PREREQ_MBSINIT], [ : ]) gnuit-4.9.5/m4/locale-fr.m40000644000175000017500000001642611146671376012253 00000000000000# locale-fr.m4 serial 11 dnl Copyright (C) 2003, 2005-2009 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Bruno Haible. dnl Determine the name of a french locale with traditional encoding. AC_DEFUN([gt_LOCALE_FR], [ AC_REQUIRE([AC_CANONICAL_HOST]) AC_REQUIRE([AM_LANGINFO_CODESET]) AC_CACHE_CHECK([for a traditional french locale], [gt_cv_locale_fr], [ AC_LANG_CONFTEST([AC_LANG_SOURCE([ changequote(,)dnl #include #include #if HAVE_LANGINFO_CODESET # include #endif #include #include struct tm t; char buf[16]; int main () { /* Check whether the given locale name is recognized by the system. */ if (setlocale (LC_ALL, "") == NULL) return 1; /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) is empty, and the behaviour of Tcl 8.4 in this locale is not useful. On OpenBSD 4.0, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "646". In this situation, some unit tests fail. */ #if HAVE_LANGINFO_CODESET { const char *cs = nl_langinfo (CODESET); if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0) return 1; } #endif #ifdef __CYGWIN__ /* On Cygwin, avoid locale names without encoding suffix, because the locale_charset() function relies on the encoding suffix. Note that LC_ALL is set on the command line. */ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; #endif /* Check whether in the abbreviation of the second month, the second character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only one byte long. This excludes the UTF-8 encoding. */ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1; /* Check whether the decimal separator is a comma. On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point are nl_langinfo(RADIXCHAR) are both ".". */ if (localeconv () ->decimal_point[0] != ',') return 1; return 0; } changequote([,])dnl ])]) if AC_TRY_EVAL([ac_link]) && test -s conftest$ac_exeext; then # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the # configure script would override the LC_ALL setting. Likewise for # LC_CTYPE, which is also set at the beginning of the configure script. # Test for the usual locale name. if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr=fr_FR else # Test for the locale name with explicit encoding suffix. if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr=fr_FR.ISO-8859-1 else # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name. if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr=fr_FR.ISO8859-1 else # Test for the HP-UX locale name. if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr=fr_FR.iso88591 else # Test for the Solaris 7 locale name. if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr=fr else # None found. gt_cv_locale_fr=none fi fi fi fi fi fi rm -fr conftest* ]) LOCALE_FR=$gt_cv_locale_fr AC_SUBST([LOCALE_FR]) ]) dnl Determine the name of a french locale with UTF-8 encoding. AC_DEFUN([gt_LOCALE_FR_UTF8], [ AC_REQUIRE([AM_LANGINFO_CODESET]) AC_CACHE_CHECK([for a french Unicode locale], [gt_cv_locale_fr_utf8], [ AC_LANG_CONFTEST([AC_LANG_SOURCE([ changequote(,)dnl #include #include #if HAVE_LANGINFO_CODESET # include #endif #include #include struct tm t; char buf[16]; int main () { /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl imitates locale dependent behaviour by looking at the environment variables, and all locales use the UTF-8 encoding. */ #if !(defined __BEOS__ || defined __HAIKU__) /* Check whether the given locale name is recognized by the system. */ if (setlocale (LC_ALL, "") == NULL) return 1; /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) is empty, and the behaviour of Tcl 8.4 in this locale is not useful. On OpenBSD 4.0, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "646". In this situation, some unit tests fail. */ # if HAVE_LANGINFO_CODESET { const char *cs = nl_langinfo (CODESET); if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0) return 1; } # endif # ifdef __CYGWIN__ /* On Cygwin, avoid locale names without encoding suffix, because the locale_charset() function relies on the encoding suffix. Note that LC_ALL is set on the command line. */ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; # endif /* Check whether in the abbreviation of the second month, the second character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is two bytes long, with UTF-8 encoding. */ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; if (strftime (buf, sizeof (buf), "%b", &t) < 4 || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v') return 1; #endif /* Check whether the decimal separator is a comma. On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point are nl_langinfo(RADIXCHAR) are both ".". */ if (localeconv () ->decimal_point[0] != ',') return 1; return 0; } changequote([,])dnl ])]) if AC_TRY_EVAL([ac_link]) && test -s conftest$ac_exeext; then # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the # configure script would override the LC_ALL setting. Likewise for # LC_CTYPE, which is also set at the beginning of the configure script. # Test for the usual locale name. if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr_utf8=fr_FR else # Test for the locale name with explicit encoding suffix. if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr_utf8=fr_FR.UTF-8 else # Test for the Solaris 7 locale name. if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr_utf8=fr.UTF-8 else # None found. gt_cv_locale_fr_utf8=none fi fi fi fi rm -fr conftest* ]) LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8 AC_SUBST([LOCALE_FR_UTF8]) ]) gnuit-4.9.5/m4/mbsstr.m40000644000175000017500000000065611146671376011717 00000000000000# mbsstr.m4 serial 2 dnl Copyright (C) 2007-2008 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_MBSSTR], [ gl_PREREQ_MBSSTR ]) # Prerequisites of lib/mbsstr.c. AC_DEFUN([gl_PREREQ_MBSSTR], [ AC_REQUIRE([AC_FUNC_MBRTOWC]) : ]) gnuit-4.9.5/m4/gnulib-comp.m40000644000175000017500000003152311146671375012615 00000000000000# DO NOT EDIT! GENERATED AUTOMATICALLY! # Copyright (C) 2002-2009 Free Software Foundation, Inc. # # This file is free software, distributed under the terms of the GNU # General Public License. As a special exception to the GNU General # Public License, this file may be distributed as part of a program # that contains a configuration script generated by Autoconf, under # the same distribution terms as the rest of that program. # # Generated by gnulib-tool. # # This file represents the compiled summary of the specification in # gnulib-cache.m4. It lists the computed macro invocations that need # to be invoked from configure.ac. # In projects using CVS, this file can be treated like other built files. # This macro should be invoked from ./configure.ac, in the section # "Checks for programs", right after AC_PROG_CC, and certainly before # any checks for libraries, header files, types and library functions. AC_DEFUN([gl_EARLY], [ m4_pattern_forbid([^gl_[A-Z]])dnl the gnulib macro namespace m4_pattern_allow([^gl_ES$])dnl a valid locale name m4_pattern_allow([^gl_LIBOBJS$])dnl a variable m4_pattern_allow([^gl_LTLIBOBJS$])dnl a variable AC_REQUIRE([AC_PROG_RANLIB]) AC_REQUIRE([AM_PROG_CC_C_O]) AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) ]) # This macro should be invoked from ./configure.ac, in the section # "Check for header files, types and library functions". AC_DEFUN([gl_INIT], [ AM_CONDITIONAL([GL_COND_LIBTOOL], [false]) gl_cond_libtool=false gl_libdeps= gl_ltlibdeps= m4_pushdef([AC_LIBOBJ], m4_defn([gl_LIBOBJ])) m4_pushdef([AC_REPLACE_FUNCS], m4_defn([gl_REPLACE_FUNCS])) m4_pushdef([AC_LIBSOURCES], m4_defn([gl_LIBSOURCES])) m4_pushdef([gl_LIBSOURCES_LIST], []) m4_pushdef([gl_LIBSOURCES_DIR], []) gl_COMMON gl_source_base='lib' gl_FUNC_ALLOCA gl_ARGMATCH gl_CLOCK_TIME gl_DIRNAME gl_DOUBLE_SLASH_ROOT AC_REQUIRE([gl_HEADER_ERRNO_H]) gl_ERROR m4_ifdef([AM_XGETTEXT_OPTION], [AM_XGETTEXT_OPTION([--flag=error:3:c-format]) AM_XGETTEXT_OPTION([--flag=error_at_line:5:c-format])]) gl_EXITFAIL gl_FCNTL_H AC_C_FLEXIBLE_ARRAY_MEMBER # No macro. You should also use one of fnmatch-posix or fnmatch-gnu. gl_FUNC_FNMATCH_GNU gl_FSUSAGE gl_GETOPT AC_SUBST([LIBINTL]) AC_SUBST([LTLIBINTL]) gl_GETTIME gl_FUNC_GETTIMEOFDAY gl_HUMAN gl_IDCACHE gl_INLINE gl_INTTYPES_H gl_LOCALCHARSET LOCALCHARSET_TESTS_ENVIRONMENT="CHARSETALIASDIR=\"\$(top_builddir)/$gl_source_base\"" AC_SUBST([LOCALCHARSET_TESTS_ENVIRONMENT]) gl_FUNC_LSTAT gl_SYS_STAT_MODULE_INDICATOR([lstat]) gl_FUNC_MALLOC_POSIX gl_STDLIB_MODULE_INDICATOR([malloc-posix]) gl_MALLOCA gl_MBCHAR gl_FUNC_MBRTOWC gl_WCHAR_MODULE_INDICATOR([mbrtowc]) gl_FUNC_MBSINIT gl_WCHAR_MODULE_INDICATOR([mbsinit]) gl_FUNC_MBSLEN gl_STRING_MODULE_INDICATOR([mbslen]) gl_FUNC_MBSSTR gl_STRING_MODULE_INDICATOR([mbsstr]) gl_MBITER gl_FUNC_MEMMOVE gl_FUNC_MKSTEMP gl_STDLIB_MODULE_INDICATOR([mkstemp]) AC_REQUIRE([gl_MULTIARCH]) gl_FUNC_NANOSLEEP gl_FUNC_OPEN gl_MODULE_INDICATOR([open]) gl_FCNTL_MODULE_INDICATOR([open]) gl_FUNC_PUTENV gl_STDLIB_MODULE_INDICATOR([putenv]) gl_QUOTE gl_QUOTEARG gl_FUNC_READLINK gl_UNISTD_MODULE_INDICATOR([readlink]) gl_FUNC_RENAME gl_SAFE_READ gl_SAFE_WRITE gl_SIGACTION gl_SIGNAL_MODULE_INDICATOR([sigaction]) gl_SIGNAL_H gl_SIGNALBLOCKING gl_SIGNAL_MODULE_INDICATOR([sigprocmask]) gt_TYPE_SSIZE_T AM_STDBOOL_H gl_STDINT_H gl_STDLIB_H gl_STRCASE gl_FUNC_STRCASESTR gl_FUNC_STRCASESTR_SIMPLE gl_STRING_MODULE_INDICATOR([strcasestr]) gl_FUNC_STRERROR gl_STRING_MODULE_INDICATOR([strerror]) gl_HEADER_STRING_H gl_HEADER_STRINGS_H gl_FUNC_STRNDUP gl_STRING_MODULE_INDICATOR([strndup]) gl_FUNC_STRNLEN gl_STRING_MODULE_INDICATOR([strnlen]) gl_FUNC_STRTOIMAX gl_INTTYPES_MODULE_INDICATOR([strtoimax]) gl_FUNC_STRTOL gl_FUNC_STRTOLL gl_STDLIB_MODULE_INDICATOR([strtoll]) gl_FUNC_STRTOUL gl_FUNC_STRTOULL gl_STDLIB_MODULE_INDICATOR([strtoull]) gl_FUNC_STRTOUMAX gl_INTTYPES_MODULE_INDICATOR([strtoumax]) gl_HEADER_SYS_SELECT AC_PROG_MKDIR_P gl_HEADER_SYS_SOCKET gl_MODULE_INDICATOR([sys_socket]) AC_PROG_MKDIR_P gl_HEADER_SYS_STAT_H AC_PROG_MKDIR_P gl_HEADER_SYS_TIME_H AC_PROG_MKDIR_P gl_FUNC_GEN_TEMPNAME gl_HEADER_TIME_H gl_TIMESPEC gl_UNISTD_H gl_FUNC_UTIME gl_WCHAR_H gl_WCTYPE_H gl_FUNC_WCWIDTH gl_WCHAR_MODULE_INDICATOR([wcwidth]) gl_FUNC_WRITE gl_UNISTD_MODULE_INDICATOR([write]) gl_XALLOC gl_XSTRNDUP gl_XSTRTOL m4_ifval(gl_LIBSOURCES_LIST, [ m4_syscmd([test ! -d ]m4_defn([gl_LIBSOURCES_DIR])[ || for gl_file in ]gl_LIBSOURCES_LIST[ ; do if test ! -r ]m4_defn([gl_LIBSOURCES_DIR])[/$gl_file ; then echo "missing file ]m4_defn([gl_LIBSOURCES_DIR])[/$gl_file" >&2 exit 1 fi done])dnl m4_if(m4_sysval, [0], [], [AC_FATAL([expected source file, required through AC_LIBSOURCES, not found])]) ]) m4_popdef([gl_LIBSOURCES_DIR]) m4_popdef([gl_LIBSOURCES_LIST]) m4_popdef([AC_LIBSOURCES]) m4_popdef([AC_REPLACE_FUNCS]) m4_popdef([AC_LIBOBJ]) AC_CONFIG_COMMANDS_PRE([ gl_libobjs= gl_ltlibobjs= if test -n "$gl_LIBOBJS"; then # Remove the extension. sed_drop_objext='s/\.o$//;s/\.obj$//' for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed "$sed_drop_objext" | sort | uniq`; do gl_libobjs="$gl_libobjs $i.$ac_objext" gl_ltlibobjs="$gl_ltlibobjs $i.lo" done fi AC_SUBST([gl_LIBOBJS], [$gl_libobjs]) AC_SUBST([gl_LTLIBOBJS], [$gl_ltlibobjs]) ]) gltests_libdeps= gltests_ltlibdeps= m4_pushdef([AC_LIBOBJ], m4_defn([gltests_LIBOBJ])) m4_pushdef([AC_REPLACE_FUNCS], m4_defn([gltests_REPLACE_FUNCS])) m4_pushdef([AC_LIBSOURCES], m4_defn([gltests_LIBSOURCES])) m4_pushdef([gltests_LIBSOURCES_LIST], []) m4_pushdef([gltests_LIBSOURCES_DIR], []) gl_COMMON gl_source_base='tests' m4_ifval(gltests_LIBSOURCES_LIST, [ m4_syscmd([test ! -d ]m4_defn([gltests_LIBSOURCES_DIR])[ || for gl_file in ]gltests_LIBSOURCES_LIST[ ; do if test ! -r ]m4_defn([gltests_LIBSOURCES_DIR])[/$gl_file ; then echo "missing file ]m4_defn([gltests_LIBSOURCES_DIR])[/$gl_file" >&2 exit 1 fi done])dnl m4_if(m4_sysval, [0], [], [AC_FATAL([expected source file, required through AC_LIBSOURCES, not found])]) ]) m4_popdef([gltests_LIBSOURCES_DIR]) m4_popdef([gltests_LIBSOURCES_LIST]) m4_popdef([AC_LIBSOURCES]) m4_popdef([AC_REPLACE_FUNCS]) m4_popdef([AC_LIBOBJ]) AC_CONFIG_COMMANDS_PRE([ gltests_libobjs= gltests_ltlibobjs= if test -n "$gltests_LIBOBJS"; then # Remove the extension. sed_drop_objext='s/\.o$//;s/\.obj$//' for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed "$sed_drop_objext" | sort | uniq`; do gltests_libobjs="$gltests_libobjs $i.$ac_objext" gltests_ltlibobjs="$gltests_ltlibobjs $i.lo" done fi AC_SUBST([gltests_LIBOBJS], [$gltests_libobjs]) AC_SUBST([gltests_LTLIBOBJS], [$gltests_ltlibobjs]) ]) LIBGNU_LIBDEPS="$gl_libdeps" AC_SUBST([LIBGNU_LIBDEPS]) LIBGNU_LTLIBDEPS="$gl_ltlibdeps" AC_SUBST([LIBGNU_LTLIBDEPS]) ]) # Like AC_LIBOBJ, except that the module name goes # into gl_LIBOBJS instead of into LIBOBJS. AC_DEFUN([gl_LIBOBJ], [ AS_LITERAL_IF([$1], [gl_LIBSOURCES([$1.c])])dnl gl_LIBOBJS="$gl_LIBOBJS $1.$ac_objext" ]) # Like AC_REPLACE_FUNCS, except that the module name goes # into gl_LIBOBJS instead of into LIBOBJS. AC_DEFUN([gl_REPLACE_FUNCS], [ m4_foreach_w([gl_NAME], [$1], [AC_LIBSOURCES(gl_NAME[.c])])dnl AC_CHECK_FUNCS([$1], , [gl_LIBOBJ($ac_func)]) ]) # Like AC_LIBSOURCES, except the directory where the source file is # expected is derived from the gnulib-tool parameterization, # and alloca is special cased (for the alloca-opt module). # We could also entirely rely on EXTRA_lib..._SOURCES. AC_DEFUN([gl_LIBSOURCES], [ m4_foreach([_gl_NAME], [$1], [ m4_if(_gl_NAME, [alloca.c], [], [ m4_define([gl_LIBSOURCES_DIR], [lib]) m4_append([gl_LIBSOURCES_LIST], _gl_NAME, [ ]) ]) ]) ]) # Like AC_LIBOBJ, except that the module name goes # into gltests_LIBOBJS instead of into LIBOBJS. AC_DEFUN([gltests_LIBOBJ], [ AS_LITERAL_IF([$1], [gltests_LIBSOURCES([$1.c])])dnl gltests_LIBOBJS="$gltests_LIBOBJS $1.$ac_objext" ]) # Like AC_REPLACE_FUNCS, except that the module name goes # into gltests_LIBOBJS instead of into LIBOBJS. AC_DEFUN([gltests_REPLACE_FUNCS], [ m4_foreach_w([gl_NAME], [$1], [AC_LIBSOURCES(gl_NAME[.c])])dnl AC_CHECK_FUNCS([$1], , [gltests_LIBOBJ($ac_func)]) ]) # Like AC_LIBSOURCES, except the directory where the source file is # expected is derived from the gnulib-tool parameterization, # and alloca is special cased (for the alloca-opt module). # We could also entirely rely on EXTRA_lib..._SOURCES. AC_DEFUN([gltests_LIBSOURCES], [ m4_foreach([_gl_NAME], [$1], [ m4_if(_gl_NAME, [alloca.c], [], [ m4_define([gltests_LIBSOURCES_DIR], [tests]) m4_append([gltests_LIBSOURCES_LIST], _gl_NAME, [ ]) ]) ]) ]) # This macro records the list of files which have been installed by # gnulib-tool and may be removed by future gnulib-tool invocations. AC_DEFUN([gl_FILE_LIST], [ build-aux/link-warning.h lib/alloca.c lib/alloca.in.h lib/argmatch.c lib/argmatch.h lib/basename.c lib/config.charset lib/dirname.c lib/dirname.h lib/errno.in.h lib/error.c lib/error.h lib/exitfail.c lib/exitfail.h lib/fcntl.in.h lib/fnmatch.c lib/fnmatch.in.h lib/fnmatch_loop.c lib/fsusage.c lib/fsusage.h lib/full-read.c lib/full-read.h lib/full-write.c lib/full-write.h lib/getopt.c lib/getopt.in.h lib/getopt1.c lib/getopt_int.h lib/gettext.h lib/gettime.c lib/gettimeofday.c lib/human.c lib/human.h lib/idcache.c lib/idcache.h lib/intprops.h lib/inttypes.in.h lib/localcharset.c lib/localcharset.h lib/lstat.c lib/malloc.c lib/malloca.c lib/malloca.h lib/malloca.valgrind lib/mbchar.c lib/mbchar.h lib/mbrtowc.c lib/mbsinit.c lib/mbslen.c lib/mbsstr.c lib/mbuiter.h lib/memmove.c lib/mkstemp.c lib/nanosleep.c lib/open.c lib/putenv.c lib/quote.c lib/quote.h lib/quotearg.c lib/quotearg.h lib/readlink.c lib/ref-add.sin lib/ref-del.sin lib/rename.c lib/safe-read.c lib/safe-read.h lib/safe-write.c lib/safe-write.h lib/sig-handler.h lib/sigaction.c lib/signal.in.h lib/sigprocmask.c lib/stdbool.in.h lib/stdint.in.h lib/stdlib.in.h lib/str-kmp.h lib/str-two-way.h lib/strcasecmp.c lib/strcasestr.c lib/streq.h lib/strerror.c lib/string.in.h lib/strings.in.h lib/stripslash.c lib/strncasecmp.c lib/strndup.c lib/strnlen.c lib/strnlen1.c lib/strnlen1.h lib/strtoimax.c lib/strtol.c lib/strtoll.c lib/strtoul.c lib/strtoull.c lib/strtoumax.c lib/sys_select.in.h lib/sys_socket.in.h lib/sys_stat.in.h lib/sys_time.in.h lib/tempname.c lib/tempname.h lib/time.in.h lib/timespec.h lib/unistd.in.h lib/unitypes.h lib/uniwidth.h lib/uniwidth/cjk.h lib/uniwidth/width.c lib/utime.c lib/verify.h lib/wchar.in.h lib/wctype.in.h lib/wcwidth.c lib/write.c lib/xalloc-die.c lib/xalloc.h lib/xmalloc.c lib/xstrndup.c lib/xstrndup.h lib/xstrtol-error.c lib/xstrtol.c lib/xstrtol.h lib/xstrtoul.c lib/xstrtoumax.c m4/00gnulib.m4 m4/alloca.m4 m4/argmatch.m4 m4/clock_time.m4 m4/codeset.m4 m4/dirname.m4 m4/dos.m4 m4/double-slash-root.m4 m4/eealloc.m4 m4/errno_h.m4 m4/error.m4 m4/exitfail.m4 m4/extensions.m4 m4/fcntl_h.m4 m4/flexmember.m4 m4/fnmatch.m4 m4/fsusage.m4 m4/getopt.m4 m4/gettime.m4 m4/gettimeofday.m4 m4/glibc21.m4 m4/gnulib-common.m4 m4/human.m4 m4/idcache.m4 m4/include_next.m4 m4/inline.m4 m4/inttypes-pri.m4 m4/inttypes.m4 m4/localcharset.m4 m4/locale-fr.m4 m4/locale-ja.m4 m4/locale-zh.m4 m4/longlong.m4 m4/lstat.m4 m4/malloc.m4 m4/malloca.m4 m4/mbchar.m4 m4/mbiter.m4 m4/mbrtowc.m4 m4/mbsinit.m4 m4/mbslen.m4 m4/mbsstr.m4 m4/mbstate_t.m4 m4/memmove.m4 m4/mkstemp.m4 m4/multiarch.m4 m4/nanosleep.m4 m4/onceonly.m4 m4/open.m4 m4/putenv.m4 m4/quote.m4 m4/quotearg.m4 m4/readlink.m4 m4/rename.m4 m4/safe-read.m4 m4/safe-write.m4 m4/sigaction.m4 m4/signal_h.m4 m4/signalblocking.m4 m4/sockpfaf.m4 m4/ssize_t.m4 m4/stdbool.m4 m4/stdint.m4 m4/stdlib_h.m4 m4/strcase.m4 m4/strcasestr.m4 m4/strerror.m4 m4/string_h.m4 m4/strings_h.m4 m4/strndup.m4 m4/strnlen.m4 m4/strtoimax.m4 m4/strtol.m4 m4/strtoll.m4 m4/strtoul.m4 m4/strtoull.m4 m4/strtoumax.m4 m4/sys_select_h.m4 m4/sys_socket_h.m4 m4/sys_stat_h.m4 m4/sys_time_h.m4 m4/tempname.m4 m4/time_h.m4 m4/timespec.m4 m4/unistd_h.m4 m4/utimbuf.m4 m4/utime.m4 m4/utimes-null.m4 m4/utimes.m4 m4/wchar.m4 m4/wchar_t.m4 m4/wctype.m4 m4/wcwidth.m4 m4/wint_t.m4 m4/write.m4 m4/xalloc.m4 m4/xstrndup.m4 m4/xstrtol.m4 ]) gnuit-4.9.5/m4/strcase.m40000644000175000017500000000201311146671376012036 00000000000000# strcase.m4 serial 10 dnl Copyright (C) 2002, 2005-2009 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_STRCASE], [ gl_FUNC_STRCASECMP gl_FUNC_STRNCASECMP ]) AC_DEFUN([gl_FUNC_STRCASECMP], [ AC_REQUIRE([gl_HEADER_STRINGS_H_DEFAULTS]) AC_REPLACE_FUNCS([strcasecmp]) if test $ac_cv_func_strcasecmp = no; then HAVE_STRCASECMP=0 gl_PREREQ_STRCASECMP fi ]) AC_DEFUN([gl_FUNC_STRNCASECMP], [ AC_REQUIRE([gl_HEADER_STRINGS_H_DEFAULTS]) AC_REPLACE_FUNCS([strncasecmp]) if test $ac_cv_func_strncasecmp = no; then gl_PREREQ_STRNCASECMP fi AC_CHECK_DECLS([strncasecmp]) if test $ac_cv_have_decl_strncasecmp = no; then HAVE_DECL_STRNCASECMP=0 fi ]) # Prerequisites of lib/strcasecmp.c. AC_DEFUN([gl_PREREQ_STRCASECMP], [ : ]) # Prerequisites of lib/strncasecmp.c. AC_DEFUN([gl_PREREQ_STRNCASECMP], [ : ]) gnuit-4.9.5/m4/strtoull.m40000644000175000017500000000144511146671376012272 00000000000000# strtoull.m4 serial 6 dnl Copyright (C) 2002, 2004, 2006, 2008, 2009 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_STRTOULL], [ AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) dnl We don't need (and can't compile) the replacement strtoull dnl unless the type 'unsigned long long int' exists. AC_REQUIRE([AC_TYPE_UNSIGNED_LONG_LONG_INT]) if test "$ac_cv_type_unsigned_long_long_int" = yes; then AC_REPLACE_FUNCS([strtoull]) if test $ac_cv_func_strtoull = no; then HAVE_STRTOULL=0 gl_PREREQ_STRTOULL fi fi ]) # Prerequisites of lib/strtoull.c. AC_DEFUN([gl_PREREQ_STRTOULL], [ : ]) gnuit-4.9.5/m4/safe-write.m40000644000175000017500000000072111146671376012444 00000000000000# safe-write.m4 serial 3 dnl Copyright (C) 2002, 2005, 2006 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_SAFE_WRITE], [ AC_LIBOBJ([safe-write]) gl_PREREQ_SAFE_WRITE ]) # Prerequisites of lib/safe-write.c. AC_DEFUN([gl_PREREQ_SAFE_WRITE], [ gl_PREREQ_SAFE_READ ]) gnuit-4.9.5/m4/time_h.m40000644000175000017500000000500011146671376011636 00000000000000# Configure a more-standard replacement for . # Copyright (C) 2000, 2001, 2003, 2004, 2005, 2006, 2007 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. # Written by Paul Eggert and Jim Meyering. AC_DEFUN([gl_HEADER_TIME_H], [ dnl Use AC_REQUIRE here, so that the default behavior below is expanded dnl once only, before all statements that occur in other macros. AC_REQUIRE([gl_HEADER_TIME_H_BODY]) ]) AC_DEFUN([gl_HEADER_TIME_H_BODY], [ AC_REQUIRE([AC_C_RESTRICT]) AC_REQUIRE([gl_HEADER_TIME_H_DEFAULTS]) gl_CHECK_NEXT_HEADERS([time.h]) AC_REQUIRE([gl_CHECK_TYPE_STRUCT_TIMESPEC]) ]) AC_DEFUN([gl_HEADER_TIME_H_DEFAULTS], [ dnl If another module says to replace or to not replace, do that. dnl Otherwise, replace only if someone compiles with -DGNULIB_PORTCHECK; dnl this lets maintainers check for portability. REPLACE_LOCALTIME_R=GNULIB_PORTCHECK; AC_SUBST([REPLACE_LOCALTIME_R]) REPLACE_NANOSLEEP=GNULIB_PORTCHECK; AC_SUBST([REPLACE_NANOSLEEP]) REPLACE_STRPTIME=GNULIB_PORTCHECK; AC_SUBST([REPLACE_STRPTIME]) REPLACE_TIMEGM=GNULIB_PORTCHECK; AC_SUBST([REPLACE_TIMEGM]) ]) dnl Define HAVE_STRUCT_TIMESPEC if `struct timespec' is declared dnl in time.h or sys/time.h. AC_DEFUN([gl_CHECK_TYPE_STRUCT_TIMESPEC], [ AC_CHECK_HEADERS_ONCE([sys/time.h]) AC_CACHE_CHECK([for struct timespec in ], [gl_cv_sys_struct_timespec_in_time_h], [AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [[#include ]], [[static struct timespec x; x.tv_sec = x.tv_nsec;]])], [gl_cv_sys_struct_timespec_in_time_h=yes], [gl_cv_sys_struct_timespec_in_time_h=no])]) TIME_H_DEFINES_STRUCT_TIMESPEC=0 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0 if test $gl_cv_sys_struct_timespec_in_time_h = yes; then TIME_H_DEFINES_STRUCT_TIMESPEC=1 else AC_CACHE_CHECK([for struct timespec in ], [gl_cv_sys_struct_timespec_in_sys_time_h], [AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [[#include ]], [[static struct timespec x; x.tv_sec = x.tv_nsec;]])], [gl_cv_sys_struct_timespec_in_sys_time_h=yes], [gl_cv_sys_struct_timespec_in_sys_time_h=no])]) if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1 fi fi AC_SUBST([TIME_H_DEFINES_STRUCT_TIMESPEC]) AC_SUBST([SYS_TIME_H_DEFINES_STRUCT_TIMESPEC]) ]) gnuit-4.9.5/m4/alloca.m40000644000175000017500000000306511146671375011634 00000000000000# alloca.m4 serial 9 dnl Copyright (C) 2002-2004, 2006, 2007, 2009 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_ALLOCA], [ dnl Work around a bug of AC_EGREP_CPP in autoconf-2.57. AC_REQUIRE([AC_PROG_CPP]) AC_REQUIRE([AC_PROG_EGREP]) AC_REQUIRE([AC_FUNC_ALLOCA]) if test $ac_cv_func_alloca_works = no; then gl_PREREQ_ALLOCA fi # Define an additional variable used in the Makefile substitution. if test $ac_cv_working_alloca_h = yes; then AC_CACHE_CHECK([for alloca as a compiler built-in], [gl_cv_rpl_alloca], [ AC_EGREP_CPP([Need own alloca], [ #if defined __GNUC__ || defined _AIX || defined _MSC_VER Need own alloca #endif ], [gl_cv_rpl_alloca=yes], [gl_cv_rpl_alloca=no]) ]) if test $gl_cv_rpl_alloca = yes; then dnl OK, alloca can be implemented through a compiler built-in. AC_DEFINE([HAVE_ALLOCA], [1], [Define to 1 if you have 'alloca' after including , a header that may be supplied by this distribution.]) ALLOCA_H=alloca.h else dnl alloca exists as a library function, i.e. it is slow and probably dnl a memory leak. Don't define HAVE_ALLOCA in this case. ALLOCA_H= fi else ALLOCA_H=alloca.h fi AC_SUBST([ALLOCA_H]) ]) # Prerequisites of lib/alloca.c. # STACK_DIRECTION is already handled by AC_FUNC_ALLOCA. AC_DEFUN([gl_PREREQ_ALLOCA], [:]) gnuit-4.9.5/m4/utimbuf.m40000644000175000017500000000227311146671376012055 00000000000000# serial 9 # Copyright (C) 1998-2001, 2003-2004, 2007, 2009 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. dnl From Jim Meyering dnl Define HAVE_STRUCT_UTIMBUF if `struct utimbuf' is declared -- dnl usually in . dnl Some systems have utime.h but don't declare the struct anywhere. AC_DEFUN([gl_CHECK_TYPE_STRUCT_UTIMBUF], [ AC_CHECK_HEADERS_ONCE([sys/time.h utime.h]) AC_CACHE_CHECK([for struct utimbuf], [gl_cv_sys_struct_utimbuf], [AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [[#if HAVE_SYS_TIME_H #include #endif #include #ifdef HAVE_UTIME_H #include #endif ]], [[static struct utimbuf x; x.actime = x.modtime;]])], [gl_cv_sys_struct_utimbuf=yes], [gl_cv_sys_struct_utimbuf=no])]) if test $gl_cv_sys_struct_utimbuf = yes; then AC_DEFINE([HAVE_STRUCT_UTIMBUF], [1], [Define if struct utimbuf is declared -- usually in . Some systems have utime.h but don't declare the struct anywhere. ]) fi ]) gnuit-4.9.5/m4/sys_time_h.m40000644000175000017500000000311611146671376012542 00000000000000# Configure a replacement for . # Copyright (C) 2007 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. # Written by Paul Eggert and Martin Lambers. AC_DEFUN([gl_HEADER_SYS_TIME_H], [ dnl Use AC_REQUIRE here, so that the REPLACE_GETTIMEOFDAY=0 statement dnl below is expanded once only, before all REPLACE_GETTIMEOFDAY=1 dnl statements that occur in other macros. AC_REQUIRE([gl_HEADER_SYS_TIME_H_BODY]) ]) AC_DEFUN([gl_HEADER_SYS_TIME_H_BODY], [ AC_REQUIRE([AC_C_RESTRICT]) gl_CHECK_NEXT_HEADERS([sys/time.h]) if test $ac_cv_header_sys_time_h = yes; then HAVE_SYS_TIME_H=1 else HAVE_SYS_TIME_H=0 fi AC_SUBST([HAVE_SYS_TIME_H]) AC_CACHE_CHECK([for struct timeval], [gl_cv_sys_struct_timeval], [AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [[#if HAVE_SYS_TIME_H #include #endif #include ]], [[static struct timeval x; x.tv_sec = x.tv_usec;]])], [gl_cv_sys_struct_timeval=yes], [gl_cv_sys_struct_timeval=no])]) if test $gl_cv_sys_struct_timeval = yes; then HAVE_STRUCT_TIMEVAL=1 else HAVE_STRUCT_TIMEVAL=0 fi AC_SUBST([HAVE_STRUCT_TIMEVAL]) dnl Assume POSIX behavior unless another module says otherwise. REPLACE_GETTIMEOFDAY=0 AC_SUBST([REPLACE_GETTIMEOFDAY]) if test $HAVE_SYS_TIME_H = 0 || test $HAVE_STRUCT_TIMEVAL = 0; then SYS_TIME_H=sys/time.h else SYS_TIME_H= fi AC_SUBST([SYS_TIME_H]) ]) gnuit-4.9.5/m4/localcharset.m40000644000175000017500000000105711146671376013045 00000000000000# localcharset.m4 serial 6 dnl Copyright (C) 2002, 2004, 2006, 2009 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_LOCALCHARSET], [ dnl Prerequisites of lib/localcharset.c. AC_REQUIRE([AM_LANGINFO_CODESET]) AC_CHECK_DECLS_ONCE([getc_unlocked]) dnl Prerequisites of the lib/Makefile.am snippet. AC_REQUIRE([AC_CANONICAL_HOST]) AC_REQUIRE([gl_GLIBC21]) ]) gnuit-4.9.5/m4/double-slash-root.m40000644000175000017500000000271211146671375013742 00000000000000# double-slash-root.m4 serial 4 -*- Autoconf -*- dnl Copyright (C) 2006, 2008, 2009 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_DOUBLE_SLASH_ROOT], [ AC_REQUIRE([AC_CANONICAL_HOST]) AC_CACHE_CHECK([whether // is distinct from /], [gl_cv_double_slash_root], [ if test x"$cross_compiling" = xyes ; then # When cross-compiling, there is no way to tell whether // is special # short of a list of hosts. However, the only known hosts to date # that have a distinct // are Apollo DomainOS (too old to port to), # Cygwin, and z/OS. If anyone knows of another system for which // has # special semantics and is distinct from /, please report it to # . case $host in *-cygwin | i370-ibm-openedition) gl_cv_double_slash_root=yes ;; *) # Be optimistic and assume that / and // are the same when we # don't know. gl_cv_double_slash_root='unknown, assuming no' ;; esac else set x `ls -di / // 2>/dev/null` if test "$[2]" = "$[4]" && wc //dev/null >/dev/null 2>&1; then gl_cv_double_slash_root=no else gl_cv_double_slash_root=yes fi fi]) if test "$gl_cv_double_slash_root" = yes; then AC_DEFINE([DOUBLE_SLASH_IS_DISTINCT_ROOT], [1], [Define to 1 if // is a file system root distinct from /.]) fi ]) gnuit-4.9.5/m4/mbslen.m40000644000175000017500000000065611146671376011665 00000000000000# mbslen.m4 serial 2 dnl Copyright (C) 2007-2008 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_MBSLEN], [ gl_PREREQ_MBSLEN ]) # Prerequisites of lib/mbslen.c. AC_DEFUN([gl_PREREQ_MBSLEN], [ AC_REQUIRE([AC_FUNC_MBRTOWC]) : ]) gnuit-4.9.5/m4/glibc21.m40000644000175000017500000000146511146671375011626 00000000000000# glibc21.m4 serial 4 dnl Copyright (C) 2000-2002, 2004, 2008 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. # Test for the GNU C Library, version 2.1 or newer. # From Bruno Haible. AC_DEFUN([gl_GLIBC21], [ AC_CACHE_CHECK([whether we are using the GNU C Library 2.1 or newer], [ac_cv_gnu_library_2_1], [AC_EGREP_CPP([Lucky GNU user], [ #include #ifdef __GNU_LIBRARY__ #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2) Lucky GNU user #endif #endif ], [ac_cv_gnu_library_2_1=yes], [ac_cv_gnu_library_2_1=no]) ] ) AC_SUBST([GLIBC21]) GLIBC21="$ac_cv_gnu_library_2_1" ] ) gnuit-4.9.5/m4/quotearg.m40000644000175000017500000000067711146671376012237 00000000000000# quotearg.m4 serial 7 dnl Copyright (C) 2002, 2004-2008 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_QUOTEARG], [ AC_LIBOBJ([quotearg]) dnl Prerequisites of lib/quotearg.c. AC_CHECK_FUNCS_ONCE([mbsinit]) AC_TYPE_MBSTATE_T AC_FUNC_MBRTOWC ]) gnuit-4.9.5/m4/00gnulib.m40000644000175000017500000000251511146671375012020 00000000000000# 00gnulib.m4 serial 2 dnl Copyright (C) 2009 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl This file must be named something that sorts before all other dnl gnulib-provided .m4 files. It is needed until such time as we can dnl assume Autoconf 2.64, with its improved AC_DEFUN_ONCE semantics. # AC_DEFUN_ONCE([NAME], VALUE) # ---------------------------- # Define NAME to expand to VALUE on the first use (whether by direct # expansion, or by AC_REQUIRE), and to nothing on all subsequent uses. # Avoid bugs in AC_REQUIRE in Autoconf 2.63 and earlier. This # definition is slower than the version in Autoconf 2.64, because it # can only use interfaces that existed since 2.59; but it achieves the # same effect. Quoting is necessary to avoid confusing Automake. m4_version_prereq([2.63.263], [], [m4_define([AC][_DEFUN_ONCE], [AC][_DEFUN([$1], [AC_REQUIRE([_gl_DEFUN_ONCE([$1])], [m4_indir([_gl_DEFUN_ONCE([$1])])])])]dnl [AC][_DEFUN([_gl_DEFUN_ONCE([$1])], [$2])])]) # gl_00GNULIB # ----------- # Witness macro that this file has been included. Needed to force # Automake to include this file prior to all other gnulib .m4 files. AC_DEFUN([gl_00GNULIB]) gnuit-4.9.5/m4/strndup.m40000644000175000017500000000313011146671376012072 00000000000000# strndup.m4 serial 16 dnl Copyright (C) 2002-2003, 2005-2009 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_STRNDUP], [ dnl Persuade glibc to declare strndup(). AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) AC_CHECK_DECLS_ONCE([strndup]) if test $ac_cv_have_decl_strndup = no; then HAVE_DECL_STRNDUP=0 fi # AIX 4.3.3, AIX 5.1 have a function that fails to add the terminating '\0'. AC_CACHE_CHECK([for working strndup], [gl_cv_func_strndup], [AC_RUN_IFELSE([ AC_LANG_PROGRAM([[#include #include ]], [[ #ifndef HAVE_DECL_STRNDUP extern char *strndup (const char *, size_t); #endif char *s; s = strndup ("some longer string", 15); free (s); s = strndup ("shorter string", 13); return s[13] != '\0';]])], [gl_cv_func_strndup=yes], [gl_cv_func_strndup=no], [AC_CHECK_FUNC([strndup], [AC_EGREP_CPP([too risky], [ #ifdef _AIX too risky #endif ], [gl_cv_func_strndup=no], [gl_cv_func_strndup=yes])], [gl_cv_func_strndup=no])])]) if test $gl_cv_func_strndup = yes; then AC_DEFINE([HAVE_STRNDUP], [1], [Define if you have the strndup() function and it works.]) else HAVE_STRNDUP=0 AC_LIBOBJ([strndup]) gl_PREREQ_STRNDUP fi ]) # Prerequisites of lib/strndup.c. AC_DEFUN([gl_PREREQ_STRNDUP], [:]) gnuit-4.9.5/m4/codeset.m40000644000175000017500000000141411146671375012023 00000000000000# codeset.m4 serial 4 (gettext-0.18) dnl Copyright (C) 2000-2002, 2006, 2008, 2009 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Bruno Haible. AC_DEFUN([AM_LANGINFO_CODESET], [ AC_CACHE_CHECK([for nl_langinfo and CODESET], [am_cv_langinfo_codeset], [AC_TRY_LINK([#include ], [char* cs = nl_langinfo(CODESET); return !cs;], [am_cv_langinfo_codeset=yes], [am_cv_langinfo_codeset=no]) ]) if test $am_cv_langinfo_codeset = yes; then AC_DEFINE([HAVE_LANGINFO_CODESET], [1], [Define if you have and nl_langinfo(CODESET).]) fi ]) gnuit-4.9.5/m4/rename.m40000644000175000017500000000321511146671376011646 00000000000000# serial 11 # Copyright (C) 2001, 2003, 2005, 2006, 2009 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. dnl From Volker Borchert. dnl Determine whether rename works for source file names with a trailing slash. dnl The rename from SunOS 4.1.1_U1 doesn't. dnl dnl If it doesn't, then define RENAME_TRAILING_SLASH_BUG and arrange dnl to compile the wrapper function. dnl AC_DEFUN([gl_FUNC_RENAME], [ AC_CACHE_CHECK([whether rename is broken], gl_cv_func_rename_trailing_slash_bug, [ rm -rf conftest.d1 conftest.d2 mkdir conftest.d1 || AC_MSG_ERROR([cannot create temporary directory]) AC_TRY_RUN([ # include # include int main () { exit (rename ("conftest.d1/", "conftest.d2") ? 1 : 0); } ], gl_cv_func_rename_trailing_slash_bug=no, gl_cv_func_rename_trailing_slash_bug=yes, dnl When crosscompiling, assume rename is broken. gl_cv_func_rename_trailing_slash_bug=yes) rm -rf conftest.d1 conftest.d2 ]) if test $gl_cv_func_rename_trailing_slash_bug = yes; then AC_LIBOBJ([rename]) AC_DEFINE([rename], [rpl_rename], [Define to rpl_rename if the replacement function should be used.]) AC_DEFINE([RENAME_TRAILING_SLASH_BUG], [1], [Define if rename does not work for source file names with a trailing slash, like the one from SunOS 4.1.1_U1.]) gl_PREREQ_RENAME fi ]) # Prerequisites of lib/rename.c. AC_DEFUN([gl_PREREQ_RENAME], [:]) gnuit-4.9.5/m4/signalblocking.m40000644000175000017500000000274511146671376013374 00000000000000# signalblocking.m4 serial 10 dnl Copyright (C) 2001-2002, 2006-2009 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. # Determine available signal blocking primitives. Three different APIs exist: # 1) POSIX: sigemptyset, sigaddset, sigprocmask # 2) SYSV: sighold, sigrelse # 3) BSD: sigblock, sigsetmask # For simplicity, here we check only for the POSIX signal blocking. AC_DEFUN([gl_SIGNALBLOCKING], [ AC_REQUIRE([gl_SIGNAL_H_DEFAULTS]) signals_not_posix= AC_EGREP_HEADER([sigset_t], [signal.h], , [signals_not_posix=1]) if test -z "$signals_not_posix"; then AC_CHECK_FUNC([sigprocmask], [gl_cv_func_sigprocmask=1]) fi if test -z "$gl_cv_func_sigprocmask"; then HAVE_POSIX_SIGNALBLOCKING=0 AC_LIBOBJ([sigprocmask]) gl_PREREQ_SIGPROCMASK fi ]) # Prerequisites of the part of lib/signal.in.h and of lib/sigprocmask.c. AC_DEFUN([gl_PREREQ_SIGPROCMASK], [ AC_REQUIRE([gl_SIGNAL_H_DEFAULTS]) AC_CHECK_TYPES([sigset_t], [gl_cv_type_sigset_t=yes], [gl_cv_type_sigset_t=no], [#include /* Mingw defines sigset_t not in , but in . */ #include ]) if test $gl_cv_type_sigset_t != yes; then HAVE_SIGSET_T=0 fi dnl HAVE_SIGSET_T is 1 if the system lacks the sigprocmask function but has dnl the sigset_t type. AC_SUBST([HAVE_SIGSET_T]) ]) gnuit-4.9.5/m4/strtoul.m40000644000175000017500000000053211146671376012112 00000000000000# strtoul.m4 serial 4 dnl Copyright (C) 2002, 2006, 2009 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_STRTOUL], [ AC_REPLACE_FUNCS([strtoul]) ]) gnuit-4.9.5/mkvcs0000644000175000017500000000062611146671376010666 00000000000000#! /bin/sh # Check for Linux if test `uname` != Linux; then echo You are not running Linux echo This is the result of 'uname -a' on this machine: uname -a echo mkvcs failed exit 1 fi # Create /dev/vcsX and /dev/vcsaX. for n in 0 1 2 3 4 5 6 7 8; do mknod --mode=0666 /dev/vcs$n c 7 $n mknod --mode=0666 /dev/vcsa$n c 7 `expr $n + 128` done chown root.tty /dev/vcs[0-8] /dev/vcsa[0-8] echo done gnuit-4.9.5/COPYING0000644000175000017500000010451311146671375010652 00000000000000 GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU General Public License is a free, copyleft license for software and other kinds of works. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. 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 them 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 prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. 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. Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS 0. Definitions. "This License" refers to version 3 of the GNU General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. A "covered work" means either the unmodified Program or a work based on the Program. To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey 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; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a) The work must carry prominent notices stating that you modified it, and giving a relevant date. b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d) Limiting the use for publicity purposes of names of licensors or authors of the material; or e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If 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 convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Use with the GNU Affero General Public License. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU 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 that a certain numbered version of the GNU General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. 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. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 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. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. 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 state 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 3 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, see . Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: Copyright (C) This program 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, your program's commands might be different; for a GUI interface, you would use an "about box". You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see . The GNU 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 Lesser General Public License instead of this License. But first, please read . gnuit-4.9.5/configure0000755000175000017500000314336411146671375011540 00000000000000#! /bin/sh # From configure.ac Revision: 1.7 . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.61 for gnuit 4.9.5. # # Report bugs to . # # 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='gnuit' PACKAGE_TARNAME='gnuit' PACKAGE_VERSION='4.9.5' PACKAGE_STRING='gnuit 4.9.5' PACKAGE_BUGREPORT='ianb@erislabs.net' ac_unique_file="config.h.in" # 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" gl_header_list= gl_func_list= 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 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 build build_cpu build_vendor build_os host host_cpu host_vendor host_os 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 RANLIB CPP GREP EGREP MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT TRANSITION_TRUE TRANSITION_FALSE DEBIAN_TRUE DEBIAN_FALSE GL_COND_LIBTOOL_TRUE GL_COND_LIBTOOL_FALSE ALLOCA ALLOCA_H LIB_CLOCK_GETTIME INCLUDE_NEXT INCLUDE_NEXT_AS_FIRST_DIRECTIVE PRAGMA_SYSTEM_HEADER NEXT_ERRNO_H ERRNO_H EMULTIHOP_HIDDEN EMULTIHOP_VALUE ENOLINK_HIDDEN ENOLINK_VALUE EOVERFLOW_HIDDEN EOVERFLOW_VALUE GNULIB_OPEN REPLACE_OPEN NEXT_FCNTL_H FCNTL_H FNMATCH_H GETOPT_H LIBINTL LTLIBINTL NEXT_SYS_TIME_H HAVE_SYS_TIME_H HAVE_STRUCT_TIMEVAL REPLACE_GETTIMEOFDAY SYS_TIME_H HAVE_LONG_LONG_INT HAVE_UNSIGNED_LONG_LONG_INT HAVE_INTTYPES_H HAVE_SYS_TYPES_H NEXT_STDINT_H HAVE_STDINT_H HAVE_SYS_INTTYPES_H HAVE_SYS_BITYPES_H APPLE_UNIVERSAL_BUILD BITSIZEOF_PTRDIFF_T BITSIZEOF_SIZE_T BITSIZEOF_SIG_ATOMIC_T BITSIZEOF_WCHAR_T BITSIZEOF_WINT_T HAVE_SIGNED_SIG_ATOMIC_T HAVE_SIGNED_WCHAR_T HAVE_SIGNED_WINT_T PTRDIFF_T_SUFFIX SIZE_T_SUFFIX SIG_ATOMIC_T_SUFFIX WCHAR_T_SUFFIX WINT_T_SUFFIX STDINT_H PRI_MACROS_BROKEN GNULIB_IMAXABS GNULIB_IMAXDIV GNULIB_STRTOIMAX GNULIB_STRTOUMAX HAVE_DECL_IMAXABS HAVE_DECL_IMAXDIV HAVE_DECL_STRTOIMAX HAVE_DECL_STRTOUMAX NEXT_INTTYPES_H PRIPTR_PREFIX INT32_MAX_LT_INTMAX_MAX INT64_MAX_EQ_LONG_MAX UINT32_MAX_LT_UINTMAX_MAX UINT64_MAX_EQ_ULONG_MAX INTTYPES_H GLIBC21 LOCALCHARSET_TESTS_ENVIRONMENT GNULIB_LCHMOD GNULIB_LSTAT HAVE_LCHMOD REPLACE_LSTAT REPLACE_MKDIR HAVE_MALLOC_POSIX GNULIB_MALLOC_POSIX GNULIB_REALLOC_POSIX GNULIB_CALLOC_POSIX GNULIB_ATOLL GNULIB_GETLOADAVG GNULIB_GETSUBOPT GNULIB_MKDTEMP GNULIB_MKSTEMP GNULIB_PUTENV GNULIB_RANDOM_R GNULIB_RPMATCH GNULIB_SETENV GNULIB_STRTOD GNULIB_STRTOLL GNULIB_STRTOULL GNULIB_UNSETENV HAVE_ATOLL HAVE_CALLOC_POSIX HAVE_GETSUBOPT HAVE_MKDTEMP HAVE_REALLOC_POSIX HAVE_RANDOM_R HAVE_RPMATCH HAVE_SETENV HAVE_STRTOD HAVE_STRTOLL HAVE_STRTOULL HAVE_STRUCT_RANDOM_DATA HAVE_SYS_LOADAVG_H HAVE_UNSETENV HAVE_DECL_GETLOADAVG REPLACE_MKSTEMP REPLACE_PUTENV REPLACE_STRTOD VOID_UNSETENV GNULIB_BTOWC GNULIB_WCTOB GNULIB_MBSINIT GNULIB_MBRTOWC GNULIB_MBRLEN GNULIB_MBSRTOWCS GNULIB_MBSNRTOWCS GNULIB_WCRTOMB GNULIB_WCSRTOMBS GNULIB_WCSNRTOMBS GNULIB_WCWIDTH HAVE_BTOWC HAVE_MBSINIT HAVE_MBRTOWC HAVE_MBRLEN HAVE_MBSRTOWCS HAVE_MBSNRTOWCS HAVE_WCRTOMB HAVE_WCSRTOMBS HAVE_WCSNRTOMBS HAVE_DECL_WCTOB HAVE_DECL_WCWIDTH REPLACE_MBSTATE_T REPLACE_BTOWC REPLACE_WCTOB REPLACE_MBSINIT REPLACE_MBRTOWC REPLACE_MBRLEN REPLACE_MBSRTOWCS REPLACE_MBSNRTOWCS REPLACE_WCRTOMB REPLACE_WCSRTOMBS REPLACE_WCWIDTH WCHAR_H LOCALE_JA LOCALE_FR_UTF8 LOCALE_ZH_CN GNULIB_MEMMEM GNULIB_MEMPCPY GNULIB_MEMRCHR GNULIB_RAWMEMCHR GNULIB_STPCPY GNULIB_STPNCPY GNULIB_STRCHRNUL GNULIB_STRDUP GNULIB_STRNDUP GNULIB_STRNLEN GNULIB_STRPBRK GNULIB_STRSEP GNULIB_STRSTR GNULIB_STRCASESTR GNULIB_STRTOK_R GNULIB_MBSLEN GNULIB_MBSNLEN GNULIB_MBSCHR GNULIB_MBSRCHR GNULIB_MBSSTR GNULIB_MBSCASECMP GNULIB_MBSNCASECMP GNULIB_MBSPCASECMP GNULIB_MBSCASESTR GNULIB_MBSCSPN GNULIB_MBSPBRK GNULIB_MBSSPN GNULIB_MBSSEP GNULIB_MBSTOK_R GNULIB_STRERROR GNULIB_STRSIGNAL GNULIB_STRVERSCMP HAVE_DECL_MEMMEM HAVE_MEMPCPY HAVE_DECL_MEMRCHR HAVE_RAWMEMCHR HAVE_STPCPY HAVE_STPNCPY HAVE_STRCHRNUL HAVE_DECL_STRDUP HAVE_STRNDUP HAVE_DECL_STRNDUP HAVE_DECL_STRNLEN HAVE_STRPBRK HAVE_STRSEP HAVE_STRCASESTR HAVE_DECL_STRTOK_R HAVE_DECL_STRERROR HAVE_DECL_STRSIGNAL HAVE_STRVERSCMP REPLACE_MEMMEM REPLACE_STRDUP REPLACE_STRSTR REPLACE_STRCASESTR REPLACE_STRERROR REPLACE_STRSIGNAL REPLACE_LOCALTIME_R REPLACE_NANOSLEEP REPLACE_STRPTIME REPLACE_TIMEGM LIB_NANOSLEEP GNULIB_CHOWN GNULIB_CLOSE GNULIB_DUP2 GNULIB_ENVIRON GNULIB_EUIDACCESS GNULIB_FCHDIR GNULIB_FSYNC GNULIB_FTRUNCATE GNULIB_GETCWD GNULIB_GETDOMAINNAME GNULIB_GETDTABLESIZE GNULIB_GETHOSTNAME GNULIB_GETLOGIN_R GNULIB_GETPAGESIZE GNULIB_GETUSERSHELL GNULIB_LCHOWN GNULIB_LINK GNULIB_LSEEK GNULIB_READLINK GNULIB_SLEEP GNULIB_UNISTD_H_SIGPIPE GNULIB_WRITE HAVE_DUP2 HAVE_EUIDACCESS HAVE_FSYNC HAVE_FTRUNCATE HAVE_GETDOMAINNAME HAVE_GETDTABLESIZE HAVE_GETHOSTNAME HAVE_GETPAGESIZE HAVE_GETUSERSHELL HAVE_LINK HAVE_READLINK HAVE_SLEEP HAVE_DECL_ENVIRON HAVE_DECL_GETLOGIN_R HAVE_OS_H HAVE_SYS_PARAM_H REPLACE_CHOWN REPLACE_CLOSE REPLACE_FCHDIR REPLACE_GETCWD REPLACE_GETPAGESIZE REPLACE_LCHOWN REPLACE_LSEEK REPLACE_WRITE UNISTD_H_HAVE_WINSOCK2_H GNULIB_SIGNAL_H_SIGPIPE GNULIB_SIGPROCMASK GNULIB_SIGACTION HAVE_POSIX_SIGNALBLOCKING HAVE_SIGSET_T HAVE_SIGINFO_T HAVE_SIGACTION HAVE_STRUCT_SIGACTION_SA_SIGACTION NEXT_SIGNAL_H STDBOOL_H HAVE__BOOL NEXT_STDLIB_H HAVE_RANDOM_H HAVE_STRCASECMP HAVE_DECL_STRNCASECMP NEXT_STRING_H NEXT_STRINGS_H GNULIB_SOCKET GNULIB_CONNECT GNULIB_ACCEPT GNULIB_BIND GNULIB_GETPEERNAME GNULIB_GETSOCKNAME GNULIB_GETSOCKOPT GNULIB_LISTEN GNULIB_RECV GNULIB_SEND GNULIB_RECVFROM GNULIB_SENDTO GNULIB_SETSOCKOPT GNULIB_SHUTDOWN NEXT_SYS_SOCKET_H HAVE_WINSOCK2_H HAVE_SYS_SOCKET_H HAVE_WS2TCPIP_H SYS_SOCKET_H GNULIB_SELECT NEXT_SYS_SELECT_H HAVE_SYS_SELECT_H SYS_SELECT_H HAVE_LSTAT NEXT_SYS_STAT_H SYS_STAT_H NEXT_TIME_H TIME_H_DEFINES_STRUCT_TIMESPEC SYS_TIME_H_DEFINES_STRUCT_TIMESPEC NEXT_UNISTD_H HAVE_UNISTD_H HAVE_WINT_T HAVE_WCHAR_H NEXT_WCHAR_H HAVE_ISWCNTRL NEXT_WCTYPE_H HAVE_WCTYPE_H WCTYPE_H REPLACE_ISWCNTRL LIBGNU_LIBDEPS LIBGNU_LTLIBDEPS TEXI2DVI TEXI2HTML HTMLDOCS_TEXI2HTML_TRUE HTMLDOCS_TEXI2HTML_FALSE HTMLDOCS_MAKEINFO_TRUE HTMLDOCS_MAKEINFO_FALSE PRODUCT HOST MAKE INSTALL INCLUDES CLEANFILES LIBOBJS LTLIBOBJS gl_LIBOBJS gl_LTLIBOBJS gltests_LIBOBJS gltests_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_TARNAME}' 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 gnuit 4.9.5 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/gnuit] --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 System types: --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in short | recursive ) echo "Configuration of gnuit 4.9.5:";; esac cat <<\_ACEOF Optional Features: --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors --disable-largefile omit support for large files --enable-maintainer-mode enable make rules and dependencies not useful (and sometimes confusing) to the casual installer --enable-transition install transitional /usr/bin/git --enable-debian Enable Debian-specific customisations --enable-smp enable parallel compilation (Linux only) --enable-gcc-warnings more gcc warnings for debugging purposes --enable-efence link against the Electric Fence library 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. Report bugs to . _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 gnuit configure 4.9.5 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 gnuit $as_me 4.9.5, 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 gl_header_list="$gl_header_list errno.h" gl_header_list="$gl_header_list fcntl.h" gl_func_list="$gl_func_list btowc" gl_func_list="$gl_func_list isblank" gl_func_list="$gl_func_list iswctype" gl_func_list="$gl_func_list mbsrtowcs" gl_func_list="$gl_func_list mempcpy" gl_func_list="$gl_func_list wmemchr" gl_func_list="$gl_func_list wmemcpy" gl_func_list="$gl_func_list wmempcpy" gl_header_list="$gl_header_list wctype.h" gl_header_list="$gl_header_list sys/param.h" gl_header_list="$gl_header_list sys/vfs.h" gl_header_list="$gl_header_list sys/fs_types.h" gl_func_list="$gl_func_list gettimeofday" gl_func_list="$gl_func_list nanotime" gl_header_list="$gl_header_list sys/time.h" gl_header_list="$gl_header_list stdint.h" gl_header_list="$gl_header_list wchar.h" gl_header_list="$gl_header_list inttypes.h" gl_func_list="$gl_func_list lstat" gl_func_list="$gl_func_list mbsinit" gl_func_list="$gl_func_list mbrtowc" gl_header_list="$gl_header_list sys/select.h" gl_func_list="$gl_func_list readlink" gl_func_list="$gl_func_list sigaction" gl_func_list="$gl_func_list sigaltstack" gl_func_list="$gl_func_list siginterrupt" gl_header_list="$gl_header_list signal.h" gl_header_list="$gl_header_list stdlib.h" gl_header_list="$gl_header_list sys/socket.h" gl_header_list="$gl_header_list string.h" gl_header_list="$gl_header_list strings.h" gl_header_list="$gl_header_list sys/stat.h" gl_header_list="$gl_header_list time.h" gl_header_list="$gl_header_list unistd.h" gl_header_list="$gl_header_list utime.h" gl_func_list="$gl_func_list iswcntrl" gl_func_list="$gl_func_list wcwidth" # 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.9" 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 if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then # We used to keeping the `.' as first argument, in order to # allow $(mkdir_p) to be used without argument. As in # $(mkdir_p) $(somedir) # where $(somedir) is conditionally defined. However this is wrong # for two reasons: # 1. if the package is installed by a user who cannot write `.' # make install will fail, # 2. the above comment should most certainly read # $(mkdir_p) $(DESTDIR)$(somedir) # so it does not work when $(somedir) is undefined and # $(DESTDIR) is not. # To support the latter case, we have to write # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir), # so the `.' trick is pointless. mkdir_p='mkdir -p --' else # On NextStep and OpenStep, the `mkdir' command does not # recognize any option. It will interpret all options as # directories to create, and then abort because `.' already # exists. for d in ./-p ./--version; do test -d $d && rmdir $d done # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. if test -f "$ac_aux_dir/mkinstalldirs"; then mkdir_p='$(mkinstalldirs)' else mkdir_p='$(install_sh) -d' fi fi 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 # test to see if srcdir already configured if test "`cd $srcdir && pwd`" != "`pwd`" && 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 # 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='gnuit' VERSION='4.9.5' 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-"$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="\${SHELL} \$(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 -' { 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 { 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; } ac_config_headers="$ac_config_headers config.h" # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || { { echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5 echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;} { (exit 1); exit 1; }; } { echo "$as_me:$LINENO: checking build system type" >&5 echo $ECHO_N "checking build system type... $ECHO_C" >&6; } if test "${ac_cv_build+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 echo "$as_me: error: cannot guess build type; you must specify one" >&2;} { (exit 1); exit 1; }; } ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5 echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;} { (exit 1); exit 1; }; } fi { echo "$as_me:$LINENO: result: $ac_cv_build" >&5 echo "${ECHO_T}$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; *) { { echo "$as_me:$LINENO: error: invalid value of canonical build" >&5 echo "$as_me: error: invalid value of canonical build" >&2;} { (exit 1); exit 1; }; };; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' set x $ac_cv_build shift build_cpu=$1 build_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: build_os=$* IFS=$ac_save_IFS case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac { echo "$as_me:$LINENO: checking host system type" >&5 echo $ECHO_N "checking host system type... $ECHO_C" >&6; } if test "${ac_cv_host+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5 echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;} { (exit 1); exit 1; }; } fi fi { echo "$as_me:$LINENO: result: $ac_cv_host" >&5 echo "${ECHO_T}$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; *) { { echo "$as_me:$LINENO: error: invalid value of canonical host" >&5 echo "$as_me: error: invalid value of canonical host" >&2;} { (exit 1); exit 1; }; };; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' set x $ac_cv_host shift host_cpu=$1 host_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: host_os=$* IFS=$ac_save_IFS case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; 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 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/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 if test "x$CC" != xcc; then { echo "$as_me:$LINENO: checking whether $CC and cc understand -c and -o together" >&5 echo $ECHO_N "checking whether $CC and cc understand -c and -o together... $ECHO_C" >&6; } else { echo "$as_me:$LINENO: checking whether cc understands -c and -o together" >&5 echo $ECHO_N "checking whether cc understands -c and -o together... $ECHO_C" >&6; } fi set dummy $CC; ac_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` if { as_var=ac_cv_prog_cc_${ac_cc}_c_o; 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. */ int main () { ; return 0; } _ACEOF # Make sure it works both with $CC and with simple cc. # We do the test twice because some compilers refuse to overwrite an # existing .o file with -o, though they will create one. ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5' rm -f conftest2.* if { (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); } && test -f conftest2.$ac_objext && { (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 eval ac_cv_prog_cc_${ac_cc}_c_o=yes if test "x$CC" != xcc; then # Test first that cc exists at all. if { ac_try='cc -c conftest.$ac_ext >&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_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5' rm -f conftest2.* if { (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); } && test -f conftest2.$ac_objext && { (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 # cc works too. : else # cc exists but doesn't like -o. eval ac_cv_prog_cc_${ac_cc}_c_o=no fi fi fi else eval ac_cv_prog_cc_${ac_cc}_c_o=no fi rm -f core conftest* fi if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } cat >>confdefs.h <<\_ACEOF #define NO_MINUS_C_MINUS_O 1 _ACEOF fi # FIXME: we rely on the cache variable name because # there is no other way. set dummy $CC ac_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" != yes"; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; 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_RANLIB+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # 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_RANLIB="${ac_tool_prefix}ranlib" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then { echo "$as_me:$LINENO: result: $RANLIB" >&5 echo "${ECHO_T}$RANLIB" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; 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_RANLIB+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # 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_RANLIB="ranlib" 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_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 echo "${ECHO_T}$ac_ct_RANLIB" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$ac_ct_RANLIB" = x; then RANLIB=":" 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 RANLIB=$ac_ct_RANLIB fi else RANLIB="$ac_cv_prog_RANLIB" fi cat >>confdefs.h <<\_ACEOF #define _GNU_SOURCE 1 _ACEOF 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_minix_config_h+set}" = set; then { echo "$as_me:$LINENO: checking for minix/config.h" >&5 echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6; } if test "${ac_cv_header_minix_config_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi { echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5 echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6; } else # Is the header compilable? { echo "$as_me:$LINENO: checking minix/config.h usability" >&5 echo $ECHO_N "checking minix/config.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 minix/config.h presence" >&5 echo $ECHO_N "checking minix/config.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: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: minix/config.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: minix/config.h: present but cannot be compiled" >&5 echo "$as_me: WARNING: minix/config.h: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: minix/config.h: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: minix/config.h: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: minix/config.h: see the Autoconf documentation" >&5 echo "$as_me: WARNING: minix/config.h: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: minix/config.h: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: minix/config.h: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: minix/config.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: minix/config.h: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## -------------------------------- ## ## Report this to ianb@erislabs.net ## ## -------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { echo "$as_me:$LINENO: checking for minix/config.h" >&5 echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6; } if test "${ac_cv_header_minix_config_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_minix_config_h=$ac_header_preproc fi { echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5 echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6; } fi if test $ac_cv_header_minix_config_h = yes; then MINIX=yes else MINIX= fi if test "$MINIX" = yes; then cat >>confdefs.h <<\_ACEOF #define _POSIX_SOURCE 1 _ACEOF cat >>confdefs.h <<\_ACEOF #define _POSIX_1_SOURCE 2 _ACEOF cat >>confdefs.h <<\_ACEOF #define _MINIX 1 _ACEOF fi case "$host_os" in hpux*) cat >>confdefs.h <<\_ACEOF #define _XOPEN_SOURCE 500 _ACEOF ;; esac { echo "$as_me:$LINENO: checking whether it is safe to define __EXTENSIONS__" >&5 echo $ECHO_N "checking whether it is safe to define __EXTENSIONS__... $ECHO_C" >&6; } if test "${ac_cv_safe_to_define___extensions__+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. */ # define __EXTENSIONS__ 1 $ac_includes_default 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_safe_to_define___extensions__=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_safe_to_define___extensions__=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_safe_to_define___extensions__" >&5 echo "${ECHO_T}$ac_cv_safe_to_define___extensions__" >&6; } test $ac_cv_safe_to_define___extensions__ = yes && cat >>confdefs.h <<\_ACEOF #define __EXTENSIONS__ 1 _ACEOF cat >>confdefs.h <<\_ACEOF #define _ALL_SOURCE 1 _ACEOF cat >>confdefs.h <<\_ACEOF #define _GNU_SOURCE 1 _ACEOF cat >>confdefs.h <<\_ACEOF #define _POSIX_PTHREAD_SEMANTICS 1 _ACEOF cat >>confdefs.h <<\_ACEOF #define _TANDEM_SOURCE 1 _ACEOF 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 if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; 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_RANLIB+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # 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_RANLIB="${ac_tool_prefix}ranlib" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then { echo "$as_me:$LINENO: result: $RANLIB" >&5 echo "${ECHO_T}$RANLIB" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; 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_RANLIB+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # 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_RANLIB="ranlib" 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_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 echo "${ECHO_T}$ac_ct_RANLIB" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$ac_ct_RANLIB" = x; then RANLIB=":" 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 RANLIB=$ac_ct_RANLIB fi else RANLIB="$ac_cv_prog_RANLIB" 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' # Check whether --enable-largefile was given. if test "${enable_largefile+set}" = set; then enableval=$enable_largefile; fi if test "$enable_largefile" != no; then { echo "$as_me:$LINENO: checking for special C compiler options needed for large files" >&5 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6; } if test "${ac_cv_sys_largefile_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_sys_largefile_CC=no if test "$GCC" != yes; then ac_save_CC=$CC while :; do # IRIX 6.2 and later do not support large files by default, # so use the C compiler's -n32 option if that helps. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; 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 break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext CC="$CC -n32" 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_sys_largefile_CC=' -n32'; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext break done CC=$ac_save_CC rm -f conftest.$ac_ext fi fi { echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_CC" >&5 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6; } if test "$ac_cv_sys_largefile_CC" != no; then CC=$CC$ac_cv_sys_largefile_CC fi { echo "$as_me:$LINENO: checking for _FILE_OFFSET_BITS value needed for large files" >&5 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6; } if test "${ac_cv_sys_file_offset_bits+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else while :; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; 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_sys_file_offset_bits=no; break 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 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define _FILE_OFFSET_BITS 64 #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; 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_sys_file_offset_bits=64; break 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 ac_cv_sys_file_offset_bits=unknown break done fi { echo "$as_me:$LINENO: result: $ac_cv_sys_file_offset_bits" >&5 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6; } case $ac_cv_sys_file_offset_bits in #( no | unknown) ;; *) cat >>confdefs.h <<_ACEOF #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits _ACEOF ;; esac rm -f conftest* if test $ac_cv_sys_file_offset_bits = unknown; then { echo "$as_me:$LINENO: checking for _LARGE_FILES value needed for large files" >&5 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6; } if test "${ac_cv_sys_large_files+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else while :; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; 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_sys_large_files=no; break 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 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define _LARGE_FILES 1 #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; 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_sys_large_files=1; break 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 ac_cv_sys_large_files=unknown break done fi { echo "$as_me:$LINENO: result: $ac_cv_sys_large_files" >&5 echo "${ECHO_T}$ac_cv_sys_large_files" >&6; } case $ac_cv_sys_large_files in #( no | unknown) ;; *) cat >>confdefs.h <<_ACEOF #define _LARGE_FILES $ac_cv_sys_large_files _ACEOF ;; esac rm -f conftest* fi fi HOST=$host { 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 TRANSITIONOPT=yes # Check whether --enable-transition was given. if test "${enable_transition+set}" = set; then enableval=$enable_transition; TRANSITIONOPT="$enableval" else TRANSITIONOPT=yes fi if test "$TRANSITIONOPT" = yes; then TRANSITION_TRUE= TRANSITION_FALSE='#' else TRANSITION_TRUE='#' TRANSITION_FALSE= fi DEBIANOPT=yes # Check whether --enable-debian was given. if test "${enable_debian+set}" = set; then enableval=$enable_debian; DEBIANOPT="$enableval" else DEBIANOPT=no fi if test "$DEBIANOPT" = yes; then DEBIAN_TRUE= DEBIAN_FALSE='#' else DEBIAN_TRUE='#' DEBIAN_FALSE= fi # Check whether --enable-smp was given. if test "${enable_smp+set}" = set; then enableval=$enable_smp; SMP="$enableval" else SMP=no fi MAKE="make" if test "$host_os" = "linux-gnu"; then cat >>confdefs.h <<\_ACEOF #define HAVE_LINUX 1 _ACEOF if test "$SMP" = "yes"; then { echo "$as_me:$LINENO: checking for the number of processors" >&5 echo $ECHO_N "checking for the number of processors... $ECHO_C" >&6; } if test "${ac_cv_processors+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_processors="1" if test -f /proc/cpuinfo; then ac_cv_processors=`cat /proc/cpuinfo |\ grep processor | wc -l | sed 's/ //g'` fi fi { echo "$as_me:$LINENO: result: $ac_cv_processors" >&5 echo "${ECHO_T}$ac_cv_processors" >&6; } if test "$ac_cv_processors" -ge 2; then MAKE="make -j`expr $ac_cv_processors + 1`" fi fi fi # Check whether --enable-gcc-warnings was given. if test "${enable_gcc_warnings+set}" = set; then enableval=$enable_gcc_warnings; GCC_WARNINGS="$enableval" else GCC_WARNINGS=no fi # Check whether --enable-efence was given. if test "${enable_efence+set}" = set; then enableval=$enable_efence; EFENCE="$enableval" else EFENCE=no fi if test "$CC" = "gcc"; then cat >>confdefs.h <<\_ACEOF #define HAVE_GCC 1 _ACEOF if test "$GCC_WARNINGS" = "yes"; then CFLAGS="$CFLAGS -W -Wall \ -Waggregate-return -Wbad-function-cast -fstrict-aliasing \ -Winline -Wpointer-arith -Wcast-qual" else cat >>confdefs.h <<\_ACEOF #define NDEBUG 1 _ACEOF fi else cat >>confdefs.h <<\_ACEOF #define NDEBUG 1 _ACEOF fi if test "$EFENCE" = "yes"; then LIBS="$LIBS -lefence" fi { echo "$as_me:$LINENO: checking for AIX" >&5 echo $ECHO_N "checking for AIX... $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. */ #ifdef _AIX yes #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "yes" >/dev/null 2>&1; then { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } cat >>confdefs.h <<\_ACEOF #define _ALL_SOURCE 1 _ACEOF else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi rm -f conftest* { echo "$as_me:$LINENO: checking for library containing strerror" >&5 echo $ECHO_N "checking for library containing strerror... $ECHO_C" >&6; } if test "${ac_cv_search_strerror+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_func_search_save_LIBS=$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 strerror (); int main () { return strerror (); ; return 0; } _ACEOF for ac_lib in '' cposix; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi 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_search_strerror=$ac_res else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext if test "${ac_cv_search_strerror+set}" = set; then break fi done if test "${ac_cv_search_strerror+set}" = set; then : else ac_cv_search_strerror=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_search_strerror" >&5 echo "${ECHO_T}$ac_cv_search_strerror" >&6; } ac_res=$ac_cv_search_strerror if test "$ac_res" != no; then test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi if test "${ac_cv_header_minix_config_h+set}" = set; then { echo "$as_me:$LINENO: checking for minix/config.h" >&5 echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6; } if test "${ac_cv_header_minix_config_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi { echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5 echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6; } else # Is the header compilable? { echo "$as_me:$LINENO: checking minix/config.h usability" >&5 echo $ECHO_N "checking minix/config.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 minix/config.h presence" >&5 echo $ECHO_N "checking minix/config.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: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: minix/config.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: minix/config.h: present but cannot be compiled" >&5 echo "$as_me: WARNING: minix/config.h: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: minix/config.h: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: minix/config.h: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: minix/config.h: see the Autoconf documentation" >&5 echo "$as_me: WARNING: minix/config.h: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: minix/config.h: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: minix/config.h: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: minix/config.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: minix/config.h: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## -------------------------------- ## ## Report this to ianb@erislabs.net ## ## -------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { echo "$as_me:$LINENO: checking for minix/config.h" >&5 echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6; } if test "${ac_cv_header_minix_config_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_minix_config_h=$ac_header_preproc fi { echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5 echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6; } fi if test $ac_cv_header_minix_config_h = yes; then MINIX=yes else MINIX= fi if test "$MINIX" = yes; then cat >>confdefs.h <<\_ACEOF #define _POSIX_SOURCE 1 _ACEOF cat >>confdefs.h <<\_ACEOF #define _POSIX_1_SOURCE 2 _ACEOF cat >>confdefs.h <<\_ACEOF #define _MINIX 1 _ACEOF fi { echo "$as_me:$LINENO: checking for getpwnam in -lsun" >&5 echo $ECHO_N "checking for getpwnam in -lsun... $ECHO_C" >&6; } if test "${ac_cv_lib_sun_getpwnam+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsun $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 getpwnam (); int main () { return getpwnam (); ; 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_sun_getpwnam=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_sun_getpwnam=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_sun_getpwnam" >&5 echo "${ECHO_T}$ac_cv_lib_sun_getpwnam" >&6; } if test $ac_cv_lib_sun_getpwnam = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBSUN 1 _ACEOF LIBS="-lsun $LIBS" fi { 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 for ac_header in unistd.h stdlib.h string.h memory.h values.h\ sys/param.h sys/vfs.h sys/filsys.h fcntl.h sys/statfs.h\ sys/dustat.h sys/statvfs.h sys/sioctl.h stddef.h locale.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;} ( cat <<\_ASBOX ## -------------------------------- ## ## Report this to ianb@erislabs.net ## ## -------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&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 for ac_header in sys/mount.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. */ #if HAVE_SYS_PARAM_H #include #endif #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 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! { echo "$as_me:$LINENO: checking for working alloca.h" >&5 echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6; } if test "${ac_cv_working_alloca_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 int main () { char *p = (char *) alloca (2 * sizeof (int)); if (p) return 0; ; 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_working_alloca_h=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_working_alloca_h=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5 echo "${ECHO_T}$ac_cv_working_alloca_h" >&6; } if test $ac_cv_working_alloca_h = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_ALLOCA_H 1 _ACEOF fi { echo "$as_me:$LINENO: checking for alloca" >&5 echo $ECHO_N "checking for alloca... $ECHO_C" >&6; } if test "${ac_cv_func_alloca_works+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. */ #ifdef __GNUC__ # define alloca __builtin_alloca #else # ifdef _MSC_VER # include # define alloca _alloca # else # ifdef HAVE_ALLOCA_H # include # else # ifdef _AIX #pragma alloca # else # ifndef alloca /* predefined by HP cc +Olibcalls */ char *alloca (); # endif # endif # endif # endif #endif int main () { char *p = (char *) alloca (1); if (p) return 0; ; 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_func_alloca_works=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_alloca_works=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5 echo "${ECHO_T}$ac_cv_func_alloca_works" >&6; } if test $ac_cv_func_alloca_works = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_ALLOCA 1 _ACEOF else # The SVR3 libPW and SVR4 libucb both contain incompatible functions # that cause trouble. Some versions do not even contain alloca or # contain a buggy version. If you still want to use their alloca, # use ar to extract alloca.o from them instead of compiling alloca.c. ALLOCA=\${LIBOBJDIR}alloca.$ac_objext cat >>confdefs.h <<\_ACEOF #define C_ALLOCA 1 _ACEOF { echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5 echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6; } if test "${ac_cv_os_cray+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. */ #if defined CRAY && ! defined CRAY2 webecray #else wenotbecray #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "webecray" >/dev/null 2>&1; then ac_cv_os_cray=yes else ac_cv_os_cray=no fi rm -f conftest* fi { echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5 echo "${ECHO_T}$ac_cv_os_cray" >&6; } if test $ac_cv_os_cray = yes; then for ac_func in _getb67 GETB67 getb67; do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } if { as_var=$as_ac_var; 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. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* 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 $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; 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 eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval echo '${'$as_ac_var'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define CRAY_STACKSEG_END $ac_func _ACEOF break fi done fi { echo "$as_me:$LINENO: checking stack direction for C alloca" >&5 echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6; } if test "${ac_cv_c_stack_direction+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then ac_cv_c_stack_direction=0 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 int find_stack_direction () { static char *addr = 0; auto char dummy; if (addr == 0) { addr = &dummy; return find_stack_direction (); } else return (&dummy > addr) ? 1 : -1; } int main () { return find_stack_direction () < 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 ac_cv_c_stack_direction=1 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_c_stack_direction=-1 fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5 echo "${ECHO_T}$ac_cv_c_stack_direction" >&6; } cat >>confdefs.h <<_ACEOF #define STACK_DIRECTION $ac_cv_c_stack_direction _ACEOF fi { echo "$as_me:$LINENO: checking whether system is Windows or MSDOS" >&5 echo $ECHO_N "checking whether system is Windows or MSDOS... $ECHO_C" >&6; } if test "${ac_cv_win_or_dos+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 () { #if !defined _WIN32 && !defined __WIN32__ && !defined __MSDOS__ && !defined __CYGWIN__ neither MSDOS nor Windows #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_cv_win_or_dos=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_win_or_dos=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_win_or_dos" >&5 echo "${ECHO_T}$ac_cv_win_or_dos" >&6; } if test x"$ac_cv_win_or_dos" = xyes; then ac_fs_accepts_drive_letter_prefix=1 ac_fs_backslash_is_file_name_separator=1 { echo "$as_me:$LINENO: checking whether drive letter can start relative path" >&5 echo $ECHO_N "checking whether drive letter can start relative path... $ECHO_C" >&6; } if test "${ac_cv_drive_letter_can_be_relative+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 () { #if defined __CYGWIN__ drive letters are always absolute #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_cv_drive_letter_can_be_relative=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_drive_letter_can_be_relative=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_drive_letter_can_be_relative" >&5 echo "${ECHO_T}$ac_cv_drive_letter_can_be_relative" >&6; } if test x"$ac_cv_drive_letter_can_be_relative" = xyes; then ac_fs_drive_letter_can_be_relative=1 else ac_fs_drive_letter_can_be_relative=0 fi else ac_fs_accepts_drive_letter_prefix=0 ac_fs_backslash_is_file_name_separator=0 ac_fs_drive_letter_can_be_relative=0 fi cat >>confdefs.h <<_ACEOF #define FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX $ac_fs_accepts_drive_letter_prefix _ACEOF cat >>confdefs.h <<_ACEOF #define FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR $ac_fs_backslash_is_file_name_separator _ACEOF cat >>confdefs.h <<_ACEOF #define FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE $ac_fs_drive_letter_can_be_relative _ACEOF { echo "$as_me:$LINENO: checking whether // is distinct from /" >&5 echo $ECHO_N "checking whether // is distinct from /... $ECHO_C" >&6; } if test "${gl_cv_double_slash_root+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test x"$cross_compiling" = xyes ; then # When cross-compiling, there is no way to tell whether // is special # short of a list of hosts. However, the only known hosts to date # that have a distinct // are Apollo DomainOS (too old to port to), # Cygwin, and z/OS. If anyone knows of another system for which // has # special semantics and is distinct from /, please report it to # . case $host in *-cygwin | i370-ibm-openedition) gl_cv_double_slash_root=yes ;; *) # Be optimistic and assume that / and // are the same when we # don't know. gl_cv_double_slash_root='unknown, assuming no' ;; esac else set x `ls -di / // 2>/dev/null` if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then gl_cv_double_slash_root=no else gl_cv_double_slash_root=yes fi fi fi { echo "$as_me:$LINENO: result: $gl_cv_double_slash_root" >&5 echo "${ECHO_T}$gl_cv_double_slash_root" >&6; } if test "$gl_cv_double_slash_root" = yes; then cat >>confdefs.h <<\_ACEOF #define DOUBLE_SLASH_IS_DISTINCT_ROOT 1 _ACEOF fi { echo "$as_me:$LINENO: checking whether the preprocessor supports include_next" >&5 echo $ECHO_N "checking whether the preprocessor supports include_next... $ECHO_C" >&6; } if test "${gl_cv_have_include_next+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else rm -rf conftestd1a conftestd1b conftestd2 mkdir conftestd1a conftestd1b conftestd2 cat < conftestd1a/conftest.h #define DEFINED_IN_CONFTESTD1 #include_next #ifdef DEFINED_IN_CONFTESTD2 int foo; #else #error "include_next doesn't work" #endif EOF cat < conftestd1b/conftest.h #define DEFINED_IN_CONFTESTD1 #include #include_next #ifdef DEFINED_IN_CONFTESTD2 int foo; #else #error "include_next doesn't work" #endif EOF cat < conftestd2/conftest.h #ifndef DEFINED_IN_CONFTESTD1 #error "include_next test doesn't work" #endif #define DEFINED_IN_CONFTESTD2 EOF gl_save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2" cat >conftest.$ac_ext <<_ACEOF #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 gl_cv_have_include_next=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2" cat >conftest.$ac_ext <<_ACEOF #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 gl_cv_have_include_next=buggy else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gl_cv_have_include_next=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CPPFLAGS="$gl_save_CPPFLAGS" rm -rf conftestd1a conftestd1b conftestd2 fi { echo "$as_me:$LINENO: result: $gl_cv_have_include_next" >&5 echo "${ECHO_T}$gl_cv_have_include_next" >&6; } PRAGMA_SYSTEM_HEADER= if test $gl_cv_have_include_next = yes; then INCLUDE_NEXT=include_next INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next if test -n "$GCC"; then PRAGMA_SYSTEM_HEADER='#pragma GCC system_header' fi else if test $gl_cv_have_include_next = buggy; then INCLUDE_NEXT=include INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next else INCLUDE_NEXT=include INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include fi fi for ac_header in $gl_header_list 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;} ( cat <<\_ASBOX ## -------------------------------- ## ## Report this to ianb@erislabs.net ## ## -------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&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 { echo "$as_me:$LINENO: checking for complete errno.h" >&5 echo $ECHO_N "checking for complete errno.h... $ECHO_C" >&6; } if test "${gl_cv_header_errno_h_complete+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 #if !defined ENOMSG booboo #endif #if !defined EIDRM booboo #endif #if !defined ENOLINK booboo #endif #if !defined EPROTO booboo #endif #if !defined EMULTIHOP booboo #endif #if !defined EBADMSG booboo #endif #if !defined EOVERFLOW booboo #endif #if !defined ENOTSUP booboo #endif #if !defined ECANCELED booboo #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "booboo" >/dev/null 2>&1; then gl_cv_header_errno_h_complete=no else gl_cv_header_errno_h_complete=yes fi rm -f conftest* fi { echo "$as_me:$LINENO: result: $gl_cv_header_errno_h_complete" >&5 echo "${ECHO_T}$gl_cv_header_errno_h_complete" >&6; } if test $gl_cv_header_errno_h_complete = yes; then ERRNO_H='' else : if test $gl_cv_have_include_next = yes; then gl_cv_next_errno_h='<'errno.h'>' else { echo "$as_me:$LINENO: checking absolute name of " >&5 echo $ECHO_N "checking absolute name of ... $ECHO_C" >&6; } if test "${gl_cv_next_errno_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test $ac_cv_header_errno_h = yes; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF case "$host_os" in aix*) gl_absname_cpp="$ac_cpp -C" ;; *) gl_absname_cpp="$ac_cpp" ;; esac gl_cv_next_errno_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | sed -n '\#/errno.h#{ s#.*"\(.*/errno.h\)".*#\1# s#^/[^/]#//&# p q }'`'"' else gl_cv_next_errno_h='<'errno.h'>' fi fi { echo "$as_me:$LINENO: result: $gl_cv_next_errno_h" >&5 echo "${ECHO_T}$gl_cv_next_errno_h" >&6; } fi NEXT_ERRNO_H=$gl_cv_next_errno_h ERRNO_H='errno.h' fi if test -n "$ERRNO_H"; then { echo "$as_me:$LINENO: checking for EMULTIHOP value" >&5 echo $ECHO_N "checking for EMULTIHOP value... $ECHO_C" >&6; } if test "${gl_cv_header_errno_h_EMULTIHOP+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 #ifdef EMULTIHOP yes #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "yes" >/dev/null 2>&1; then gl_cv_header_errno_h_EMULTIHOP=yes else gl_cv_header_errno_h_EMULTIHOP=no fi rm -f conftest* if test $gl_cv_header_errno_h_EMULTIHOP = no; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define _XOPEN_SOURCE_EXTENDED 1 #include #ifdef EMULTIHOP yes #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "yes" >/dev/null 2>&1; then gl_cv_header_errno_h_EMULTIHOP=hidden fi rm -f conftest* if test $gl_cv_header_errno_h_EMULTIHOP = hidden; then if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define _XOPEN_SOURCE_EXTENDED 1 #include /* The following two lines are a workaround against an autoconf-2.52 bug. */ #include #include int main () { static int test_array [1 - 2 * !((EMULTIHOP) >= 0)]; test_array [0] = 0 ; 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_lo=0 ac_mid=0 while :; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define _XOPEN_SOURCE_EXTENDED 1 #include /* The following two lines are a workaround against an autoconf-2.52 bug. */ #include #include int main () { static int test_array [1 - 2 * !((EMULTIHOP) <= $ac_mid)]; test_array [0] = 0 ; 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_hi=$ac_mid; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr $ac_mid + 1` if test $ac_lo -le $ac_mid; then ac_lo= ac_hi= break fi ac_mid=`expr 2 '*' $ac_mid + 1` fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define _XOPEN_SOURCE_EXTENDED 1 #include /* The following two lines are a workaround against an autoconf-2.52 bug. */ #include #include int main () { static int test_array [1 - 2 * !((EMULTIHOP) < 0)]; test_array [0] = 0 ; 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_hi=-1 ac_mid=-1 while :; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define _XOPEN_SOURCE_EXTENDED 1 #include /* The following two lines are a workaround against an autoconf-2.52 bug. */ #include #include int main () { static int test_array [1 - 2 * !((EMULTIHOP) >= $ac_mid)]; test_array [0] = 0 ; 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_lo=$ac_mid; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_hi=`expr '(' $ac_mid ')' - 1` if test $ac_mid -le $ac_hi; then ac_lo= ac_hi= break fi ac_mid=`expr 2 '*' $ac_mid` fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo= ac_hi= fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # Binary search between lo and hi bounds. while test "x$ac_lo" != "x$ac_hi"; do ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define _XOPEN_SOURCE_EXTENDED 1 #include /* The following two lines are a workaround against an autoconf-2.52 bug. */ #include #include int main () { static int test_array [1 - 2 * !((EMULTIHOP) <= $ac_mid)]; test_array [0] = 0 ; 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_hi=$ac_mid else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr '(' $ac_mid ')' + 1` fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in ?*) gl_cv_header_errno_h_EMULTIHOP=$ac_lo;; '') ;; esac else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define _XOPEN_SOURCE_EXTENDED 1 #include /* The following two lines are a workaround against an autoconf-2.52 bug. */ #include #include static long int longval () { return EMULTIHOP; } static unsigned long int ulongval () { return EMULTIHOP; } #include #include int main () { FILE *f = fopen ("conftest.val", "w"); if (! f) return 1; if ((EMULTIHOP) < 0) { long int i = longval (); if (i != (EMULTIHOP)) return 1; fprintf (f, "%ld\n", i); } else { unsigned long int i = ulongval (); if (i != (EMULTIHOP)) return 1; fprintf (f, "%lu\n", i); } return ferror (f) || fclose (f) != 0; ; 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 gl_cv_header_errno_h_EMULTIHOP=`cat conftest.val` else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.val fi fi fi { echo "$as_me:$LINENO: result: $gl_cv_header_errno_h_EMULTIHOP" >&5 echo "${ECHO_T}$gl_cv_header_errno_h_EMULTIHOP" >&6; } case $gl_cv_header_errno_h_EMULTIHOP in yes | no) EMULTIHOP_HIDDEN=0; EMULTIHOP_VALUE= ;; *) EMULTIHOP_HIDDEN=1; EMULTIHOP_VALUE="$gl_cv_header_errno_h_EMULTIHOP" ;; esac fi if test -n "$ERRNO_H"; then { echo "$as_me:$LINENO: checking for ENOLINK value" >&5 echo $ECHO_N "checking for ENOLINK value... $ECHO_C" >&6; } if test "${gl_cv_header_errno_h_ENOLINK+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 #ifdef ENOLINK yes #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "yes" >/dev/null 2>&1; then gl_cv_header_errno_h_ENOLINK=yes else gl_cv_header_errno_h_ENOLINK=no fi rm -f conftest* if test $gl_cv_header_errno_h_ENOLINK = no; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define _XOPEN_SOURCE_EXTENDED 1 #include #ifdef ENOLINK yes #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "yes" >/dev/null 2>&1; then gl_cv_header_errno_h_ENOLINK=hidden fi rm -f conftest* if test $gl_cv_header_errno_h_ENOLINK = hidden; then if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define _XOPEN_SOURCE_EXTENDED 1 #include /* The following two lines are a workaround against an autoconf-2.52 bug. */ #include #include int main () { static int test_array [1 - 2 * !((ENOLINK) >= 0)]; test_array [0] = 0 ; 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_lo=0 ac_mid=0 while :; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define _XOPEN_SOURCE_EXTENDED 1 #include /* The following two lines are a workaround against an autoconf-2.52 bug. */ #include #include int main () { static int test_array [1 - 2 * !((ENOLINK) <= $ac_mid)]; test_array [0] = 0 ; 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_hi=$ac_mid; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr $ac_mid + 1` if test $ac_lo -le $ac_mid; then ac_lo= ac_hi= break fi ac_mid=`expr 2 '*' $ac_mid + 1` fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define _XOPEN_SOURCE_EXTENDED 1 #include /* The following two lines are a workaround against an autoconf-2.52 bug. */ #include #include int main () { static int test_array [1 - 2 * !((ENOLINK) < 0)]; test_array [0] = 0 ; 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_hi=-1 ac_mid=-1 while :; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define _XOPEN_SOURCE_EXTENDED 1 #include /* The following two lines are a workaround against an autoconf-2.52 bug. */ #include #include int main () { static int test_array [1 - 2 * !((ENOLINK) >= $ac_mid)]; test_array [0] = 0 ; 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_lo=$ac_mid; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_hi=`expr '(' $ac_mid ')' - 1` if test $ac_mid -le $ac_hi; then ac_lo= ac_hi= break fi ac_mid=`expr 2 '*' $ac_mid` fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo= ac_hi= fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # Binary search between lo and hi bounds. while test "x$ac_lo" != "x$ac_hi"; do ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define _XOPEN_SOURCE_EXTENDED 1 #include /* The following two lines are a workaround against an autoconf-2.52 bug. */ #include #include int main () { static int test_array [1 - 2 * !((ENOLINK) <= $ac_mid)]; test_array [0] = 0 ; 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_hi=$ac_mid else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr '(' $ac_mid ')' + 1` fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in ?*) gl_cv_header_errno_h_ENOLINK=$ac_lo;; '') ;; esac else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define _XOPEN_SOURCE_EXTENDED 1 #include /* The following two lines are a workaround against an autoconf-2.52 bug. */ #include #include static long int longval () { return ENOLINK; } static unsigned long int ulongval () { return ENOLINK; } #include #include int main () { FILE *f = fopen ("conftest.val", "w"); if (! f) return 1; if ((ENOLINK) < 0) { long int i = longval (); if (i != (ENOLINK)) return 1; fprintf (f, "%ld\n", i); } else { unsigned long int i = ulongval (); if (i != (ENOLINK)) return 1; fprintf (f, "%lu\n", i); } return ferror (f) || fclose (f) != 0; ; 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 gl_cv_header_errno_h_ENOLINK=`cat conftest.val` else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.val fi fi fi { echo "$as_me:$LINENO: result: $gl_cv_header_errno_h_ENOLINK" >&5 echo "${ECHO_T}$gl_cv_header_errno_h_ENOLINK" >&6; } case $gl_cv_header_errno_h_ENOLINK in yes | no) ENOLINK_HIDDEN=0; ENOLINK_VALUE= ;; *) ENOLINK_HIDDEN=1; ENOLINK_VALUE="$gl_cv_header_errno_h_ENOLINK" ;; esac fi if test -n "$ERRNO_H"; then { echo "$as_me:$LINENO: checking for EOVERFLOW value" >&5 echo $ECHO_N "checking for EOVERFLOW value... $ECHO_C" >&6; } if test "${gl_cv_header_errno_h_EOVERFLOW+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 #ifdef EOVERFLOW yes #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "yes" >/dev/null 2>&1; then gl_cv_header_errno_h_EOVERFLOW=yes else gl_cv_header_errno_h_EOVERFLOW=no fi rm -f conftest* if test $gl_cv_header_errno_h_EOVERFLOW = no; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define _XOPEN_SOURCE_EXTENDED 1 #include #ifdef EOVERFLOW yes #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "yes" >/dev/null 2>&1; then gl_cv_header_errno_h_EOVERFLOW=hidden fi rm -f conftest* if test $gl_cv_header_errno_h_EOVERFLOW = hidden; then if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define _XOPEN_SOURCE_EXTENDED 1 #include /* The following two lines are a workaround against an autoconf-2.52 bug. */ #include #include int main () { static int test_array [1 - 2 * !((EOVERFLOW) >= 0)]; test_array [0] = 0 ; 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_lo=0 ac_mid=0 while :; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define _XOPEN_SOURCE_EXTENDED 1 #include /* The following two lines are a workaround against an autoconf-2.52 bug. */ #include #include int main () { static int test_array [1 - 2 * !((EOVERFLOW) <= $ac_mid)]; test_array [0] = 0 ; 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_hi=$ac_mid; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr $ac_mid + 1` if test $ac_lo -le $ac_mid; then ac_lo= ac_hi= break fi ac_mid=`expr 2 '*' $ac_mid + 1` fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define _XOPEN_SOURCE_EXTENDED 1 #include /* The following two lines are a workaround against an autoconf-2.52 bug. */ #include #include int main () { static int test_array [1 - 2 * !((EOVERFLOW) < 0)]; test_array [0] = 0 ; 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_hi=-1 ac_mid=-1 while :; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define _XOPEN_SOURCE_EXTENDED 1 #include /* The following two lines are a workaround against an autoconf-2.52 bug. */ #include #include int main () { static int test_array [1 - 2 * !((EOVERFLOW) >= $ac_mid)]; test_array [0] = 0 ; 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_lo=$ac_mid; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_hi=`expr '(' $ac_mid ')' - 1` if test $ac_mid -le $ac_hi; then ac_lo= ac_hi= break fi ac_mid=`expr 2 '*' $ac_mid` fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo= ac_hi= fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # Binary search between lo and hi bounds. while test "x$ac_lo" != "x$ac_hi"; do ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define _XOPEN_SOURCE_EXTENDED 1 #include /* The following two lines are a workaround against an autoconf-2.52 bug. */ #include #include int main () { static int test_array [1 - 2 * !((EOVERFLOW) <= $ac_mid)]; test_array [0] = 0 ; 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_hi=$ac_mid else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr '(' $ac_mid ')' + 1` fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in ?*) gl_cv_header_errno_h_EOVERFLOW=$ac_lo;; '') ;; esac else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define _XOPEN_SOURCE_EXTENDED 1 #include /* The following two lines are a workaround against an autoconf-2.52 bug. */ #include #include static long int longval () { return EOVERFLOW; } static unsigned long int ulongval () { return EOVERFLOW; } #include #include int main () { FILE *f = fopen ("conftest.val", "w"); if (! f) return 1; if ((EOVERFLOW) < 0) { long int i = longval (); if (i != (EOVERFLOW)) return 1; fprintf (f, "%ld\n", i); } else { unsigned long int i = ulongval (); if (i != (EOVERFLOW)) return 1; fprintf (f, "%lu\n", i); } return ferror (f) || fclose (f) != 0; ; 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 gl_cv_header_errno_h_EOVERFLOW=`cat conftest.val` else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.val fi fi fi { echo "$as_me:$LINENO: result: $gl_cv_header_errno_h_EOVERFLOW" >&5 echo "${ECHO_T}$gl_cv_header_errno_h_EOVERFLOW" >&6; } case $gl_cv_header_errno_h_EOVERFLOW in yes | no) EOVERFLOW_HIDDEN=0; EOVERFLOW_VALUE= ;; *) EOVERFLOW_HIDDEN=1; EOVERFLOW_VALUE="$gl_cv_header_errno_h_EOVERFLOW" ;; esac fi { echo "$as_me:$LINENO: checking whether strerror_r is declared" >&5 echo $ECHO_N "checking whether strerror_r is declared... $ECHO_C" >&6; } if test "${ac_cv_have_decl_strerror_r+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 int main () { #ifndef strerror_r (void) strerror_r; #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_cv_have_decl_strerror_r=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_have_decl_strerror_r=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_have_decl_strerror_r" >&5 echo "${ECHO_T}$ac_cv_have_decl_strerror_r" >&6; } if test $ac_cv_have_decl_strerror_r = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_DECL_STRERROR_R 1 _ACEOF else cat >>confdefs.h <<_ACEOF #define HAVE_DECL_STRERROR_R 0 _ACEOF fi for ac_func in strerror_r do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } if { as_var=$as_ac_var; 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. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* 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 $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; 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 eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval echo '${'$as_ac_var'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done { echo "$as_me:$LINENO: checking whether strerror_r returns char *" >&5 echo $ECHO_N "checking whether strerror_r returns char *... $ECHO_C" >&6; } if test "${ac_cv_func_strerror_r_char_p+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_func_strerror_r_char_p=no if test $ac_cv_have_decl_strerror_r = yes; then 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 int main () { char buf[100]; char x = *strerror_r (0, buf, sizeof buf); char *p = strerror_r (0, buf, sizeof buf); return !p || x; ; 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_func_strerror_r_char_p=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 else # strerror_r is not declared. Choose between # systems that have relatively inaccessible declarations for the # function. BeOS and DEC UNIX 4.0 fall in this category, but the # former has a strerror_r that returns char*, while the latter # has a strerror_r that returns `int'. # This test should segfault on the DEC system. 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. */ $ac_includes_default extern char *strerror_r (); int main () { char buf[100]; char x = *strerror_r (0, buf, sizeof buf); return ! isalpha (x); ; 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 ac_cv_func_strerror_r_char_p=yes else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 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_func_strerror_r_char_p" >&5 echo "${ECHO_T}$ac_cv_func_strerror_r_char_p" >&6; } if test $ac_cv_func_strerror_r_char_p = yes; then cat >>confdefs.h <<\_ACEOF #define STRERROR_R_CHAR_P 1 _ACEOF fi XGETTEXT_EXTRA_OPTIONS= GNULIB_OPEN=0; REPLACE_OPEN=0; { echo "$as_me:$LINENO: checking for mbstate_t" >&5 echo $ECHO_N "checking for mbstate_t... $ECHO_C" >&6; } if test "${ac_cv_type_mbstate_t+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 int main () { mbstate_t x; return sizeof x; ; 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_type_mbstate_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_mbstate_t=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_type_mbstate_t" >&5 echo "${ECHO_T}$ac_cv_type_mbstate_t" >&6; } if test $ac_cv_type_mbstate_t = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_MBSTATE_T 1 _ACEOF else cat >>confdefs.h <<\_ACEOF #define mbstate_t int _ACEOF fi for ac_func in $gl_func_list do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } if { as_var=$as_ac_var; 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. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* 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 $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; 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 eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval echo '${'$as_ac_var'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done if test -z "$GETOPT_H"; then for ac_header in getopt.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;} ( cat <<\_ASBOX ## -------------------------------- ## ## Report this to ianb@erislabs.net ## ## -------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&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 else GETOPT_H=getopt.h fi done fi if test -z "$GETOPT_H"; then for ac_func in getopt_long_only do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } if { as_var=$as_ac_var; 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. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* 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 $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; 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 eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval echo '${'$as_ac_var'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF else GETOPT_H=getopt.h fi done fi if test -z "$GETOPT_H"; then { echo "$as_me:$LINENO: checking whether optreset is declared" >&5 echo $ECHO_N "checking whether optreset is declared... $ECHO_C" >&6; } if test "${ac_cv_have_decl_optreset+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 int main () { #ifndef optreset (void) optreset; #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_cv_have_decl_optreset=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_have_decl_optreset=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_have_decl_optreset" >&5 echo "${ECHO_T}$ac_cv_have_decl_optreset" >&6; } if test $ac_cv_have_decl_optreset = yes; then GETOPT_H=getopt.h fi fi if test -z "$GETOPT_H"; then { echo "$as_me:$LINENO: checking for working GNU getopt function" >&5 echo $ECHO_N "checking for working GNU getopt function... $ECHO_C" >&6; } if test "${gl_cv_func_gnu_getopt+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then { echo "$as_me:$LINENO: checking whether getopt_clip is declared" >&5 echo $ECHO_N "checking whether getopt_clip is declared... $ECHO_C" >&6; } if test "${ac_cv_have_decl_getopt_clip+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 int main () { #ifndef getopt_clip (void) getopt_clip; #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_cv_have_decl_getopt_clip=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_have_decl_getopt_clip=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_have_decl_getopt_clip" >&5 echo "${ECHO_T}$ac_cv_have_decl_getopt_clip" >&6; } if test $ac_cv_have_decl_getopt_clip = yes; then gl_cv_func_gnu_getopt=no else gl_cv_func_gnu_getopt=yes fi else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { char *myargv[3]; myargv[0] = "conftest"; myargv[1] = "-+"; myargv[2] = 0; return getopt (2, myargv, "+a") != '?'; ; 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 gl_cv_func_gnu_getopt=yes 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 ) gl_cv_func_gnu_getopt=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { echo "$as_me:$LINENO: result: $gl_cv_func_gnu_getopt" >&5 echo "${ECHO_T}$gl_cv_func_gnu_getopt" >&6; } if test "$gl_cv_func_gnu_getopt" = "no"; then GETOPT_H=getopt.h fi fi { echo "$as_me:$LINENO: checking whether getenv is declared" >&5 echo $ECHO_N "checking whether getenv is declared... $ECHO_C" >&6; } if test "${ac_cv_have_decl_getenv+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 int main () { #ifndef getenv (void) getenv; #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_cv_have_decl_getenv=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_have_decl_getenv=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_have_decl_getenv" >&5 echo "${ECHO_T}$ac_cv_have_decl_getenv" >&6; } if test $ac_cv_have_decl_getenv = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_DECL_GETENV 1 _ACEOF else cat >>confdefs.h <<_ACEOF #define HAVE_DECL_GETENV 0 _ACEOF fi { echo "$as_me:$LINENO: checking for inline" >&5 echo $ECHO_N "checking for inline... $ECHO_C" >&6; } if test "${ac_cv_c_inline+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifndef __cplusplus typedef int foo_t; static $ac_kw foo_t static_foo () {return 0; } $ac_kw foo_t foo () {return 0; } #endif _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_c_inline=$ac_kw 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 test "$ac_cv_c_inline" != no && break done fi { echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 echo "${ECHO_T}$ac_cv_c_inline" >&6; } case $ac_cv_c_inline in inline | yes) ;; *) case $ac_cv_c_inline in no) ac_val=;; *) ac_val=$ac_cv_c_inline;; esac cat >>confdefs.h <<_ACEOF #ifndef __cplusplus #define inline $ac_val #endif _ACEOF ;; esac { echo "$as_me:$LINENO: checking for C/C++ restrict keyword" >&5 echo $ECHO_N "checking for C/C++ restrict keyword... $ECHO_C" >&6; } if test "${ac_cv_c_restrict+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_c_restrict=no # The order here caters to the fact that C++ does not require restrict. for ac_kw in __restrict __restrict__ _Restrict restrict; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ typedef int * int_ptr; int foo (int_ptr $ac_kw ip) { return ip[0]; } int main () { int s[1]; int * $ac_kw t = s; t[0] = 0; return foo(t) ; 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_c_restrict=$ac_kw 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 test "$ac_cv_c_restrict" != no && break done fi { echo "$as_me:$LINENO: result: $ac_cv_c_restrict" >&5 echo "${ECHO_T}$ac_cv_c_restrict" >&6; } case $ac_cv_c_restrict in restrict) ;; no) cat >>confdefs.h <<\_ACEOF #define restrict _ACEOF ;; *) cat >>confdefs.h <<_ACEOF #define restrict $ac_cv_c_restrict _ACEOF ;; esac : if test $gl_cv_have_include_next = yes; then gl_cv_next_sys_time_h='<'sys/time.h'>' else { echo "$as_me:$LINENO: checking absolute name of " >&5 echo $ECHO_N "checking absolute name of ... $ECHO_C" >&6; } if test "${gl_cv_next_sys_time_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test $ac_cv_header_sys_time_h = yes; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF case "$host_os" in aix*) gl_absname_cpp="$ac_cpp -C" ;; *) gl_absname_cpp="$ac_cpp" ;; esac gl_cv_next_sys_time_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | sed -n '\#/sys/time.h#{ s#.*"\(.*/sys/time.h\)".*#\1# s#^/[^/]#//&# p q }'`'"' else gl_cv_next_sys_time_h='<'sys/time.h'>' fi fi { echo "$as_me:$LINENO: result: $gl_cv_next_sys_time_h" >&5 echo "${ECHO_T}$gl_cv_next_sys_time_h" >&6; } fi NEXT_SYS_TIME_H=$gl_cv_next_sys_time_h if test $ac_cv_header_sys_time_h = yes; then HAVE_SYS_TIME_H=1 else HAVE_SYS_TIME_H=0 fi { echo "$as_me:$LINENO: checking for struct timeval" >&5 echo $ECHO_N "checking for struct timeval... $ECHO_C" >&6; } if test "${gl_cv_sys_struct_timeval+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. */ #if HAVE_SYS_TIME_H #include #endif #include int main () { static struct timeval x; x.tv_sec = x.tv_usec; ; 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 gl_cv_sys_struct_timeval=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gl_cv_sys_struct_timeval=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $gl_cv_sys_struct_timeval" >&5 echo "${ECHO_T}$gl_cv_sys_struct_timeval" >&6; } if test $gl_cv_sys_struct_timeval = yes; then HAVE_STRUCT_TIMEVAL=1 else HAVE_STRUCT_TIMEVAL=0 fi REPLACE_GETTIMEOFDAY=0 if test $HAVE_SYS_TIME_H = 0 || test $HAVE_STRUCT_TIMEVAL = 0; then SYS_TIME_H=sys/time.h else SYS_TIME_H= fi { echo "$as_me:$LINENO: checking for long long int" >&5 echo $ECHO_N "checking for long long int... $ECHO_C" >&6; } if test "${ac_cv_type_long_long_int+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. */ /* For now, do not test the preprocessor; as of 2007 there are too many implementations with broken preprocessors. Perhaps this can be revisited in 2012. In the meantime, code should not expect #if to work with literals wider than 32 bits. */ /* Test literals. */ long long int ll = 9223372036854775807ll; long long int nll = -9223372036854775807LL; unsigned long long int ull = 18446744073709551615ULL; /* Test constant expressions. */ typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll) ? 1 : -1)]; typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1 ? 1 : -1)]; int i = 63; int main () { /* Test availability of runtime routines for shift and division. */ long long int llmax = 9223372036854775807ll; unsigned long long int ullmax = 18446744073709551615ull; return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i) | (llmax / ll) | (llmax % ll) | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i) | (ullmax / ull) | (ullmax % ull)); ; 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 if test "$cross_compiling" = yes; then ac_cv_type_long_long_int=yes else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #ifndef LLONG_MAX # define HALF \ (1LL << (sizeof (long long int) * CHAR_BIT - 2)) # define LLONG_MAX (HALF - 1 + HALF) #endif int main () { long long int n = 1; int i; for (i = 0; ; i++) { long long int m = n << i; if (m >> i != n) return 1; if (LLONG_MAX / 2 < m) break; } return 0; ; 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 ac_cv_type_long_long_int=yes 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_type_long_long_int=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_long_long_int=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_type_long_long_int" >&5 echo "${ECHO_T}$ac_cv_type_long_long_int" >&6; } if test $ac_cv_type_long_long_int = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_LONG_LONG_INT 1 _ACEOF fi { echo "$as_me:$LINENO: checking for unsigned long long int" >&5 echo $ECHO_N "checking for unsigned long long int... $ECHO_C" >&6; } if test "${ac_cv_type_unsigned_long_long_int+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. */ /* For now, do not test the preprocessor; as of 2007 there are too many implementations with broken preprocessors. Perhaps this can be revisited in 2012. In the meantime, code should not expect #if to work with literals wider than 32 bits. */ /* Test literals. */ long long int ll = 9223372036854775807ll; long long int nll = -9223372036854775807LL; unsigned long long int ull = 18446744073709551615ULL; /* Test constant expressions. */ typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll) ? 1 : -1)]; typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1 ? 1 : -1)]; int i = 63; int main () { /* Test availability of runtime routines for shift and division. */ long long int llmax = 9223372036854775807ll; unsigned long long int ullmax = 18446744073709551615ull; return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i) | (llmax / ll) | (llmax % ll) | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i) | (ullmax / ull) | (ullmax % ull)); ; 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_type_unsigned_long_long_int=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_unsigned_long_long_int=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_type_unsigned_long_long_int" >&5 echo "${ECHO_T}$ac_cv_type_unsigned_long_long_int" >&6; } if test $ac_cv_type_unsigned_long_long_int = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_UNSIGNED_LONG_LONG_INT 1 _ACEOF fi gl_cv_c_multiarch=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifndef __APPLE_CC__ not a universal capable compiler #endif typedef int dummy; _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 arch= prev= for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do if test -n "$prev"; then case $word in i?86 | x86_64 | ppc | ppc64) if test -z "$arch" || test "$arch" = "$word"; then arch="$word" else gl_cv_c_multiarch=yes fi ;; esac prev= else if test "x$word" = "x-arch"; then prev=arch fi fi done 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 if test $gl_cv_c_multiarch = yes; then cat >>confdefs.h <<\_ACEOF #define AA_APPLE_UNIVERSAL_BUILD 1 _ACEOF APPLE_UNIVERSAL_BUILD=1 else APPLE_UNIVERSAL_BUILD=0 fi if test $ac_cv_type_long_long_int = yes; then HAVE_LONG_LONG_INT=1 else HAVE_LONG_LONG_INT=0 fi if test $ac_cv_type_unsigned_long_long_int = yes; then HAVE_UNSIGNED_LONG_LONG_INT=1 else HAVE_UNSIGNED_LONG_LONG_INT=0 fi if test $ac_cv_header_inttypes_h = yes; then HAVE_INTTYPES_H=1 else HAVE_INTTYPES_H=0 fi if test $ac_cv_header_sys_types_h = yes; then HAVE_SYS_TYPES_H=1 else HAVE_SYS_TYPES_H=0 fi : if test $gl_cv_have_include_next = yes; then gl_cv_next_stdint_h='<'stdint.h'>' else { echo "$as_me:$LINENO: checking absolute name of " >&5 echo $ECHO_N "checking absolute name of ... $ECHO_C" >&6; } if test "${gl_cv_next_stdint_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test $ac_cv_header_stdint_h = yes; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF case "$host_os" in aix*) gl_absname_cpp="$ac_cpp -C" ;; *) gl_absname_cpp="$ac_cpp" ;; esac gl_cv_next_stdint_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | sed -n '\#/stdint.h#{ s#.*"\(.*/stdint.h\)".*#\1# s#^/[^/]#//&# p q }'`'"' else gl_cv_next_stdint_h='<'stdint.h'>' fi fi { echo "$as_me:$LINENO: result: $gl_cv_next_stdint_h" >&5 echo "${ECHO_T}$gl_cv_next_stdint_h" >&6; } fi NEXT_STDINT_H=$gl_cv_next_stdint_h if test $ac_cv_header_stdint_h = yes; then HAVE_STDINT_H=1 else HAVE_STDINT_H=0 fi if test $ac_cv_header_stdint_h = yes; then { echo "$as_me:$LINENO: checking whether stdint.h conforms to C99" >&5 echo $ECHO_N "checking whether stdint.h conforms to C99... $ECHO_C" >&6; } if test "${gl_cv_header_working_stdint_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else gl_cv_header_working_stdint_h=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */ #define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */ #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */ #include /* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in . */ #if !(defined WCHAR_MIN && defined WCHAR_MAX) #error "WCHAR_MIN, WCHAR_MAX not defined in " #endif /* BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #if HAVE_WCHAR_H # include # include # include #endif #ifdef INT8_MAX int8_t a1 = INT8_MAX; int8_t a1min = INT8_MIN; #endif #ifdef INT16_MAX int16_t a2 = INT16_MAX; int16_t a2min = INT16_MIN; #endif #ifdef INT32_MAX int32_t a3 = INT32_MAX; int32_t a3min = INT32_MIN; #endif #ifdef INT64_MAX int64_t a4 = INT64_MAX; int64_t a4min = INT64_MIN; #endif #ifdef UINT8_MAX uint8_t b1 = UINT8_MAX; #else typedef int b1[(unsigned char) -1 != 255 ? 1 : -1]; #endif #ifdef UINT16_MAX uint16_t b2 = UINT16_MAX; #endif #ifdef UINT32_MAX uint32_t b3 = UINT32_MAX; #endif #ifdef UINT64_MAX uint64_t b4 = UINT64_MAX; #endif int_least8_t c1 = INT8_C (0x7f); int_least8_t c1max = INT_LEAST8_MAX; int_least8_t c1min = INT_LEAST8_MIN; int_least16_t c2 = INT16_C (0x7fff); int_least16_t c2max = INT_LEAST16_MAX; int_least16_t c2min = INT_LEAST16_MIN; int_least32_t c3 = INT32_C (0x7fffffff); int_least32_t c3max = INT_LEAST32_MAX; int_least32_t c3min = INT_LEAST32_MIN; int_least64_t c4 = INT64_C (0x7fffffffffffffff); int_least64_t c4max = INT_LEAST64_MAX; int_least64_t c4min = INT_LEAST64_MIN; uint_least8_t d1 = UINT8_C (0xff); uint_least8_t d1max = UINT_LEAST8_MAX; uint_least16_t d2 = UINT16_C (0xffff); uint_least16_t d2max = UINT_LEAST16_MAX; uint_least32_t d3 = UINT32_C (0xffffffff); uint_least32_t d3max = UINT_LEAST32_MAX; uint_least64_t d4 = UINT64_C (0xffffffffffffffff); uint_least64_t d4max = UINT_LEAST64_MAX; int_fast8_t e1 = INT_FAST8_MAX; int_fast8_t e1min = INT_FAST8_MIN; int_fast16_t e2 = INT_FAST16_MAX; int_fast16_t e2min = INT_FAST16_MIN; int_fast32_t e3 = INT_FAST32_MAX; int_fast32_t e3min = INT_FAST32_MIN; int_fast64_t e4 = INT_FAST64_MAX; int_fast64_t e4min = INT_FAST64_MIN; uint_fast8_t f1 = UINT_FAST8_MAX; uint_fast16_t f2 = UINT_FAST16_MAX; uint_fast32_t f3 = UINT_FAST32_MAX; uint_fast64_t f4 = UINT_FAST64_MAX; #ifdef INTPTR_MAX intptr_t g = INTPTR_MAX; intptr_t gmin = INTPTR_MIN; #endif #ifdef UINTPTR_MAX uintptr_t h = UINTPTR_MAX; #endif intmax_t i = INTMAX_MAX; uintmax_t j = UINTMAX_MAX; #include /* for CHAR_BIT */ #define TYPE_MINIMUM(t) \ ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ (t) 0 << (sizeof (t) * CHAR_BIT - 1))) #define TYPE_MAXIMUM(t) \ ((t) ((t) 0 < (t) -1 ? (t) -1 : ~ (~ (t) 0 << (sizeof (t) * CHAR_BIT - 1)))) struct s { int check_PTRDIFF: PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t) && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t) ? 1 : -1; /* Detect bug in FreeBSD 6.0 / ia64. */ int check_SIG_ATOMIC: SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t) && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t) ? 1 : -1; int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1; int check_WCHAR: WCHAR_MIN == TYPE_MINIMUM (wchar_t) && WCHAR_MAX == TYPE_MAXIMUM (wchar_t) ? 1 : -1; /* Detect bug in mingw. */ int check_WINT: WINT_MIN == TYPE_MINIMUM (wint_t) && WINT_MAX == TYPE_MAXIMUM (wint_t) ? 1 : -1; /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */ int check_UINT8_C: (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1; int check_UINT16_C: (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1; /* Detect bugs in OpenBSD 3.9 stdint.h. */ #ifdef UINT8_MAX int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1; #endif #ifdef UINT16_MAX int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1; #endif #ifdef UINT32_MAX int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1; #endif #ifdef UINT64_MAX int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1; #endif int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1; int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1; int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1; int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1; int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1; int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1; int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1; int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1; int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1; int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1; int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1; }; 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 gl_cv_header_working_stdint_h=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 { echo "$as_me:$LINENO: result: $gl_cv_header_working_stdint_h" >&5 echo "${ECHO_T}$gl_cv_header_working_stdint_h" >&6; } fi if test "$gl_cv_header_working_stdint_h" = yes; then STDINT_H= else for ac_header in sys/inttypes.h sys/bitypes.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;} ( cat <<\_ASBOX ## -------------------------------- ## ## Report this to ianb@erislabs.net ## ## -------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&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 if test $ac_cv_header_sys_inttypes_h = yes; then HAVE_SYS_INTTYPES_H=1 else HAVE_SYS_INTTYPES_H=0 fi if test $ac_cv_header_sys_bitypes_h = yes; then HAVE_SYS_BITYPES_H=1 else HAVE_SYS_BITYPES_H=0 fi : if test $APPLE_UNIVERSAL_BUILD = 0; then for gltype in ptrdiff_t size_t ; do { echo "$as_me:$LINENO: checking for bit size of $gltype" >&5 echo $ECHO_N "checking for bit size of $gltype... $ECHO_C" >&6; } if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #if HAVE_WCHAR_H # include # include # include #endif #include int main () { static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) >= 0)]; test_array [0] = 0 ; 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_lo=0 ac_mid=0 while :; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #if HAVE_WCHAR_H # include # include # include #endif #include int main () { static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) <= $ac_mid)]; test_array [0] = 0 ; 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_hi=$ac_mid; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr $ac_mid + 1` if test $ac_lo -le $ac_mid; then ac_lo= ac_hi= break fi ac_mid=`expr 2 '*' $ac_mid + 1` fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #if HAVE_WCHAR_H # include # include # include #endif #include int main () { static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) < 0)]; test_array [0] = 0 ; 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_hi=-1 ac_mid=-1 while :; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #if HAVE_WCHAR_H # include # include # include #endif #include int main () { static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) >= $ac_mid)]; test_array [0] = 0 ; 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_lo=$ac_mid; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_hi=`expr '(' $ac_mid ')' - 1` if test $ac_mid -le $ac_hi; then ac_lo= ac_hi= break fi ac_mid=`expr 2 '*' $ac_mid` fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo= ac_hi= fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # Binary search between lo and hi bounds. while test "x$ac_lo" != "x$ac_hi"; do ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #if HAVE_WCHAR_H # include # include # include #endif #include int main () { static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) <= $ac_mid)]; test_array [0] = 0 ; 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_hi=$ac_mid else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr '(' $ac_mid ')' + 1` fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in ?*) result=$ac_lo;; '') result=unknown ;; esac else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #if HAVE_WCHAR_H # include # include # include #endif #include static long int longval () { return sizeof ($gltype) * CHAR_BIT; } static unsigned long int ulongval () { return sizeof ($gltype) * CHAR_BIT; } #include #include int main () { FILE *f = fopen ("conftest.val", "w"); if (! f) return 1; if ((sizeof ($gltype) * CHAR_BIT) < 0) { long int i = longval (); if (i != (sizeof ($gltype) * CHAR_BIT)) return 1; fprintf (f, "%ld\n", i); } else { unsigned long int i = ulongval (); if (i != (sizeof ($gltype) * CHAR_BIT)) return 1; fprintf (f, "%lu\n", i); } return ferror (f) || fclose (f) != 0; ; 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 result=`cat conftest.val` 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 ) result=unknown fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.val eval gl_cv_bitsizeof_${gltype}=\$result fi ac_res=`eval echo '${'gl_cv_bitsizeof_${gltype}'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } eval result=\$gl_cv_bitsizeof_${gltype} if test $result = unknown; then result=0 fi GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` cat >>confdefs.h <<_ACEOF #define BITSIZEOF_${GLTYPE} $result _ACEOF eval BITSIZEOF_${GLTYPE}=\$result done fi for gltype in sig_atomic_t wchar_t wint_t ; do { echo "$as_me:$LINENO: checking for bit size of $gltype" >&5 echo $ECHO_N "checking for bit size of $gltype... $ECHO_C" >&6; } if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #if HAVE_WCHAR_H # include # include # include #endif #include int main () { static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) >= 0)]; test_array [0] = 0 ; 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_lo=0 ac_mid=0 while :; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #if HAVE_WCHAR_H # include # include # include #endif #include int main () { static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) <= $ac_mid)]; test_array [0] = 0 ; 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_hi=$ac_mid; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr $ac_mid + 1` if test $ac_lo -le $ac_mid; then ac_lo= ac_hi= break fi ac_mid=`expr 2 '*' $ac_mid + 1` fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #if HAVE_WCHAR_H # include # include # include #endif #include int main () { static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) < 0)]; test_array [0] = 0 ; 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_hi=-1 ac_mid=-1 while :; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #if HAVE_WCHAR_H # include # include # include #endif #include int main () { static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) >= $ac_mid)]; test_array [0] = 0 ; 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_lo=$ac_mid; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_hi=`expr '(' $ac_mid ')' - 1` if test $ac_mid -le $ac_hi; then ac_lo= ac_hi= break fi ac_mid=`expr 2 '*' $ac_mid` fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo= ac_hi= fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # Binary search between lo and hi bounds. while test "x$ac_lo" != "x$ac_hi"; do ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #if HAVE_WCHAR_H # include # include # include #endif #include int main () { static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) <= $ac_mid)]; test_array [0] = 0 ; 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_hi=$ac_mid else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr '(' $ac_mid ')' + 1` fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in ?*) result=$ac_lo;; '') result=unknown ;; esac else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #if HAVE_WCHAR_H # include # include # include #endif #include static long int longval () { return sizeof ($gltype) * CHAR_BIT; } static unsigned long int ulongval () { return sizeof ($gltype) * CHAR_BIT; } #include #include int main () { FILE *f = fopen ("conftest.val", "w"); if (! f) return 1; if ((sizeof ($gltype) * CHAR_BIT) < 0) { long int i = longval (); if (i != (sizeof ($gltype) * CHAR_BIT)) return 1; fprintf (f, "%ld\n", i); } else { unsigned long int i = ulongval (); if (i != (sizeof ($gltype) * CHAR_BIT)) return 1; fprintf (f, "%lu\n", i); } return ferror (f) || fclose (f) != 0; ; 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 result=`cat conftest.val` 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 ) result=unknown fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.val eval gl_cv_bitsizeof_${gltype}=\$result fi ac_res=`eval echo '${'gl_cv_bitsizeof_${gltype}'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } eval result=\$gl_cv_bitsizeof_${gltype} if test $result = unknown; then result=0 fi GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` cat >>confdefs.h <<_ACEOF #define BITSIZEOF_${GLTYPE} $result _ACEOF eval BITSIZEOF_${GLTYPE}=\$result done for gltype in sig_atomic_t wchar_t wint_t ; do { echo "$as_me:$LINENO: checking whether $gltype is signed" >&5 echo $ECHO_N "checking whether $gltype is signed... $ECHO_C" >&6; } if { as_var=gl_cv_type_${gltype}_signed; 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. */ /* BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #if HAVE_WCHAR_H # include # include # include #endif int verify[2 * (($gltype) -1 < ($gltype) 0) - 1]; 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 result=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 result=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext eval gl_cv_type_${gltype}_signed=\$result fi ac_res=`eval echo '${'gl_cv_type_${gltype}_signed'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } eval result=\$gl_cv_type_${gltype}_signed GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` if test "$result" = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_SIGNED_${GLTYPE} 1 _ACEOF eval HAVE_SIGNED_${GLTYPE}=1 else eval HAVE_SIGNED_${GLTYPE}=0 fi done gl_cv_type_ptrdiff_t_signed=yes gl_cv_type_size_t_signed=no if test $APPLE_UNIVERSAL_BUILD = 0; then for gltype in ptrdiff_t size_t ; do { echo "$as_me:$LINENO: checking for $gltype integer literal suffix" >&5 echo $ECHO_N "checking for $gltype integer literal suffix... $ECHO_C" >&6; } if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval gl_cv_type_${gltype}_suffix=no eval result=\$gl_cv_type_${gltype}_signed if test "$result" = yes; then glsufu= else glsufu=u fi for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do case $glsuf in '') gltype1='int';; l) gltype1='long int';; ll) gltype1='long long int';; i64) gltype1='__int64';; u) gltype1='unsigned int';; ul) gltype1='unsigned long int';; ull) gltype1='unsigned long long int';; ui64)gltype1='unsigned __int64';; esac cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #if HAVE_WCHAR_H # include # include # include #endif extern $gltype foo; extern $gltype1 foo; 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 eval gl_cv_type_${gltype}_suffix=\$glsuf 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 eval result=\$gl_cv_type_${gltype}_suffix test "$result" != no && break done fi ac_res=`eval echo '${'gl_cv_type_${gltype}_suffix'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` eval result=\$gl_cv_type_${gltype}_suffix test "$result" = no && result= eval ${GLTYPE}_SUFFIX=\$result cat >>confdefs.h <<_ACEOF #define ${GLTYPE}_SUFFIX $result _ACEOF done fi for gltype in sig_atomic_t wchar_t wint_t ; do { echo "$as_me:$LINENO: checking for $gltype integer literal suffix" >&5 echo $ECHO_N "checking for $gltype integer literal suffix... $ECHO_C" >&6; } if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval gl_cv_type_${gltype}_suffix=no eval result=\$gl_cv_type_${gltype}_signed if test "$result" = yes; then glsufu= else glsufu=u fi for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do case $glsuf in '') gltype1='int';; l) gltype1='long int';; ll) gltype1='long long int';; i64) gltype1='__int64';; u) gltype1='unsigned int';; ul) gltype1='unsigned long int';; ull) gltype1='unsigned long long int';; ui64)gltype1='unsigned __int64';; esac cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #if HAVE_WCHAR_H # include # include # include #endif extern $gltype foo; extern $gltype1 foo; 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 eval gl_cv_type_${gltype}_suffix=\$glsuf 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 eval result=\$gl_cv_type_${gltype}_suffix test "$result" != no && break done fi ac_res=`eval echo '${'gl_cv_type_${gltype}_suffix'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` eval result=\$gl_cv_type_${gltype}_suffix test "$result" = no && result= eval ${GLTYPE}_SUFFIX=\$result cat >>confdefs.h <<_ACEOF #define ${GLTYPE}_SUFFIX $result _ACEOF done STDINT_H=stdint.h fi for ac_header in inttypes.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;} ( cat <<\_ASBOX ## -------------------------------- ## ## Report this to ianb@erislabs.net ## ## -------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&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 if test $ac_cv_header_inttypes_h = yes; then { echo "$as_me:$LINENO: checking whether the inttypes.h PRIxNN macros are broken" >&5 echo $ECHO_N "checking whether the inttypes.h PRIxNN macros are broken... $ECHO_C" >&6; } if test "${gt_cv_inttypes_pri_broken+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 #ifdef PRId32 char *p = PRId32; #endif 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 gt_cv_inttypes_pri_broken=no else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gt_cv_inttypes_pri_broken=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $gt_cv_inttypes_pri_broken" >&5 echo "${ECHO_T}$gt_cv_inttypes_pri_broken" >&6; } fi if test "$gt_cv_inttypes_pri_broken" = yes; then cat >>confdefs.h <<_ACEOF #define PRI_MACROS_BROKEN 1 _ACEOF PRI_MACROS_BROKEN=1 else PRI_MACROS_BROKEN=0 fi { echo "$as_me:$LINENO: checking whether imaxabs is declared" >&5 echo $ECHO_N "checking whether imaxabs is declared... $ECHO_C" >&6; } if test "${ac_cv_have_decl_imaxabs+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 int main () { #ifndef imaxabs (void) imaxabs; #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_cv_have_decl_imaxabs=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_have_decl_imaxabs=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_have_decl_imaxabs" >&5 echo "${ECHO_T}$ac_cv_have_decl_imaxabs" >&6; } if test $ac_cv_have_decl_imaxabs = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_DECL_IMAXABS 1 _ACEOF else cat >>confdefs.h <<_ACEOF #define HAVE_DECL_IMAXABS 0 _ACEOF fi { echo "$as_me:$LINENO: checking whether imaxdiv is declared" >&5 echo $ECHO_N "checking whether imaxdiv is declared... $ECHO_C" >&6; } if test "${ac_cv_have_decl_imaxdiv+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 int main () { #ifndef imaxdiv (void) imaxdiv; #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_cv_have_decl_imaxdiv=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_have_decl_imaxdiv=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_have_decl_imaxdiv" >&5 echo "${ECHO_T}$ac_cv_have_decl_imaxdiv" >&6; } if test $ac_cv_have_decl_imaxdiv = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_DECL_IMAXDIV 1 _ACEOF else cat >>confdefs.h <<_ACEOF #define HAVE_DECL_IMAXDIV 0 _ACEOF fi { echo "$as_me:$LINENO: checking whether strtoimax is declared" >&5 echo $ECHO_N "checking whether strtoimax is declared... $ECHO_C" >&6; } if test "${ac_cv_have_decl_strtoimax+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 int main () { #ifndef strtoimax (void) strtoimax; #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_cv_have_decl_strtoimax=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_have_decl_strtoimax=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_have_decl_strtoimax" >&5 echo "${ECHO_T}$ac_cv_have_decl_strtoimax" >&6; } if test $ac_cv_have_decl_strtoimax = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_DECL_STRTOIMAX 1 _ACEOF else cat >>confdefs.h <<_ACEOF #define HAVE_DECL_STRTOIMAX 0 _ACEOF fi { echo "$as_me:$LINENO: checking whether strtoumax is declared" >&5 echo $ECHO_N "checking whether strtoumax is declared... $ECHO_C" >&6; } if test "${ac_cv_have_decl_strtoumax+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 int main () { #ifndef strtoumax (void) strtoumax; #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_cv_have_decl_strtoumax=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_have_decl_strtoumax=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_have_decl_strtoumax" >&5 echo "${ECHO_T}$ac_cv_have_decl_strtoumax" >&6; } if test $ac_cv_have_decl_strtoumax = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_DECL_STRTOUMAX 1 _ACEOF else cat >>confdefs.h <<_ACEOF #define HAVE_DECL_STRTOUMAX 0 _ACEOF fi GNULIB_IMAXABS=0; GNULIB_IMAXDIV=0; GNULIB_STRTOIMAX=0; GNULIB_STRTOUMAX=0; HAVE_DECL_IMAXABS=1; HAVE_DECL_IMAXDIV=1; HAVE_DECL_STRTOIMAX=1; HAVE_DECL_STRTOUMAX=1; { echo "$as_me:$LINENO: checking for nl_langinfo and CODESET" >&5 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6; } if test "${am_cv_langinfo_codeset+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 int main () { char* cs = nl_langinfo(CODESET); return !cs; ; 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 am_cv_langinfo_codeset=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 am_cv_langinfo_codeset=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $am_cv_langinfo_codeset" >&5 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6; } if test $am_cv_langinfo_codeset = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_LANGINFO_CODESET 1 _ACEOF fi { echo "$as_me:$LINENO: checking whether getc_unlocked is declared" >&5 echo $ECHO_N "checking whether getc_unlocked is declared... $ECHO_C" >&6; } if test "${ac_cv_have_decl_getc_unlocked+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 int main () { #ifndef getc_unlocked (void) getc_unlocked; #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_cv_have_decl_getc_unlocked=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_have_decl_getc_unlocked=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_have_decl_getc_unlocked" >&5 echo "${ECHO_T}$ac_cv_have_decl_getc_unlocked" >&6; } if test $ac_cv_have_decl_getc_unlocked = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_DECL_GETC_UNLOCKED 1 _ACEOF else cat >>confdefs.h <<_ACEOF #define HAVE_DECL_GETC_UNLOCKED 0 _ACEOF fi { echo "$as_me:$LINENO: checking whether we are using the GNU C Library 2.1 or newer" >&5 echo $ECHO_N "checking whether we are using the GNU C Library 2.1 or newer... $ECHO_C" >&6; } if test "${ac_cv_gnu_library_2_1+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 #ifdef __GNU_LIBRARY__ #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2) Lucky GNU user #endif #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "Lucky GNU user" >/dev/null 2>&1; then ac_cv_gnu_library_2_1=yes else ac_cv_gnu_library_2_1=no fi rm -f conftest* fi { echo "$as_me:$LINENO: result: $ac_cv_gnu_library_2_1" >&5 echo "${ECHO_T}$ac_cv_gnu_library_2_1" >&6; } GLIBC21="$ac_cv_gnu_library_2_1" GNULIB_LCHMOD=0; GNULIB_LSTAT=0; HAVE_LCHMOD=1; REPLACE_LSTAT=0; REPLACE_MKDIR=0; { echo "$as_me:$LINENO: checking whether malloc, realloc, calloc are POSIX compliant" >&5 echo $ECHO_N "checking whether malloc, realloc, calloc are POSIX compliant... $ECHO_C" >&6; } if test "${gl_cv_func_malloc_posix+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 () { #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ 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 gl_cv_func_malloc_posix=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gl_cv_func_malloc_posix=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $gl_cv_func_malloc_posix" >&5 echo "${ECHO_T}$gl_cv_func_malloc_posix" >&6; } GNULIB_MALLOC_POSIX=0; GNULIB_REALLOC_POSIX=0; GNULIB_CALLOC_POSIX=0; GNULIB_ATOLL=0; GNULIB_GETLOADAVG=0; GNULIB_GETSUBOPT=0; GNULIB_MKDTEMP=0; GNULIB_MKSTEMP=0; GNULIB_PUTENV=0; GNULIB_RANDOM_R=0; GNULIB_RPMATCH=0; GNULIB_SETENV=0; GNULIB_STRTOD=0; GNULIB_STRTOLL=0; GNULIB_STRTOULL=0; GNULIB_UNSETENV=0; HAVE_ATOLL=1; HAVE_CALLOC_POSIX=1; HAVE_GETSUBOPT=1; HAVE_MALLOC_POSIX=1; HAVE_MKDTEMP=1; HAVE_REALLOC_POSIX=1; HAVE_RANDOM_R=1; HAVE_RPMATCH=1; HAVE_SETENV=1; HAVE_STRTOD=1; HAVE_STRTOLL=1; HAVE_STRTOULL=1; HAVE_STRUCT_RANDOM_DATA=1; HAVE_SYS_LOADAVG_H=0; HAVE_UNSETENV=1; HAVE_DECL_GETLOADAVG=1; REPLACE_MKSTEMP=0; REPLACE_PUTENV=0; REPLACE_STRTOD=0; VOID_UNSETENV=0; for ac_header in stdlib.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;} ( cat <<\_ASBOX ## -------------------------------- ## ## Report this to ianb@erislabs.net ## ## -------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&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 { echo "$as_me:$LINENO: checking for GNU libc compatible malloc" >&5 echo $ECHO_N "checking for GNU libc compatible malloc... $ECHO_C" >&6; } if test "${ac_cv_func_malloc_0_nonnull+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then ac_cv_func_malloc_0_nonnull=no else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #if defined STDC_HEADERS || defined HAVE_STDLIB_H # include #else char *malloc (); #endif int main () { return ! malloc (0); ; 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 ac_cv_func_malloc_0_nonnull=yes 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_func_malloc_0_nonnull=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { echo "$as_me:$LINENO: result: $ac_cv_func_malloc_0_nonnull" >&5 echo "${ECHO_T}$ac_cv_func_malloc_0_nonnull" >&6; } if test $ac_cv_func_malloc_0_nonnull = yes; then gl_cv_func_malloc_0_nonnull=1 else gl_cv_func_malloc_0_nonnull=0 fi cat >>confdefs.h <<_ACEOF #define MALLOC_0_IS_NONNULL $gl_cv_func_malloc_0_nonnull _ACEOF GNULIB_BTOWC=0; GNULIB_WCTOB=0; GNULIB_MBSINIT=0; GNULIB_MBRTOWC=0; GNULIB_MBRLEN=0; GNULIB_MBSRTOWCS=0; GNULIB_MBSNRTOWCS=0; GNULIB_WCRTOMB=0; GNULIB_WCSRTOMBS=0; GNULIB_WCSNRTOMBS=0; GNULIB_WCWIDTH=0; HAVE_BTOWC=1; HAVE_MBSINIT=1; HAVE_MBRTOWC=1; HAVE_MBRLEN=1; HAVE_MBSRTOWCS=1; HAVE_MBSNRTOWCS=1; HAVE_WCRTOMB=1; HAVE_WCSRTOMBS=1; HAVE_WCSNRTOMBS=1; HAVE_DECL_WCTOB=1; HAVE_DECL_WCWIDTH=1; REPLACE_MBSTATE_T=0; REPLACE_BTOWC=0; REPLACE_WCTOB=0; REPLACE_MBSINIT=0; REPLACE_MBRTOWC=0; REPLACE_MBRLEN=0; REPLACE_MBSRTOWCS=0; REPLACE_MBSNRTOWCS=0; REPLACE_WCRTOMB=0; REPLACE_WCSRTOMBS=0; REPLACE_WCWIDTH=0; WCHAR_H=''; { echo "$as_me:$LINENO: checking for a traditional japanese locale" >&5 echo $ECHO_N "checking for a traditional japanese locale... $ECHO_C" >&6; } if test "${gt_cv_locale_ja+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 #if HAVE_LANGINFO_CODESET # include #endif #include #include struct tm t; char buf[16]; int main () { const char *p; /* Check whether the given locale name is recognized by the system. */ if (setlocale (LC_ALL, "") == NULL) return 1; /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) is empty, and the behaviour of Tcl 8.4 in this locale is not useful. On OpenBSD 4.0, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "646". In this situation, some unit tests fail. */ #if HAVE_LANGINFO_CODESET { const char *cs = nl_langinfo (CODESET); if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0) return 1; } #endif #ifdef __CYGWIN__ /* On Cygwin, avoid locale names without encoding suffix, because the locale_charset() function relies on the encoding suffix. Note that LC_ALL is set on the command line. */ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; #endif /* Check whether MB_CUR_MAX is > 1. This excludes the dysfunctional locales on Cygwin 1.5.x. */ if (MB_CUR_MAX == 1) return 1; /* Check whether in a month name, no byte in the range 0x80..0x9F occurs. This excludes the UTF-8 encoding. */ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1; for (p = buf; *p != '\0'; p++) if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0) return 1; return 0; } _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest$ac_exeext; then # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the # configure script would override the LC_ALL setting. Likewise for # LC_CTYPE, which is also set at the beginning of the configure script. # Test for the AIX locale name. if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_ja=ja_JP else # Test for the locale name with explicit encoding suffix. if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_ja=ja_JP.EUC-JP else # Test for the HP-UX, OSF/1, NetBSD locale name. if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_ja=ja_JP.eucJP else # Test for the IRIX, FreeBSD locale name. if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_ja=ja_JP.EUC else # Test for the Solaris 7 locale name. if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_ja=ja else # Special test for NetBSD 1.6. if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then gt_cv_locale_ja=ja_JP.eucJP else # None found. gt_cv_locale_ja=none fi fi fi fi fi fi fi rm -fr conftest* fi { echo "$as_me:$LINENO: result: $gt_cv_locale_ja" >&5 echo "${ECHO_T}$gt_cv_locale_ja" >&6; } LOCALE_JA=$gt_cv_locale_ja { echo "$as_me:$LINENO: checking for a french Unicode locale" >&5 echo $ECHO_N "checking for a french Unicode locale... $ECHO_C" >&6; } if test "${gt_cv_locale_fr_utf8+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 #if HAVE_LANGINFO_CODESET # include #endif #include #include struct tm t; char buf[16]; int main () { /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl imitates locale dependent behaviour by looking at the environment variables, and all locales use the UTF-8 encoding. */ #if !(defined __BEOS__ || defined __HAIKU__) /* Check whether the given locale name is recognized by the system. */ if (setlocale (LC_ALL, "") == NULL) return 1; /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) is empty, and the behaviour of Tcl 8.4 in this locale is not useful. On OpenBSD 4.0, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "646". In this situation, some unit tests fail. */ # if HAVE_LANGINFO_CODESET { const char *cs = nl_langinfo (CODESET); if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0) return 1; } # endif # ifdef __CYGWIN__ /* On Cygwin, avoid locale names without encoding suffix, because the locale_charset() function relies on the encoding suffix. Note that LC_ALL is set on the command line. */ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; # endif /* Check whether in the abbreviation of the second month, the second character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is two bytes long, with UTF-8 encoding. */ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; if (strftime (buf, sizeof (buf), "%b", &t) < 4 || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v') return 1; #endif /* Check whether the decimal separator is a comma. On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point are nl_langinfo(RADIXCHAR) are both ".". */ if (localeconv () ->decimal_point[0] != ',') return 1; return 0; } _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest$ac_exeext; then # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the # configure script would override the LC_ALL setting. Likewise for # LC_CTYPE, which is also set at the beginning of the configure script. # Test for the usual locale name. if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr_utf8=fr_FR else # Test for the locale name with explicit encoding suffix. if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr_utf8=fr_FR.UTF-8 else # Test for the Solaris 7 locale name. if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr_utf8=fr.UTF-8 else # None found. gt_cv_locale_fr_utf8=none fi fi fi fi rm -fr conftest* fi { echo "$as_me:$LINENO: result: $gt_cv_locale_fr_utf8" >&5 echo "${ECHO_T}$gt_cv_locale_fr_utf8" >&6; } LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8 { echo "$as_me:$LINENO: checking for a transitional chinese locale" >&5 echo $ECHO_N "checking for a transitional chinese locale... $ECHO_C" >&6; } if test "${gt_cv_locale_zh_CN+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 #if HAVE_LANGINFO_CODESET # include #endif #include #include struct tm t; char buf[16]; int main () { const char *p; /* Check whether the given locale name is recognized by the system. */ if (setlocale (LC_ALL, "") == NULL) return 1; /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) is empty, and the behaviour of Tcl 8.4 in this locale is not useful. On OpenBSD 4.0, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "646". In this situation, some unit tests fail. */ #if HAVE_LANGINFO_CODESET { const char *cs = nl_langinfo (CODESET); if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0) return 1; } #endif #ifdef __CYGWIN__ /* On Cygwin, avoid locale names without encoding suffix, because the locale_charset() function relies on the encoding suffix. Note that LC_ALL is set on the command line. */ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; #endif /* Check whether in a month name, no byte in the range 0x80..0x9F occurs. This excludes the UTF-8 encoding. */ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1; for (p = buf; *p != '\0'; p++) if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0) return 1; /* Check whether a typical GB18030 multibyte sequence is recognized as a single wide character. This excludes the GB2312 and GBK encodings. */ if (mblen ("\203\062\332\066", 5) != 4) return 1; return 0; } _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest$ac_exeext; then # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the # configure script would override the LC_ALL setting. Likewise for # LC_CTYPE, which is also set at the beginning of the configure script. # Test for the locale name without encoding suffix. if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_zh_CN=zh_CN else # Test for the locale name with explicit encoding suffix. if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_zh_CN=zh_CN.GB18030 else # None found. gt_cv_locale_zh_CN=none fi fi else # If there was a link error, due to mblen(), the system is so old that # it certainly doesn't have a chinese locale. gt_cv_locale_zh_CN=none fi rm -fr conftest* fi { echo "$as_me:$LINENO: result: $gt_cv_locale_zh_CN" >&5 echo "${ECHO_T}$gt_cv_locale_zh_CN" >&6; } LOCALE_ZH_CN=$gt_cv_locale_zh_CN { echo "$as_me:$LINENO: checking whether mbrtowc and mbstate_t are properly declared" >&5 echo $ECHO_N "checking whether mbrtowc and mbstate_t are properly declared... $ECHO_C" >&6; } if test "${ac_cv_func_mbrtowc+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 int main () { wchar_t wc; char const s[] = ""; size_t n = 1; mbstate_t state; return ! (sizeof state && (mbrtowc) (&wc, s, n, &state)); ; 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_func_mbrtowc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_mbrtowc=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_func_mbrtowc" >&5 echo "${ECHO_T}$ac_cv_func_mbrtowc" >&6; } if test $ac_cv_func_mbrtowc = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_MBRTOWC 1 _ACEOF fi GNULIB_MEMMEM=0; GNULIB_MEMPCPY=0; GNULIB_MEMRCHR=0; GNULIB_RAWMEMCHR=0; GNULIB_STPCPY=0; GNULIB_STPNCPY=0; GNULIB_STRCHRNUL=0; GNULIB_STRDUP=0; GNULIB_STRNDUP=0; GNULIB_STRNLEN=0; GNULIB_STRPBRK=0; GNULIB_STRSEP=0; GNULIB_STRSTR=0; GNULIB_STRCASESTR=0; GNULIB_STRTOK_R=0; GNULIB_MBSLEN=0; GNULIB_MBSNLEN=0; GNULIB_MBSCHR=0; GNULIB_MBSRCHR=0; GNULIB_MBSSTR=0; GNULIB_MBSCASECMP=0; GNULIB_MBSNCASECMP=0; GNULIB_MBSPCASECMP=0; GNULIB_MBSCASESTR=0; GNULIB_MBSCSPN=0; GNULIB_MBSPBRK=0; GNULIB_MBSSPN=0; GNULIB_MBSSEP=0; GNULIB_MBSTOK_R=0; GNULIB_STRERROR=0; GNULIB_STRSIGNAL=0; GNULIB_STRVERSCMP=0; HAVE_DECL_MEMMEM=1; HAVE_MEMPCPY=1; HAVE_DECL_MEMRCHR=1; HAVE_RAWMEMCHR=1; HAVE_STPCPY=1; HAVE_STPNCPY=1; HAVE_STRCHRNUL=1; HAVE_DECL_STRDUP=1; HAVE_STRNDUP=1; HAVE_DECL_STRNDUP=1; HAVE_DECL_STRNLEN=1; HAVE_STRPBRK=1; HAVE_STRSEP=1; HAVE_STRCASESTR=1; HAVE_DECL_STRTOK_R=1; HAVE_DECL_STRERROR=1; HAVE_DECL_STRSIGNAL=1; HAVE_STRVERSCMP=1; REPLACE_MEMMEM=0; REPLACE_STRDUP=0; REPLACE_STRSTR=0; REPLACE_STRCASESTR=0; REPLACE_STRERROR=0; REPLACE_STRSIGNAL=0; REPLACE_LOCALTIME_R=GNULIB_PORTCHECK; REPLACE_NANOSLEEP=GNULIB_PORTCHECK; REPLACE_STRPTIME=GNULIB_PORTCHECK; REPLACE_TIMEGM=GNULIB_PORTCHECK; GNULIB_CHOWN=0; GNULIB_CLOSE=0; GNULIB_DUP2=0; GNULIB_ENVIRON=0; GNULIB_EUIDACCESS=0; GNULIB_FCHDIR=0; GNULIB_FSYNC=0; GNULIB_FTRUNCATE=0; GNULIB_GETCWD=0; GNULIB_GETDOMAINNAME=0; GNULIB_GETDTABLESIZE=0; GNULIB_GETHOSTNAME=0; GNULIB_GETLOGIN_R=0; GNULIB_GETPAGESIZE=0; GNULIB_GETUSERSHELL=0; GNULIB_LCHOWN=0; GNULIB_LINK=0; GNULIB_LSEEK=0; GNULIB_READLINK=0; GNULIB_SLEEP=0; GNULIB_UNISTD_H_SIGPIPE=0; GNULIB_WRITE=0; HAVE_DUP2=1; HAVE_EUIDACCESS=1; HAVE_FSYNC=1; HAVE_FTRUNCATE=1; HAVE_GETDOMAINNAME=1; HAVE_GETDTABLESIZE=1; HAVE_GETHOSTNAME=1; HAVE_GETPAGESIZE=1; HAVE_GETUSERSHELL=1; HAVE_LINK=1; HAVE_READLINK=1; HAVE_SLEEP=1; HAVE_DECL_ENVIRON=1; HAVE_DECL_GETLOGIN_R=1; HAVE_OS_H=0; HAVE_SYS_PARAM_H=0; REPLACE_CHOWN=0; REPLACE_CLOSE=0; REPLACE_FCHDIR=0; REPLACE_GETCWD=0; REPLACE_GETPAGESIZE=0; REPLACE_LCHOWN=0; REPLACE_LSEEK=0; REPLACE_WRITE=0; UNISTD_H_HAVE_WINSOCK2_H=0; { echo "$as_me:$LINENO: checking for ssize_t" >&5 echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6; } if test "${gt_cv_ssize_t+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 int main () { int x = sizeof (ssize_t *) + sizeof (ssize_t); return !x; ; 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 gt_cv_ssize_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gt_cv_ssize_t=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $gt_cv_ssize_t" >&5 echo "${ECHO_T}$gt_cv_ssize_t" >&6; } if test $gt_cv_ssize_t = no; then cat >>confdefs.h <<\_ACEOF #define ssize_t int _ACEOF fi GNULIB_SIGNAL_H_SIGPIPE=0; GNULIB_SIGPROCMASK=0; GNULIB_SIGACTION=0; HAVE_POSIX_SIGNALBLOCKING=1; HAVE_SIGSET_T=1; HAVE_SIGINFO_T=1; HAVE_SIGACTION=1; HAVE_STRUCT_SIGACTION_SA_SIGACTION=1; { echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5 echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6; } if test "${ac_cv_type_uid_t+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 _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "uid_t" >/dev/null 2>&1; then ac_cv_type_uid_t=yes else ac_cv_type_uid_t=no fi rm -f conftest* fi { echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5 echo "${ECHO_T}$ac_cv_type_uid_t" >&6; } if test $ac_cv_type_uid_t = no; then cat >>confdefs.h <<\_ACEOF #define uid_t int _ACEOF cat >>confdefs.h <<\_ACEOF #define gid_t int _ACEOF fi { echo "$as_me:$LINENO: checking for stdbool.h that conforms to C99" >&5 echo $ECHO_N "checking for stdbool.h that conforms to C99... $ECHO_C" >&6; } if test "${ac_cv_header_stdbool_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 #ifndef bool "error: bool is not defined" #endif #ifndef false "error: false is not defined" #endif #if false "error: false is not 0" #endif #ifndef true "error: true is not defined" #endif #if true != 1 "error: true is not 1" #endif #ifndef __bool_true_false_are_defined "error: __bool_true_false_are_defined is not defined" #endif struct s { _Bool s: 1; _Bool t; } s; char a[true == 1 ? 1 : -1]; char b[false == 0 ? 1 : -1]; char c[__bool_true_false_are_defined == 1 ? 1 : -1]; char d[(bool) 0.5 == true ? 1 : -1]; bool e = &s; char f[(_Bool) 0.0 == false ? 1 : -1]; char g[true]; char h[sizeof (_Bool)]; char i[sizeof s.t]; enum { j = false, k = true, l = false * true, m = true * 256 }; _Bool n[m]; char o[sizeof n == m * sizeof n[0] ? 1 : -1]; char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1]; #if defined __xlc__ || defined __GNUC__ /* Catch a bug in IBM AIX xlc compiler version 6.0.0.0 reported by James Lemley on 2005-10-05; see http://lists.gnu.org/archive/html/bug-coreutils/2005-10/msg00086.html This test is not quite right, since xlc is allowed to reject this program, as the initializer for xlcbug is not one of the forms that C requires support for. However, doing the test right would require a run-time test, and that would make cross-compilation harder. Let us hope that IBM fixes the xlc bug, and also adds support for this kind of constant expression. In the meantime, this test will reject xlc, which is OK, since our stdbool.h substitute should suffice. We also test this with GCC, where it should work, to detect more quickly whether someone messes up the test in the future. */ char digs[] = "0123456789"; int xlcbug = 1 / (&(digs + 5)[-2 + (bool) 1] == &digs[4] ? 1 : -1); #endif /* Catch a bug in an HP-UX C compiler. See http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html */ _Bool q = true; _Bool *pq = &q; int main () { *pq |= q; *pq |= ! q; /* Refer to every declared value, to avoid compiler optimizations. */ return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l + !m + !n + !o + !p + !q + !pq); ; 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_stdbool_h=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_stdbool_h=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_header_stdbool_h" >&5 echo "${ECHO_T}$ac_cv_header_stdbool_h" >&6; } { echo "$as_me:$LINENO: checking for _Bool" >&5 echo $ECHO_N "checking for _Bool... $ECHO_C" >&6; } if test "${ac_cv_type__Bool+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 typedef _Bool ac__type_new_; int main () { if ((ac__type_new_ *) 0) return 0; if (sizeof (ac__type_new_)) return 0; ; 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_type__Bool=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type__Bool=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5 echo "${ECHO_T}$ac_cv_type__Bool" >&6; } if test $ac_cv_type__Bool = yes; then cat >>confdefs.h <<_ACEOF #define HAVE__BOOL 1 _ACEOF fi if test $ac_cv_header_stdbool_h = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_STDBOOL_H 1 _ACEOF fi HAVE_STRCASECMP=1; HAVE_DECL_STRNCASECMP=1; for ac_func in strcasestr do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } if { as_var=$as_ac_var; 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. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* 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 $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; 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 eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval echo '${'$as_ac_var'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF else gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext" fi done if test $ac_cv_func_strcasestr = no; then HAVE_STRCASESTR=0 : fi if test -z "$ERRNO_H"; then { echo "$as_me:$LINENO: checking for working strerror function" >&5 echo $ECHO_N "checking for working strerror function... $ECHO_C" >&6; } if test "${gl_cv_func_working_strerror+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { return !*strerror (-2); ; 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 gl_cv_func_working_strerror=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gl_cv_func_working_strerror=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { return !*strerror (-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 gl_cv_func_working_strerror=yes 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 ) gl_cv_func_working_strerror=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { echo "$as_me:$LINENO: result: $gl_cv_func_working_strerror" >&5 echo "${ECHO_T}$gl_cv_func_working_strerror" >&6; } if test $gl_cv_func_working_strerror = no; then REPLACE_STRERROR=1 fi else REPLACE_STRERROR=1 fi if test $REPLACE_STRERROR = 1; then { echo "$as_me:$LINENO: checking whether strerror is declared" >&5 echo $ECHO_N "checking whether strerror is declared... $ECHO_C" >&6; } if test "${ac_cv_have_decl_strerror+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 int main () { #ifndef strerror (void) strerror; #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_cv_have_decl_strerror=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_have_decl_strerror=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_have_decl_strerror" >&5 echo "${ECHO_T}$ac_cv_have_decl_strerror" >&6; } if test $ac_cv_have_decl_strerror = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_DECL_STRERROR 1 _ACEOF else cat >>confdefs.h <<_ACEOF #define HAVE_DECL_STRERROR 0 _ACEOF fi : if test $ac_cv_header_sys_socket_h != yes; then for ac_header in winsock2.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;} ( cat <<\_ASBOX ## -------------------------------- ## ## Report this to ianb@erislabs.net ## ## -------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&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 fi fi : if test $gl_cv_have_include_next = yes; then gl_cv_next_string_h='<'string.h'>' else { echo "$as_me:$LINENO: checking absolute name of " >&5 echo $ECHO_N "checking absolute name of ... $ECHO_C" >&6; } if test "${gl_cv_next_string_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test $ac_cv_header_string_h = yes; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF case "$host_os" in aix*) gl_absname_cpp="$ac_cpp -C" ;; *) gl_absname_cpp="$ac_cpp" ;; esac gl_cv_next_string_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | sed -n '\#/string.h#{ s#.*"\(.*/string.h\)".*#\1# s#^/[^/]#//&# p q }'`'"' else gl_cv_next_string_h='<'string.h'>' fi fi { echo "$as_me:$LINENO: result: $gl_cv_next_string_h" >&5 echo "${ECHO_T}$gl_cv_next_string_h" >&6; } fi NEXT_STRING_H=$gl_cv_next_string_h : if test $gl_cv_have_include_next = yes; then gl_cv_next_strings_h='<'strings.h'>' else { echo "$as_me:$LINENO: checking absolute name of " >&5 echo $ECHO_N "checking absolute name of ... $ECHO_C" >&6; } if test "${gl_cv_next_strings_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test $ac_cv_header_strings_h = yes; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF case "$host_os" in aix*) gl_absname_cpp="$ac_cpp -C" ;; *) gl_absname_cpp="$ac_cpp" ;; esac gl_cv_next_strings_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | sed -n '\#/strings.h#{ s#.*"\(.*/strings.h\)".*#\1# s#^/[^/]#//&# p q }'`'"' else gl_cv_next_strings_h='<'strings.h'>' fi fi { echo "$as_me:$LINENO: result: $gl_cv_next_strings_h" >&5 echo "${ECHO_T}$gl_cv_next_strings_h" >&6; } fi NEXT_STRINGS_H=$gl_cv_next_strings_h { echo "$as_me:$LINENO: checking whether strndup is declared" >&5 echo $ECHO_N "checking whether strndup is declared... $ECHO_C" >&6; } if test "${ac_cv_have_decl_strndup+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 int main () { #ifndef strndup (void) strndup; #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_cv_have_decl_strndup=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_have_decl_strndup=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_have_decl_strndup" >&5 echo "${ECHO_T}$ac_cv_have_decl_strndup" >&6; } if test $ac_cv_have_decl_strndup = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_DECL_STRNDUP 1 _ACEOF else cat >>confdefs.h <<_ACEOF #define HAVE_DECL_STRNDUP 0 _ACEOF fi { echo "$as_me:$LINENO: checking whether strnlen is declared" >&5 echo $ECHO_N "checking whether strnlen is declared... $ECHO_C" >&6; } if test "${ac_cv_have_decl_strnlen+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 int main () { #ifndef strnlen (void) strnlen; #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_cv_have_decl_strnlen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_have_decl_strnlen=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_have_decl_strnlen" >&5 echo "${ECHO_T}$ac_cv_have_decl_strnlen" >&6; } if test $ac_cv_have_decl_strnlen = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_DECL_STRNLEN 1 _ACEOF else cat >>confdefs.h <<_ACEOF #define HAVE_DECL_STRNLEN 0 _ACEOF fi GNULIB_SOCKET=0; GNULIB_CONNECT=0; GNULIB_ACCEPT=0; GNULIB_BIND=0; GNULIB_GETPEERNAME=0; GNULIB_GETSOCKNAME=0; GNULIB_GETSOCKOPT=0; GNULIB_LISTEN=0; GNULIB_RECV=0; GNULIB_SEND=0; GNULIB_RECVFROM=0; GNULIB_SENDTO=0; GNULIB_SETSOCKOPT=0; GNULIB_SHUTDOWN=0; { echo "$as_me:$LINENO: checking whether is self-contained" >&5 echo $ECHO_N "checking whether is self-contained... $ECHO_C" >&6; } if test "${gl_cv_header_sys_socket_h_selfcontained+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 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 gl_cv_header_sys_socket_h_selfcontained=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gl_cv_header_sys_socket_h_selfcontained=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $gl_cv_header_sys_socket_h_selfcontained" >&5 echo "${ECHO_T}$gl_cv_header_sys_socket_h_selfcontained" >&6; } if test $gl_cv_header_sys_socket_h_selfcontained = yes; then SYS_SOCKET_H='' for ac_func in shutdown do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } if { as_var=$as_ac_var; 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. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* 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 $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; 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 eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval echo '${'$as_ac_var'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done if test $ac_cv_func_shutdown = yes; then { echo "$as_me:$LINENO: checking whether defines the SHUT_* macros" >&5 echo $ECHO_N "checking whether defines the SHUT_* macros... $ECHO_C" >&6; } if test "${gl_cv_header_sys_socket_h_shut+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 int main () { int a[] = { SHUT_RD, SHUT_WR, SHUT_RDWR }; ; 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 gl_cv_header_sys_socket_h_shut=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gl_cv_header_sys_socket_h_shut=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $gl_cv_header_sys_socket_h_shut" >&5 echo "${ECHO_T}$gl_cv_header_sys_socket_h_shut" >&6; } if test $gl_cv_header_sys_socket_h_shut = no; then SYS_SOCKET_H='sys/socket.h' fi fi else SYS_SOCKET_H='sys/socket.h' fi if test -n "$SYS_SOCKET_H"; then : if test $gl_cv_have_include_next = yes; then gl_cv_next_sys_socket_h='<'sys/socket.h'>' else { echo "$as_me:$LINENO: checking absolute name of " >&5 echo $ECHO_N "checking absolute name of ... $ECHO_C" >&6; } if test "${gl_cv_next_sys_socket_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test $ac_cv_header_sys_socket_h = yes; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF case "$host_os" in aix*) gl_absname_cpp="$ac_cpp -C" ;; *) gl_absname_cpp="$ac_cpp" ;; esac gl_cv_next_sys_socket_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | sed -n '\#/sys/socket.h#{ s#.*"\(.*/sys/socket.h\)".*#\1# s#^/[^/]#//&# p q }'`'"' else gl_cv_next_sys_socket_h='<'sys/socket.h'>' fi fi { echo "$as_me:$LINENO: result: $gl_cv_next_sys_socket_h" >&5 echo "${ECHO_T}$gl_cv_next_sys_socket_h" >&6; } fi NEXT_SYS_SOCKET_H=$gl_cv_next_sys_socket_h if test $ac_cv_header_sys_socket_h = yes; then HAVE_SYS_SOCKET_H=1 HAVE_WS2TCPIP_H=0 else HAVE_SYS_SOCKET_H=0 for ac_header in ws2tcpip.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;} ( cat <<\_ASBOX ## -------------------------------- ## ## Report this to ianb@erislabs.net ## ## -------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&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 if test $ac_cv_header_ws2tcpip_h = yes; then HAVE_WS2TCPIP_H=1 else HAVE_WS2TCPIP_H=0 fi fi : if test $ac_cv_header_sys_socket_h != yes; then for ac_header in winsock2.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;} ( cat <<\_ASBOX ## -------------------------------- ## ## Report this to ianb@erislabs.net ## ## -------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&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 fi if test "$ac_cv_header_winsock2_h" = yes; then HAVE_WINSOCK2_H=1 UNISTD_H_HAVE_WINSOCK2_H=1 SYS_IOCTL_H_HAVE_WINSOCK2_H=1 else HAVE_WINSOCK2_H=0 fi fi GNULIB_SELECT=0; { echo "$as_me:$LINENO: checking whether stat file-mode macros are broken" >&5 echo $ECHO_N "checking whether stat file-mode macros are broken... $ECHO_C" >&6; } if test "${ac_cv_header_stat_broken+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 #if defined S_ISBLK && defined S_IFDIR extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1]; #endif #if defined S_ISBLK && defined S_IFCHR extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1]; #endif #if defined S_ISLNK && defined S_IFREG extern char c3[S_ISLNK (S_IFREG) ? -1 : 1]; #endif #if defined S_ISSOCK && defined S_IFREG extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1]; #endif _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_stat_broken=no else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_stat_broken=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_header_stat_broken" >&5 echo "${ECHO_T}$ac_cv_header_stat_broken" >&6; } if test $ac_cv_header_stat_broken = yes; then cat >>confdefs.h <<\_ACEOF #define STAT_MACROS_BROKEN 1 _ACEOF fi : { echo "$as_me:$LINENO: checking for struct timespec in " >&5 echo $ECHO_N "checking for struct timespec in ... $ECHO_C" >&6; } if test "${gl_cv_sys_struct_timespec_in_time_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 int main () { static struct timespec x; x.tv_sec = x.tv_nsec; ; 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 gl_cv_sys_struct_timespec_in_time_h=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gl_cv_sys_struct_timespec_in_time_h=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $gl_cv_sys_struct_timespec_in_time_h" >&5 echo "${ECHO_T}$gl_cv_sys_struct_timespec_in_time_h" >&6; } TIME_H_DEFINES_STRUCT_TIMESPEC=0 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0 if test $gl_cv_sys_struct_timespec_in_time_h = yes; then TIME_H_DEFINES_STRUCT_TIMESPEC=1 else { echo "$as_me:$LINENO: checking for struct timespec in " >&5 echo $ECHO_N "checking for struct timespec in ... $ECHO_C" >&6; } if test "${gl_cv_sys_struct_timespec_in_sys_time_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 int main () { static struct timespec x; x.tv_sec = x.tv_nsec; ; 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 gl_cv_sys_struct_timespec_in_sys_time_h=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gl_cv_sys_struct_timespec_in_sys_time_h=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $gl_cv_sys_struct_timespec_in_sys_time_h" >&5 echo "${ECHO_T}$gl_cv_sys_struct_timespec_in_sys_time_h" >&6; } if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1 fi fi : if test $gl_cv_have_include_next = yes; then gl_cv_next_time_h='<'time.h'>' else { echo "$as_me:$LINENO: checking absolute name of " >&5 echo $ECHO_N "checking absolute name of ... $ECHO_C" >&6; } if test "${gl_cv_next_time_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test $ac_cv_header_time_h = yes; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF case "$host_os" in aix*) gl_absname_cpp="$ac_cpp -C" ;; *) gl_absname_cpp="$ac_cpp" ;; esac gl_cv_next_time_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | sed -n '\#/time.h#{ s#.*"\(.*/time.h\)".*#\1# s#^/[^/]#//&# p q }'`'"' else gl_cv_next_time_h='<'time.h'>' fi fi { echo "$as_me:$LINENO: result: $gl_cv_next_time_h" >&5 echo "${ECHO_T}$gl_cv_next_time_h" >&6; } fi NEXT_TIME_H=$gl_cv_next_time_h : { echo "$as_me:$LINENO: checking whether utime accepts a null argument" >&5 echo $ECHO_N "checking whether utime accepts a null argument... $ECHO_C" >&6; } if test "${ac_cv_func_utime_null+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else rm -f conftest.data; >conftest.data # Sequent interprets utime(file, 0) to mean use start of epoch. Wrong. if test "$cross_compiling" = yes; then ac_cv_func_utime_null=no 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 #ifdef HAVE_UTIME_H # include #endif int main () { struct stat s, t; return ! (stat ("conftest.data", &s) == 0 && utime ("conftest.data", 0) == 0 && stat ("conftest.data", &t) == 0 && t.st_mtime >= s.st_mtime && t.st_mtime - s.st_mtime < 120); ; 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 ac_cv_func_utime_null=yes 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_func_utime_null=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { echo "$as_me:$LINENO: result: $ac_cv_func_utime_null" >&5 echo "${ECHO_T}$ac_cv_func_utime_null" >&6; } if test $ac_cv_func_utime_null = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_UTIME_NULL 1 _ACEOF fi rm -f conftest.data : { echo "$as_me:$LINENO: checking for struct utimbuf" >&5 echo $ECHO_N "checking for struct utimbuf... $ECHO_C" >&6; } if test "${gl_cv_sys_struct_utimbuf+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. */ #if HAVE_SYS_TIME_H #include #endif #include #ifdef HAVE_UTIME_H #include #endif int main () { static struct utimbuf x; x.actime = x.modtime; ; 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 gl_cv_sys_struct_utimbuf=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gl_cv_sys_struct_utimbuf=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $gl_cv_sys_struct_utimbuf" >&5 echo "${ECHO_T}$gl_cv_sys_struct_utimbuf" >&6; } if test $gl_cv_sys_struct_utimbuf = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_STRUCT_UTIMBUF 1 _ACEOF fi { echo "$as_me:$LINENO: checking for wint_t" >&5 echo $ECHO_N "checking for wint_t... $ECHO_C" >&6; } if test "${gt_cv_c_wint_t+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. */ /* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #include #include wint_t foo = (wchar_t)'\0'; 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 gt_cv_c_wint_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gt_cv_c_wint_t=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $gt_cv_c_wint_t" >&5 echo "${ECHO_T}$gt_cv_c_wint_t" >&6; } if test $gt_cv_c_wint_t = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_WINT_T 1 _ACEOF fi { echo "$as_me:$LINENO: checking for wchar_t" >&5 echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6; } if test "${gt_cv_c_wchar_t+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 wchar_t foo = (wchar_t)'\0'; 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 gt_cv_c_wchar_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gt_cv_c_wchar_t=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $gt_cv_c_wchar_t" >&5 echo "${ECHO_T}$gt_cv_c_wchar_t" >&6; } if test $gt_cv_c_wchar_t = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_WCHAR_T 1 _ACEOF fi if false; then GL_COND_LIBTOOL_TRUE= GL_COND_LIBTOOL_FALSE='#' else GL_COND_LIBTOOL_TRUE='#' GL_COND_LIBTOOL_FALSE= fi gl_cond_libtool=false gl_libdeps= gl_ltlibdeps= gl_source_base='lib' if test $ac_cv_func_alloca_works = no; then : fi # Define an additional variable used in the Makefile substitution. if test $ac_cv_working_alloca_h = yes; then { echo "$as_me:$LINENO: checking for alloca as a compiler built-in" >&5 echo $ECHO_N "checking for alloca as a compiler built-in... $ECHO_C" >&6; } if test "${gl_cv_rpl_alloca+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. */ #if defined __GNUC__ || defined _AIX || defined _MSC_VER Need own alloca #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "Need own alloca" >/dev/null 2>&1; then gl_cv_rpl_alloca=yes else gl_cv_rpl_alloca=no fi rm -f conftest* fi { echo "$as_me:$LINENO: result: $gl_cv_rpl_alloca" >&5 echo "${ECHO_T}$gl_cv_rpl_alloca" >&6; } if test $gl_cv_rpl_alloca = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_ALLOCA 1 _ACEOF ALLOCA_H=alloca.h else ALLOCA_H= fi else ALLOCA_H=alloca.h fi gl_LIBOBJS="$gl_LIBOBJS argmatch.$ac_objext" # Solaris 2.5.1 needs -lposix4 to get the clock_gettime function. # Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4. # Save and restore LIBS so e.g., -lrt, isn't added to it. Otherwise, *all* # programs in the package would end up linked with that potentially-shared # library, inducing unnecessary run-time overhead. gl_saved_libs=$LIBS { echo "$as_me:$LINENO: checking for library containing clock_gettime" >&5 echo $ECHO_N "checking for library containing clock_gettime... $ECHO_C" >&6; } if test "${ac_cv_search_clock_gettime+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_func_search_save_LIBS=$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 clock_gettime (); int main () { return clock_gettime (); ; return 0; } _ACEOF for ac_lib in '' rt posix4; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi 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_search_clock_gettime=$ac_res else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext if test "${ac_cv_search_clock_gettime+set}" = set; then break fi done if test "${ac_cv_search_clock_gettime+set}" = set; then : else ac_cv_search_clock_gettime=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_search_clock_gettime" >&5 echo "${ECHO_T}$ac_cv_search_clock_gettime" >&6; } ac_res=$ac_cv_search_clock_gettime if test "$ac_res" != no; then test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" test "$ac_cv_search_clock_gettime" = "none required" || LIB_CLOCK_GETTIME=$ac_cv_search_clock_gettime fi for ac_func in clock_gettime clock_settime do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } if { as_var=$as_ac_var; 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. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* 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 $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; 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 eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval echo '${'$as_ac_var'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done LIBS=$gl_saved_libs gl_LIBOBJS="$gl_LIBOBJS basename.$ac_objext" gl_LIBOBJS="$gl_LIBOBJS dirname.$ac_objext" gl_LIBOBJS="$gl_LIBOBJS stripslash.$ac_objext" { echo "$as_me:$LINENO: checking whether // is distinct from /" >&5 echo $ECHO_N "checking whether // is distinct from /... $ECHO_C" >&6; } if test "${gl_cv_double_slash_root+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test x"$cross_compiling" = xyes ; then # When cross-compiling, there is no way to tell whether // is special # short of a list of hosts. However, the only known hosts to date # that have a distinct // are Apollo DomainOS (too old to port to), # Cygwin, and z/OS. If anyone knows of another system for which // has # special semantics and is distinct from /, please report it to # . case $host in *-cygwin | i370-ibm-openedition) gl_cv_double_slash_root=yes ;; *) # Be optimistic and assume that / and // are the same when we # don't know. gl_cv_double_slash_root='unknown, assuming no' ;; esac else set x `ls -di / // 2>/dev/null` if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then gl_cv_double_slash_root=no else gl_cv_double_slash_root=yes fi fi fi { echo "$as_me:$LINENO: result: $gl_cv_double_slash_root" >&5 echo "${ECHO_T}$gl_cv_double_slash_root" >&6; } if test "$gl_cv_double_slash_root" = yes; then cat >>confdefs.h <<\_ACEOF #define DOUBLE_SLASH_IS_DISTINCT_ROOT 1 _ACEOF fi { echo "$as_me:$LINENO: checking for error_at_line" >&5 echo $ECHO_N "checking for error_at_line... $ECHO_C" >&6; } if test "${ac_cv_lib_error_at_line+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 int main () { error_at_line (0, 0, "", 0, "an error occurred"); ; 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_error_at_line=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_error_at_line=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_lib_error_at_line" >&5 echo "${ECHO_T}$ac_cv_lib_error_at_line" >&6; } if test $ac_cv_lib_error_at_line = no; then gl_LIBOBJS="$gl_LIBOBJS error.$ac_objext" fi : XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=error:3:c-format" XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=error_at_line:5:c-format" gl_LIBOBJS="$gl_LIBOBJS exitfail.$ac_objext" : { echo "$as_me:$LINENO: checking for working fcntl.h" >&5 echo $ECHO_N "checking for working fcntl.h... $ECHO_C" >&6; } if test "${gl_cv_header_working_fcntl_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then gl_cv_header_working_fcntl_h=cross-compiling 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 #ifndef O_NOATIME #define O_NOATIME 0 #endif #ifndef O_NOFOLLOW #define O_NOFOLLOW 0 #endif static int const constants[] = { O_CREAT, O_EXCL, O_NOCTTY, O_TRUNC, O_APPEND, O_NONBLOCK, O_SYNC, O_ACCMODE, O_RDONLY, O_RDWR, O_WRONLY }; int main () { int status = !constants; { static char const sym[] = "conftest.sym"; if (symlink (".", sym) != 0 || close (open (sym, O_RDONLY | O_NOFOLLOW)) == 0) status |= 32; } { static char const file[] = "confdefs.h"; int fd = open (file, O_RDONLY | O_NOATIME); char c; struct stat st0, st1; if (fd < 0 || fstat (fd, &st0) != 0 || sleep (1) != 0 || read (fd, &c, 1) != 1 || close (fd) != 0 || stat (file, &st1) != 0 || st0.st_atime != st1.st_atime) status |= 64; } return status; ; 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 gl_cv_header_working_fcntl_h=yes 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 ) case $? in #( 32) gl_cv_header_working_fcntl_h='no (bad O_NOFOLLOW)';; #( 64) gl_cv_header_working_fcntl_h='no (bad O_NOATIME)';; #( 96) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #( *) gl_cv_header_working_fcntl_h='no';; esac fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { echo "$as_me:$LINENO: result: $gl_cv_header_working_fcntl_h" >&5 echo "${ECHO_T}$gl_cv_header_working_fcntl_h" >&6; } case $gl_cv_header_working_fcntl_h in #( *O_NOATIME* | no | cross-compiling) ac_val=0;; #( *) ac_val=1;; esac cat >>confdefs.h <<_ACEOF #define HAVE_WORKING_O_NOATIME $ac_val _ACEOF case $gl_cv_header_working_fcntl_h in #( *O_NOFOLLOW* | no | cross-compiling) ac_val=0;; #( *) ac_val=1;; esac cat >>confdefs.h <<_ACEOF #define HAVE_WORKING_O_NOFOLLOW $ac_val _ACEOF : if test $gl_cv_have_include_next = yes; then gl_cv_next_fcntl_h='<'fcntl.h'>' else { echo "$as_me:$LINENO: checking absolute name of " >&5 echo $ECHO_N "checking absolute name of ... $ECHO_C" >&6; } if test "${gl_cv_next_fcntl_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test $ac_cv_header_fcntl_h = yes; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF case "$host_os" in aix*) gl_absname_cpp="$ac_cpp -C" ;; *) gl_absname_cpp="$ac_cpp" ;; esac gl_cv_next_fcntl_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | sed -n '\#/fcntl.h#{ s#.*"\(.*/fcntl.h\)".*#\1# s#^/[^/]#//&# p q }'`'"' else gl_cv_next_fcntl_h='<'fcntl.h'>' fi fi { echo "$as_me:$LINENO: result: $gl_cv_next_fcntl_h" >&5 echo "${ECHO_T}$gl_cv_next_fcntl_h" >&6; } fi NEXT_FCNTL_H=$gl_cv_next_fcntl_h FCNTL_H='fcntl.h' { echo "$as_me:$LINENO: checking for flexible array member" >&5 echo $ECHO_N "checking for flexible array member... $ECHO_C" >&6; } if test "${ac_cv_c_flexmember+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 struct s { int n; double d[]; }; int main () { int m = getchar (); struct s *p = malloc (offsetof (struct s, d) + m * sizeof (double)); p->d[0] = 0.0; return p->d != (double *) NULL; ; 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_c_flexmember=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_c_flexmember=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_c_flexmember" >&5 echo "${ECHO_T}$ac_cv_c_flexmember" >&6; } if test $ac_cv_c_flexmember = yes; then cat >>confdefs.h <<\_ACEOF #define FLEXIBLE_ARRAY_MEMBER _ACEOF else cat >>confdefs.h <<\_ACEOF #define FLEXIBLE_ARRAY_MEMBER 1 _ACEOF fi # No macro. You should also use one of fnmatch-posix or fnmatch-gnu. FNMATCH_H= { echo "$as_me:$LINENO: checking for working GNU fnmatch" >&5 echo $ECHO_N "checking for working GNU fnmatch... $ECHO_C" >&6; } if test "${ac_cv_func_fnmatch_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then ac_cv_func_fnmatch_gnu=cross else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include static int y (char const *pattern, char const *string, int flags) { return fnmatch (pattern, string, flags) == 0; } static int n (char const *pattern, char const *string, int flags) { return fnmatch (pattern, string, flags) == FNM_NOMATCH; } int main () { char const *Apat = 'A' < '\\\\' ? "[A-\\\\\\\\]" : "[\\\\\\\\-A]"; char const *apat = 'a' < '\\\\' ? "[a-\\\\\\\\]" : "[\\\\\\\\-a]"; static char const A_1[] = { 'A' - 1, 0 }; static char const A01[] = { 'A' + 1, 0 }; static char const a_1[] = { 'a' - 1, 0 }; static char const a01[] = { 'a' + 1, 0 }; static char const bs_1[] = { '\\\\' - 1, 0 }; static char const bs01[] = { '\\\\' + 1, 0 }; return !(n ("a*", "", 0) && y ("a*", "abc", 0) && n ("d*/*1", "d/s/1", FNM_PATHNAME) && y ("a\\\\bc", "abc", 0) && n ("a\\\\bc", "abc", FNM_NOESCAPE) && y ("*x", ".x", 0) && n ("*x", ".x", FNM_PERIOD) && y (Apat, "\\\\", 0) && y (Apat, "A", 0) && y (apat, "\\\\", 0) && y (apat, "a", 0) && n (Apat, A_1, 0) == ('A' < '\\\\') && n (apat, a_1, 0) == ('a' < '\\\\') && y (Apat, A01, 0) == ('A' < '\\\\') && y (apat, a01, 0) == ('a' < '\\\\') && y (Apat, bs_1, 0) == ('A' < '\\\\') && y (apat, bs_1, 0) == ('a' < '\\\\') && n (Apat, bs01, 0) == ('A' < '\\\\') && n (apat, bs01, 0) == ('a' < '\\\\') && y ("xxXX", "xXxX", FNM_CASEFOLD) && y ("a++(x|yy)b", "a+xyyyyxb", FNM_EXTMATCH) && n ("d*/*1", "d/s/1", FNM_FILE_NAME) && y ("*", "x", FNM_FILE_NAME | FNM_LEADING_DIR) && y ("x*", "x/y/z", FNM_FILE_NAME | FNM_LEADING_DIR) && y ("*c*", "c/x", FNM_FILE_NAME | FNM_LEADING_DIR)); ; 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 ac_cv_func_fnmatch_gnu=yes 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_func_fnmatch_gnu=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { echo "$as_me:$LINENO: result: $ac_cv_func_fnmatch_gnu" >&5 echo "${ECHO_T}$ac_cv_func_fnmatch_gnu" >&6; } if test $ac_cv_func_fnmatch_gnu = yes; then rm -f lib/fnmatch.h else { echo "$as_me:$LINENO: checking whether isblank is declared" >&5 echo $ECHO_N "checking whether isblank is declared... $ECHO_C" >&6; } if test "${ac_cv_have_decl_isblank+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 int main () { #ifndef isblank (void) isblank; #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_cv_have_decl_isblank=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_have_decl_isblank=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_have_decl_isblank" >&5 echo "${ECHO_T}$ac_cv_have_decl_isblank" >&6; } if test $ac_cv_have_decl_isblank = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_DECL_ISBLANK 1 _ACEOF else cat >>confdefs.h <<_ACEOF #define HAVE_DECL_ISBLANK 0 _ACEOF fi : : gl_LIBOBJS="$gl_LIBOBJS fnmatch.$ac_objext" FNMATCH_H=fnmatch.h fi if test $ac_cv_func_fnmatch_gnu != yes; then cat >>confdefs.h <<\_ACEOF #define fnmatch gnu_fnmatch _ACEOF fi : : for ac_header in sys/mount.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 #if HAVE_SYS_PARAM_H #include #endif #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 { echo "$as_me:$LINENO: checking how to get file system space usage" >&5 echo "$as_me: checking how to get file system space usage" >&6;} ac_fsusage_space=no # Perform only the link test since it seems there are no variants of the # statvfs function. This check is more than just AC_CHECK_FUNCS([statvfs]) # because that got a false positive on SCO OSR5. Adding the declaration # of a `struct statvfs' causes this test to fail (as it should) on such # systems. That system is reported to work fine with STAT_STATFS4 which # is what it gets when this test fails. if test $ac_fsusage_space = no; then # SVR4 { echo "$as_me:$LINENO: checking for statvfs function (SVR4)" >&5 echo $ECHO_N "checking for statvfs function (SVR4)... $ECHO_C" >&6; } if test "${fu_cv_sys_stat_statvfs+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 #if defined __GLIBC__ && defined __linux__ Do not use statvfs on systems with GNU libc on Linux, because that function stats all preceding entries in /proc/mounts, and that makes df hang if even one of the corresponding file systems is hard-mounted, but not available. statvfs in GNU libc on Hurd, BeOS, Haiku operates differently: it only makes a system call. #endif #ifdef __osf__ "Do not use Tru64's statvfs implementation" #endif #include int main () { struct statvfs fsd; statvfs (0, &fsd); ; 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 fu_cv_sys_stat_statvfs=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fu_cv_sys_stat_statvfs=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $fu_cv_sys_stat_statvfs" >&5 echo "${ECHO_T}$fu_cv_sys_stat_statvfs" >&6; } if test $fu_cv_sys_stat_statvfs = yes; then ac_fsusage_space=yes cat >>confdefs.h <<\_ACEOF #define STAT_STATVFS 1 _ACEOF fi fi if test $ac_fsusage_space = no; then # DEC Alpha running OSF/1 { echo "$as_me:$LINENO: checking for 3-argument statfs function (DEC OSF/1)" >&5 echo $ECHO_N "checking for 3-argument statfs function (DEC OSF/1)... $ECHO_C" >&6; } if test "${fu_cv_sys_stat_statfs3_osf1+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then fu_cv_sys_stat_statfs3_osf1=no 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 int main () { struct statfs fsd; fsd.f_fsize = 0; return statfs (".", &fsd, sizeof (struct statfs)) != 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 fu_cv_sys_stat_statfs3_osf1=yes 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 ) fu_cv_sys_stat_statfs3_osf1=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { echo "$as_me:$LINENO: result: $fu_cv_sys_stat_statfs3_osf1" >&5 echo "${ECHO_T}$fu_cv_sys_stat_statfs3_osf1" >&6; } if test $fu_cv_sys_stat_statfs3_osf1 = yes; then ac_fsusage_space=yes cat >>confdefs.h <<\_ACEOF #define STAT_STATFS3_OSF1 1 _ACEOF fi fi if test $ac_fsusage_space = no; then # AIX { echo "$as_me:$LINENO: checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)" >&5 echo $ECHO_N "checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)... $ECHO_C" >&6; } if test "${fu_cv_sys_stat_statfs2_bsize+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then fu_cv_sys_stat_statfs2_bsize=no else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef HAVE_SYS_PARAM_H #include #endif #ifdef HAVE_SYS_MOUNT_H #include #endif #ifdef HAVE_SYS_VFS_H #include #endif int main () { struct statfs fsd; fsd.f_bsize = 0; return statfs (".", &fsd) != 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 fu_cv_sys_stat_statfs2_bsize=yes 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 ) fu_cv_sys_stat_statfs2_bsize=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { echo "$as_me:$LINENO: result: $fu_cv_sys_stat_statfs2_bsize" >&5 echo "${ECHO_T}$fu_cv_sys_stat_statfs2_bsize" >&6; } if test $fu_cv_sys_stat_statfs2_bsize = yes; then ac_fsusage_space=yes cat >>confdefs.h <<\_ACEOF #define STAT_STATFS2_BSIZE 1 _ACEOF fi fi if test $ac_fsusage_space = no; then # SVR3 { echo "$as_me:$LINENO: checking for four-argument statfs (AIX-3.2.5, SVR3)" >&5 echo $ECHO_N "checking for four-argument statfs (AIX-3.2.5, SVR3)... $ECHO_C" >&6; } if test "${fu_cv_sys_stat_statfs4+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then fu_cv_sys_stat_statfs4=no 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 int main () { struct statfs fsd; return statfs (".", &fsd, sizeof fsd, 0) != 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 fu_cv_sys_stat_statfs4=yes 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 ) fu_cv_sys_stat_statfs4=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { echo "$as_me:$LINENO: result: $fu_cv_sys_stat_statfs4" >&5 echo "${ECHO_T}$fu_cv_sys_stat_statfs4" >&6; } if test $fu_cv_sys_stat_statfs4 = yes; then ac_fsusage_space=yes cat >>confdefs.h <<\_ACEOF #define STAT_STATFS4 1 _ACEOF fi fi if test $ac_fsusage_space = no; then # 4.4BSD and NetBSD { echo "$as_me:$LINENO: checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)" >&5 echo $ECHO_N "checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)... $ECHO_C" >&6; } if test "${fu_cv_sys_stat_statfs2_fsize+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then fu_cv_sys_stat_statfs2_fsize=no else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #ifdef HAVE_SYS_PARAM_H #include #endif #ifdef HAVE_SYS_MOUNT_H #include #endif int main () { struct statfs fsd; fsd.f_fsize = 0; return statfs (".", &fsd) != 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 fu_cv_sys_stat_statfs2_fsize=yes 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 ) fu_cv_sys_stat_statfs2_fsize=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { echo "$as_me:$LINENO: result: $fu_cv_sys_stat_statfs2_fsize" >&5 echo "${ECHO_T}$fu_cv_sys_stat_statfs2_fsize" >&6; } if test $fu_cv_sys_stat_statfs2_fsize = yes; then ac_fsusage_space=yes cat >>confdefs.h <<\_ACEOF #define STAT_STATFS2_FSIZE 1 _ACEOF fi fi if test $ac_fsusage_space = no; then # Ultrix { echo "$as_me:$LINENO: checking for two-argument statfs with struct fs_data (Ultrix)" >&5 echo $ECHO_N "checking for two-argument statfs with struct fs_data (Ultrix)... $ECHO_C" >&6; } if test "${fu_cv_sys_stat_fs_data+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then fu_cv_sys_stat_fs_data=no else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #ifdef HAVE_SYS_PARAM_H #include #endif #ifdef HAVE_SYS_MOUNT_H #include #endif #ifdef HAVE_SYS_FS_TYPES_H #include #endif int main () { struct fs_data fsd; /* Ultrix's statfs returns 1 for success, 0 for not mounted, -1 for failure. */ return statfs (".", &fsd) != 1; } _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 fu_cv_sys_stat_fs_data=yes 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 ) fu_cv_sys_stat_fs_data=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { echo "$as_me:$LINENO: result: $fu_cv_sys_stat_fs_data" >&5 echo "${ECHO_T}$fu_cv_sys_stat_fs_data" >&6; } if test $fu_cv_sys_stat_fs_data = yes; then ac_fsusage_space=yes cat >>confdefs.h <<\_ACEOF #define STAT_STATFS2_FS_DATA 1 _ACEOF fi fi if test $ac_fsusage_space = no; then # SVR2 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 cat >>confdefs.h <<\_ACEOF #define STAT_READ_FILSYS 1 _ACEOF ac_fsusage_space=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_ext fi if test $ac_fsusage_space = yes; then gl_cv_fs_space=yes else gl_cv_fs_space=no fi if test $gl_cv_fs_space = yes; then gl_LIBOBJS="$gl_LIBOBJS fsusage.$ac_objext" for ac_header in dustat.h sys/fs/s5param.h sys/filsys.h sys/statfs.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;} ( cat <<\_ASBOX ## -------------------------------- ## ## Report this to ianb@erislabs.net ## ## -------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&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 { echo "$as_me:$LINENO: checking for statfs that truncates block counts" >&5 echo $ECHO_N "checking for statfs that truncates block counts... $ECHO_C" >&6; } if test "${fu_cv_sys_truncating_statfs+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. */ #if !defined(sun) && !defined(__sun) choke -- this is a workaround for a Sun-specific problem #endif #include #include int main () { struct statfs t; long c = *(t.f_spare); if (c) return 0; ; 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 fu_cv_sys_truncating_statfs=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fu_cv_sys_truncating_statfs=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test $fu_cv_sys_truncating_statfs = yes; then cat >>confdefs.h <<\_ACEOF #define STATFS_TRUNCATES_BLOCK_COUNTS 1 _ACEOF fi { echo "$as_me:$LINENO: result: $fu_cv_sys_truncating_statfs" >&5 echo "${ECHO_T}$fu_cv_sys_truncating_statfs" >&6; } fi if test -n "$GETOPT_H"; then gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext" gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext" GETOPT_H=getopt.h cat >>confdefs.h <<\_ACEOF #define __GETOPT_PREFIX rpl_ _ACEOF : fi gl_LIBOBJS="$gl_LIBOBJS gettime.$ac_objext" : : { echo "$as_me:$LINENO: checking for gettimeofday with POSIX signature" >&5 echo $ECHO_N "checking for gettimeofday with POSIX signature... $ECHO_C" >&6; } if test "${gl_cv_func_gettimeofday_posix_signature+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 struct timeval c; int main () { int (*f) (struct timeval *restrict, void *restrict) = gettimeofday; int x = f (&c, 0); return !(x | c.tv_sec | c.tv_usec); ; 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 gl_cv_func_gettimeofday_posix_signature=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gl_cv_func_gettimeofday_posix_signature=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $gl_cv_func_gettimeofday_posix_signature" >&5 echo "${ECHO_T}$gl_cv_func_gettimeofday_posix_signature" >&6; } { echo "$as_me:$LINENO: checking whether gettimeofday clobbers localtime buffer" >&5 echo $ECHO_N "checking whether gettimeofday clobbers localtime buffer... $ECHO_C" >&6; } if test "${gl_cv_func_gettimeofday_clobber+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then gl_cv_func_gettimeofday_clobber=yes 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 () { time_t t = 0; struct tm *lt; struct tm saved_lt; struct timeval tv; lt = localtime (&t); saved_lt = *lt; gettimeofday (&tv, NULL); return memcmp (lt, &saved_lt, sizeof (struct tm)) != 0; ; 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 gl_cv_func_gettimeofday_clobber=no 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 ) gl_cv_func_gettimeofday_clobber=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { echo "$as_me:$LINENO: result: $gl_cv_func_gettimeofday_clobber" >&5 echo "${ECHO_T}$gl_cv_func_gettimeofday_clobber" >&6; } if test $gl_cv_func_gettimeofday_clobber = yes; then REPLACE_GETTIMEOFDAY=1 SYS_TIME_H=sys/time.h gl_LIBOBJS="$gl_LIBOBJS gettimeofday.$ac_objext" for ac_header in sys/timeb.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;} ( cat <<\_ASBOX ## -------------------------------- ## ## Report this to ianb@erislabs.net ## ## -------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&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 for ac_func in _ftime do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } if { as_var=$as_ac_var; 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. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* 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 $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; 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 eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval echo '${'$as_ac_var'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done cat >>confdefs.h <<\_ACEOF #define gmtime rpl_gmtime _ACEOF cat >>confdefs.h <<\_ACEOF #define localtime rpl_localtime _ACEOF cat >>confdefs.h <<\_ACEOF #define GETTIMEOFDAY_CLOBBERS_LOCALTIME 1 _ACEOF fi if test $gl_cv_func_gettimeofday_posix_signature != yes; then REPLACE_GETTIMEOFDAY=1 SYS_TIME_H=sys/time.h if test $gl_cv_func_gettimeofday_clobber != yes; then gl_LIBOBJS="$gl_LIBOBJS gettimeofday.$ac_objext" for ac_header in sys/timeb.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;} ( cat <<\_ASBOX ## -------------------------------- ## ## Report this to ianb@erislabs.net ## ## -------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&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 for ac_func in _ftime do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } if { as_var=$as_ac_var; 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. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* 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 $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; 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 eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval echo '${'$as_ac_var'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done fi fi gl_LIBOBJS="$gl_LIBOBJS human.$ac_objext" : gl_LIBOBJS="$gl_LIBOBJS idcache.$ac_objext" { echo "$as_me:$LINENO: checking whether the compiler generally respects inline" >&5 echo $ECHO_N "checking whether the compiler generally respects inline... $ECHO_C" >&6; } if test "${gl_cv_c_inline_effective+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test $ac_cv_c_inline = no; then gl_cv_c_inline_effective=no 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 () { #ifdef __NO_INLINE__ #error "inline is not effective" #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 gl_cv_c_inline_effective=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gl_cv_c_inline_effective=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi fi { echo "$as_me:$LINENO: result: $gl_cv_c_inline_effective" >&5 echo "${ECHO_T}$gl_cv_c_inline_effective" >&6; } if test $gl_cv_c_inline_effective = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_INLINE 1 _ACEOF fi : : : : { echo "$as_me:$LINENO: checking whether inttypes.h conforms to C99" >&5 echo $ECHO_N "checking whether inttypes.h conforms to C99... $ECHO_C" >&6; } if test "${gl_cv_header_working_inttypes_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else gl_cv_header_working_inttypes_h=no if test "$gl_cv_header_working_stdint_h" = yes \ && test $ac_cv_header_inttypes_h = yes \ && test "$ac_cv_have_decl_imaxabs" = yes \ && test "$ac_cv_have_decl_imaxdiv" = yes \ && test "$ac_cv_have_decl_strtoimax" = yes \ && test "$ac_cv_have_decl_strtoumax" = yes; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */ #define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */ #define __STDC_FORMAT_MACROS 1 /* to make it work also in C++ mode */ #define _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H /* work if build isn't clean */ #include /* No need to duplicate the tests of stdint.m4; they are subsumed by $gl_cv_header_working_stdint_h = yes. */ /* Tests for macros supposed to be defined in inttypes.h. */ const char *k = /* implicit string concatenation */ #ifdef INT8_MAX PRId8 PRIi8 #endif #ifdef UINT8_MAX PRIo8 PRIu8 PRIx8 PRIX8 #endif #ifdef INT16_MAX PRId16 PRIi16 #endif #ifdef UINT16_MAX PRIo16 PRIu16 PRIx16 PRIX16 #endif #ifdef INT32_MAX PRId32 PRIi32 #endif #ifdef UINT32_MAX PRIo32 PRIu32 PRIx32 PRIX32 #endif #ifdef INT64_MAX PRId64 PRIi64 #endif #ifdef UINT64_MAX PRIo64 PRIu64 PRIx64 PRIX64 #endif PRIdLEAST8 PRIiLEAST8 PRIoLEAST8 PRIuLEAST8 PRIxLEAST8 PRIXLEAST8 PRIdLEAST16 PRIiLEAST16 PRIoLEAST16 PRIuLEAST16 PRIxLEAST16 PRIXLEAST16 PRIdLEAST32 PRIiLEAST32 PRIoLEAST32 PRIuLEAST32 PRIxLEAST32 PRIXLEAST32 PRIdLEAST64 PRIiLEAST64 PRIoLEAST64 PRIuLEAST64 PRIxLEAST64 PRIXLEAST64 PRIdFAST8 PRIiFAST8 PRIoFAST8 PRIuFAST8 PRIxFAST8 PRIXFAST8 PRIdFAST16 PRIiFAST16 PRIoFAST16 PRIuFAST16 PRIxFAST16 PRIXFAST16 PRIdFAST32 PRIiFAST32 PRIoFAST32 PRIuFAST32 PRIxFAST32 PRIXFAST32 PRIdFAST64 PRIiFAST64 PRIoFAST64 PRIuFAST64 PRIxFAST64 PRIXFAST64 PRIdMAX PRIiMAX PRIoMAX PRIuMAX PRIxMAX PRIXMAX #ifdef INTPTR_MAX PRIdPTR PRIiPTR #endif #ifdef UINTPTR_MAX PRIoPTR PRIuPTR PRIxPTR PRIXPTR #endif ; const char *l = /* implicit string concatenation */ #ifdef INT8_MAX SCNd8 SCNi8 #endif #ifdef UINT8_MAX SCNo8 SCNu8 SCNx8 #endif #ifdef INT16_MAX SCNd16 SCNi16 #endif #ifdef UINT16_MAX SCNo16 SCNu16 SCNx16 #endif #ifdef INT32_MAX SCNd32 SCNi32 #endif #ifdef UINT32_MAX SCNo32 SCNu32 SCNx32 #endif #ifdef INT64_MAX SCNd64 SCNi64 #endif #ifdef UINT64_MAX SCNo64 SCNu64 SCNx64 #endif SCNdLEAST8 SCNiLEAST8 SCNoLEAST8 SCNuLEAST8 SCNxLEAST8 SCNdLEAST16 SCNiLEAST16 SCNoLEAST16 SCNuLEAST16 SCNxLEAST16 SCNdLEAST32 SCNiLEAST32 SCNoLEAST32 SCNuLEAST32 SCNxLEAST32 SCNdLEAST64 SCNiLEAST64 SCNoLEAST64 SCNuLEAST64 SCNxLEAST64 SCNdFAST8 SCNiFAST8 SCNoFAST8 SCNuFAST8 SCNxFAST8 SCNdFAST16 SCNiFAST16 SCNoFAST16 SCNuFAST16 SCNxFAST16 SCNdFAST32 SCNiFAST32 SCNoFAST32 SCNuFAST32 SCNxFAST32 SCNdFAST64 SCNiFAST64 SCNoFAST64 SCNuFAST64 SCNxFAST64 SCNdMAX SCNiMAX SCNoMAX SCNuMAX SCNxMAX #ifdef INTPTR_MAX SCNdPTR SCNiPTR #endif #ifdef UINTPTR_MAX SCNoPTR SCNuPTR SCNxPTR #endif ; 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 gl_cv_header_working_inttypes_h=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 fi { echo "$as_me:$LINENO: result: $gl_cv_header_working_inttypes_h" >&5 echo "${ECHO_T}$gl_cv_header_working_inttypes_h" >&6; } if false && test $gl_cv_header_working_inttypes_h = yes; then INTTYPES_H='' else : if test $gl_cv_have_include_next = yes; then gl_cv_next_inttypes_h='<'inttypes.h'>' else { echo "$as_me:$LINENO: checking absolute name of " >&5 echo $ECHO_N "checking absolute name of ... $ECHO_C" >&6; } if test "${gl_cv_next_inttypes_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test $ac_cv_header_inttypes_h = yes; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF case "$host_os" in aix*) gl_absname_cpp="$ac_cpp -C" ;; *) gl_absname_cpp="$ac_cpp" ;; esac gl_cv_next_inttypes_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | sed -n '\#/inttypes.h#{ s#.*"\(.*/inttypes.h\)".*#\1# s#^/[^/]#//&# p q }'`'"' else gl_cv_next_inttypes_h='<'inttypes.h'>' fi fi { echo "$as_me:$LINENO: result: $gl_cv_next_inttypes_h" >&5 echo "${ECHO_T}$gl_cv_next_inttypes_h" >&6; } fi NEXT_INTTYPES_H=$gl_cv_next_inttypes_h cat >>confdefs.h <<\_ACEOF #define GL_TRIGGER_STDC_LIMIT_MACROS 1 _ACEOF PRIPTR_PREFIX= if test -n "$STDINT_H"; then PRIPTR_PREFIX='"l"' else for glpfx in '' l ll I64; do case $glpfx in '') gltype1='int';; l) gltype1='long int';; ll) gltype1='long long int';; I64) gltype1='__int64';; esac cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include extern intptr_t foo; extern $gltype1 foo; 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 PRIPTR_PREFIX='"'$glpfx'"' 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 test -n "$PRIPTR_PREFIX" && break done fi if test "$ac_cv_have_decl_imaxabs" = yes; then HAVE_DECL_IMAXABS=1 else HAVE_DECL_IMAXABS=0 fi if test "$ac_cv_have_decl_imaxdiv" = yes; then HAVE_DECL_IMAXDIV=1 else HAVE_DECL_IMAXDIV=0 fi if test "$ac_cv_have_decl_strtoimax" = yes; then HAVE_DECL_STRTOIMAX=1 else HAVE_DECL_STRTOIMAX=0 fi if test "$ac_cv_have_decl_strtoumax" = yes; then HAVE_DECL_STRTOUMAX=1 else HAVE_DECL_STRTOUMAX=0 fi { echo "$as_me:$LINENO: checking whether INT32_MAX < INTMAX_MAX" >&5 echo $ECHO_N "checking whether INT32_MAX < INTMAX_MAX... $ECHO_C" >&6; } if test "${gl_cv_test_INT32_MAX_LT_INTMAX_MAX+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. */ /* Work also in C++ mode. */ #define __STDC_LIMIT_MACROS 1 /* Work if build is not clean. */ #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H #include #if HAVE_STDINT_H #include #endif #if defined INT32_MAX && defined INTMAX_MAX #define CONDITION (INT32_MAX < INTMAX_MAX) #elif HAVE_LONG_LONG_INT #define CONDITION (sizeof (int) < sizeof (long long int)) #else #define CONDITION 0 #endif int test[CONDITION ? 1 : -1]; 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 gl_cv_test_INT32_MAX_LT_INTMAX_MAX=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gl_cv_test_INT32_MAX_LT_INTMAX_MAX=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&5 echo "${ECHO_T}$gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&6; } if test $gl_cv_test_INT32_MAX_LT_INTMAX_MAX = yes; then INT32_MAX_LT_INTMAX_MAX=1; else INT32_MAX_LT_INTMAX_MAX=0; fi if test $APPLE_UNIVERSAL_BUILD = 0; then { echo "$as_me:$LINENO: checking whether INT64_MAX == LONG_MAX" >&5 echo $ECHO_N "checking whether INT64_MAX == LONG_MAX... $ECHO_C" >&6; } if test "${gl_cv_test_INT64_MAX_EQ_LONG_MAX+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. */ /* Work also in C++ mode. */ #define __STDC_LIMIT_MACROS 1 /* Work if build is not clean. */ #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H #include #if HAVE_STDINT_H #include #endif #if defined INT64_MAX #define CONDITION (INT64_MAX == LONG_MAX) #elif HAVE_LONG_LONG_INT #define CONDITION (sizeof (long long int) == sizeof (long int)) #else #define CONDITION 0 #endif int test[CONDITION ? 1 : -1]; 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 gl_cv_test_INT64_MAX_EQ_LONG_MAX=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gl_cv_test_INT64_MAX_EQ_LONG_MAX=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&5 echo "${ECHO_T}$gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&6; } if test $gl_cv_test_INT64_MAX_EQ_LONG_MAX = yes; then INT64_MAX_EQ_LONG_MAX=1; else INT64_MAX_EQ_LONG_MAX=0; fi else INT64_MAX_EQ_LONG_MAX=-1 fi { echo "$as_me:$LINENO: checking whether UINT32_MAX < UINTMAX_MAX" >&5 echo $ECHO_N "checking whether UINT32_MAX < UINTMAX_MAX... $ECHO_C" >&6; } if test "${gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX+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. */ /* Work also in C++ mode. */ #define __STDC_LIMIT_MACROS 1 /* Work if build is not clean. */ #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H #include #if HAVE_STDINT_H #include #endif #if defined UINT32_MAX && defined UINTMAX_MAX #define CONDITION (UINT32_MAX < UINTMAX_MAX) #elif HAVE_LONG_LONG_INT #define CONDITION (sizeof (unsigned int) < sizeof (unsigned long long int)) #else #define CONDITION 0 #endif int test[CONDITION ? 1 : -1]; 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 gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&5 echo "${ECHO_T}$gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&6; } if test $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX = yes; then UINT32_MAX_LT_UINTMAX_MAX=1; else UINT32_MAX_LT_UINTMAX_MAX=0; fi if test $APPLE_UNIVERSAL_BUILD = 0; then { echo "$as_me:$LINENO: checking whether UINT64_MAX == ULONG_MAX" >&5 echo $ECHO_N "checking whether UINT64_MAX == ULONG_MAX... $ECHO_C" >&6; } if test "${gl_cv_test_UINT64_MAX_EQ_ULONG_MAX+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. */ /* Work also in C++ mode. */ #define __STDC_LIMIT_MACROS 1 /* Work if build is not clean. */ #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H #include #if HAVE_STDINT_H #include #endif #if defined UINT64_MAX #define CONDITION (UINT64_MAX == ULONG_MAX) #elif HAVE_LONG_LONG_INT #define CONDITION (sizeof (unsigned long long int) == sizeof (unsigned long int)) #else #define CONDITION 0 #endif int test[CONDITION ? 1 : -1]; 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 gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&5 echo "${ECHO_T}$gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&6; } if test $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX = yes; then UINT64_MAX_EQ_ULONG_MAX=1; else UINT64_MAX_EQ_ULONG_MAX=0; fi else UINT64_MAX_EQ_ULONG_MAX=-1 fi INTTYPES_H='inttypes.h' fi : LOCALCHARSET_TESTS_ENVIRONMENT="CHARSETALIASDIR=\"\$(top_builddir)/$gl_source_base\"" : if test $ac_cv_func_lstat = yes; then { echo "$as_me:$LINENO: checking whether lstat dereferences a symlink specified with a trailing slash" >&5 echo $ECHO_N "checking whether lstat dereferences a symlink specified with a trailing slash... $ECHO_C" >&6; } if test "${ac_cv_func_lstat_dereferences_slashed_symlink+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else rm -f conftest.sym conftest.file echo >conftest.file if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then if test "$cross_compiling" = yes; then ac_cv_func_lstat_dereferences_slashed_symlink=no 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 int main () { struct stat sbuf; /* Linux will dereference the symlink and fail. That is better in the sense that it means we will not have to compile and use the lstat wrapper. */ return lstat ("conftest.sym/", &sbuf) == 0; ; 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 ac_cv_func_lstat_dereferences_slashed_symlink=yes 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_func_lstat_dereferences_slashed_symlink=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi else # If the `ln -s' command failed, then we probably don't even # have an lstat function. ac_cv_func_lstat_dereferences_slashed_symlink=no fi rm -f conftest.sym conftest.file fi { echo "$as_me:$LINENO: result: $ac_cv_func_lstat_dereferences_slashed_symlink" >&5 echo "${ECHO_T}$ac_cv_func_lstat_dereferences_slashed_symlink" >&6; } test $ac_cv_func_lstat_dereferences_slashed_symlink = yes && cat >>confdefs.h <<_ACEOF #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1 _ACEOF if test $ac_cv_func_lstat_dereferences_slashed_symlink = no; then gl_LIBOBJS="$gl_LIBOBJS lstat.$ac_objext" fi if test $ac_cv_func_lstat_dereferences_slashed_symlink = no; then REPLACE_LSTAT=1 fi # Prerequisites of lib/lstat.c. fi GNULIB_LSTAT=1 if test $gl_cv_func_malloc_posix = yes; then HAVE_MALLOC_POSIX=1 cat >>confdefs.h <<\_ACEOF #define HAVE_MALLOC_POSIX 1 _ACEOF else gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext" HAVE_MALLOC_POSIX=0 fi GNULIB_MALLOC_POSIX=1 : : if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then { echo "$as_me:$LINENO: checking whether mbrtowc handles incomplete characters" >&5 echo $ECHO_N "checking whether mbrtowc handles incomplete characters... $ECHO_C" >&6; } if test "${gl_cv_func_mbrtowc_incomplete_state+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case "$host_os" in # Guess no on AIX and OSF/1. osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;; # Guess yes otherwise. *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;; esac if test $LOCALE_JA != none; then if test "$cross_compiling" = yes; then { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling See \`config.log' for more details." >&5 echo "$as_me: error: cannot run test program while cross compiling See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } 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 int main () { if (setlocale (LC_ALL, "$LOCALE_JA") != NULL) { const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */ mbstate_t state; wchar_t wc; memset (&state, '\0', sizeof (mbstate_t)); if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2)) if (mbsinit (&state)) return 1; } 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 gl_cv_func_mbrtowc_incomplete_state=yes 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 ) gl_cv_func_mbrtowc_incomplete_state=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: $gl_cv_func_mbrtowc_incomplete_state" >&5 echo "${ECHO_T}$gl_cv_func_mbrtowc_incomplete_state" >&6; } case "$gl_cv_func_mbrtowc_incomplete_state" in *yes) REPLACE_MBSTATE_T=0 ;; *) REPLACE_MBSTATE_T=1 ;; esac else REPLACE_MBSTATE_T=1 fi if test $REPLACE_MBSTATE_T = 1; then WCHAR_H=wchar.h fi if test $REPLACE_MBSTATE_T = 1; then REPLACE_MBRTOWC=1 fi : if test $ac_cv_func_mbrtowc = no; then HAVE_MBRTOWC=0 fi if test $HAVE_MBRTOWC != 0 && test $REPLACE_MBRTOWC != 1; then { echo "$as_me:$LINENO: checking whether mbrtowc handles a NULL string argument" >&5 echo $ECHO_N "checking whether mbrtowc handles a NULL string argument... $ECHO_C" >&6; } if test "${gl_cv_func_mbrtowc_null_arg+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case "$host_os" in # Guess no on OSF/1. osf*) gl_cv_func_mbrtowc_null_arg="guessing no" ;; # Guess yes otherwise. *) gl_cv_func_mbrtowc_null_arg="guessing yes" ;; esac if test $LOCALE_FR_UTF8 != none; then if test "$cross_compiling" = yes; then { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling See \`config.log' for more details." >&5 echo "$as_me: error: cannot run test program while cross compiling See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } 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 int main () { if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL) { mbstate_t state; wchar_t wc; int ret; memset (&state, '\0', sizeof (mbstate_t)); wc = (wchar_t) 0xBADFACE; mbrtowc (&wc, NULL, 5, &state); /* Check that wc was not modified. */ if (wc != (wchar_t) 0xBADFACE) return 1; } 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 gl_cv_func_mbrtowc_null_arg=yes 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 ) gl_cv_func_mbrtowc_null_arg=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: $gl_cv_func_mbrtowc_null_arg" >&5 echo "${ECHO_T}$gl_cv_func_mbrtowc_null_arg" >&6; } { echo "$as_me:$LINENO: checking whether mbrtowc has a correct return value" >&5 echo $ECHO_N "checking whether mbrtowc has a correct return value... $ECHO_C" >&6; } if test "${gl_cv_func_mbrtowc_retval+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case "$host_os" in # Guess no on HP-UX and Solaris. hpux* | solaris*) gl_cv_func_mbrtowc_retval="guessing no" ;; # Guess yes otherwise. *) gl_cv_func_mbrtowc_retval="guessing yes" ;; esac if test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none; then if test "$cross_compiling" = yes; then { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling See \`config.log' for more details." >&5 echo "$as_me: error: cannot run test program while cross compiling See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } 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 int main () { /* This fails on Solaris. */ if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL) { char input[] = "B\303\274\303\237er"; /* "Büßer" */ mbstate_t state; wchar_t wc; memset (&state, '\0', sizeof (mbstate_t)); if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2)) { input[1] = '\0'; if (mbrtowc (&wc, input + 2, 5, &state) != 1) return 1; } } /* This fails on HP-UX 11.11. */ if (setlocale (LC_ALL, "$LOCALE_JA") != NULL) { char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */ mbstate_t state; wchar_t wc; memset (&state, '\0', sizeof (mbstate_t)); if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2)) { input[1] = '\0'; if (mbrtowc (&wc, input + 2, 5, &state) != 2) return 1; } } 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 gl_cv_func_mbrtowc_retval=yes 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 ) gl_cv_func_mbrtowc_retval=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: $gl_cv_func_mbrtowc_retval" >&5 echo "${ECHO_T}$gl_cv_func_mbrtowc_retval" >&6; } { echo "$as_me:$LINENO: checking whether mbrtowc returns 0 when parsing a NUL character" >&5 echo $ECHO_N "checking whether mbrtowc returns 0 when parsing a NUL character... $ECHO_C" >&6; } if test "${gl_cv_func_mbrtowc_nul_retval+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case "$host_os" in # Guess no on Solaris 9. solaris2.9) gl_cv_func_mbrtowc_nul_retval="guessing no" ;; # Guess yes otherwise. *) gl_cv_func_mbrtowc_nul_retval="guessing yes" ;; esac if test $LOCALE_ZH_CN != none; then if test "$cross_compiling" = yes; then { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling See \`config.log' for more details." >&5 echo "$as_me: error: cannot run test program while cross compiling See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } 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 int main () { /* This fails on Solaris 9. */ if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL) { mbstate_t state; wchar_t wc; memset (&state, '\0', sizeof (mbstate_t)); if (mbrtowc (&wc, "", 1, &state) != 0) return 1; } 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 gl_cv_func_mbrtowc_nul_retval=yes 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 ) gl_cv_func_mbrtowc_nul_retval=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: $gl_cv_func_mbrtowc_nul_retval" >&5 echo "${ECHO_T}$gl_cv_func_mbrtowc_nul_retval" >&6; } case "$gl_cv_func_mbrtowc_null_arg" in *yes) ;; *) cat >>confdefs.h <<\_ACEOF #define MBRTOWC_NULL_ARG_BUG 1 _ACEOF REPLACE_MBRTOWC=1 ;; esac case "$gl_cv_func_mbrtowc_retval" in *yes) ;; *) cat >>confdefs.h <<\_ACEOF #define MBRTOWC_RETVAL_BUG 1 _ACEOF REPLACE_MBRTOWC=1 ;; esac case "$gl_cv_func_mbrtowc_nul_retval" in *yes) ;; *) cat >>confdefs.h <<\_ACEOF #define MBRTOWC_NUL_RETVAL_BUG 1 _ACEOF REPLACE_MBRTOWC=1 ;; esac fi if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then WCHAR_H=wchar.h gl_LIBOBJS="$gl_LIBOBJS mbrtowc.$ac_objext" : fi GNULIB_MBRTOWC=1 : : if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then { echo "$as_me:$LINENO: checking whether mbrtowc handles incomplete characters" >&5 echo $ECHO_N "checking whether mbrtowc handles incomplete characters... $ECHO_C" >&6; } if test "${gl_cv_func_mbrtowc_incomplete_state+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case "$host_os" in # Guess no on AIX and OSF/1. osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;; # Guess yes otherwise. *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;; esac if test $LOCALE_JA != none; then if test "$cross_compiling" = yes; then { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling See \`config.log' for more details." >&5 echo "$as_me: error: cannot run test program while cross compiling See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } 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 int main () { if (setlocale (LC_ALL, "$LOCALE_JA") != NULL) { const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */ mbstate_t state; wchar_t wc; memset (&state, '\0', sizeof (mbstate_t)); if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2)) if (mbsinit (&state)) return 1; } 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 gl_cv_func_mbrtowc_incomplete_state=yes 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 ) gl_cv_func_mbrtowc_incomplete_state=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: $gl_cv_func_mbrtowc_incomplete_state" >&5 echo "${ECHO_T}$gl_cv_func_mbrtowc_incomplete_state" >&6; } case "$gl_cv_func_mbrtowc_incomplete_state" in *yes) REPLACE_MBSTATE_T=0 ;; *) REPLACE_MBSTATE_T=1 ;; esac else REPLACE_MBSTATE_T=1 fi if test $REPLACE_MBSTATE_T = 1; then WCHAR_H=wchar.h fi if test $REPLACE_MBSTATE_T = 1; then REPLACE_MBSINIT=1 fi : if test $ac_cv_func_mbsinit = no; then HAVE_MBSINIT=0 fi if test $HAVE_MBSINIT = 0 || test $REPLACE_MBSINIT = 1; then WCHAR_H=wchar.h gl_LIBOBJS="$gl_LIBOBJS mbsinit.$ac_objext" : fi GNULIB_MBSINIT=1 : GNULIB_MBSLEN=1 : GNULIB_MBSSTR=1 : for ac_func in memmove do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } if { as_var=$as_ac_var; 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. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* 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 $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; 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 eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval echo '${'$as_ac_var'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF else gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext" fi done if test $ac_cv_func_memmove = no; then : fi { echo "$as_me:$LINENO: checking for working mkstemp" >&5 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6; } if test "${gl_cv_func_working_mkstemp+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else mkdir conftest.mkstemp if test "$cross_compiling" = yes; then gl_cv_func_working_mkstemp=no 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 int main () { int i; off_t large = (off_t) 4294967295u; if (large < 0) large = 2147483647; for (i = 0; i < 70; i++) { char templ[] = "conftest.mkstemp/coXXXXXX"; int (*mkstemp_function) (char *) = mkstemp; int fd = mkstemp_function (templ); if (fd < 0 || lseek (fd, large, SEEK_SET) != large) return 1; close (fd); } return 0; ; 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 gl_cv_func_working_mkstemp=yes 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 ) gl_cv_func_working_mkstemp=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi rm -rf conftest.mkstemp fi { echo "$as_me:$LINENO: result: $gl_cv_func_working_mkstemp" >&5 echo "${ECHO_T}$gl_cv_func_working_mkstemp" >&6; } if test $gl_cv_func_working_mkstemp != yes; then REPLACE_MKSTEMP=1 gl_LIBOBJS="$gl_LIBOBJS mkstemp.$ac_objext" fi GNULIB_MKSTEMP=1 : nanosleep_save_libs=$LIBS # Solaris 2.5.1 needs -lposix4 to get the nanosleep function. # Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4. { echo "$as_me:$LINENO: checking for library containing nanosleep" >&5 echo $ECHO_N "checking for library containing nanosleep... $ECHO_C" >&6; } if test "${ac_cv_search_nanosleep+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_func_search_save_LIBS=$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 nanosleep (); int main () { return nanosleep (); ; return 0; } _ACEOF for ac_lib in '' rt posix4; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi 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_search_nanosleep=$ac_res else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext if test "${ac_cv_search_nanosleep+set}" = set; then break fi done if test "${ac_cv_search_nanosleep+set}" = set; then : else ac_cv_search_nanosleep=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_search_nanosleep" >&5 echo "${ECHO_T}$ac_cv_search_nanosleep" >&6; } ac_res=$ac_cv_search_nanosleep if test "$ac_res" != no; then test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" test "$ac_cv_search_nanosleep" = "none required" || LIB_NANOSLEEP=$ac_cv_search_nanosleep fi if test $APPLE_UNIVERSAL_BUILD = 1; then # A universal build on Apple MacOS X platforms. # The test result would be 'no (mishandles large arguments)' in 64-bit mode # but 'yes' in 32-bit mode. But we need a configuration result that is # valid in both modes. gl_cv_func_nanosleep='no (mishandles large arguments)' fi { echo "$as_me:$LINENO: checking for working nanosleep" >&5 echo $ECHO_N "checking for working nanosleep... $ECHO_C" >&6; } if test "${gl_cv_func_nanosleep+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then gl_cv_func_nanosleep=cross-compiling 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 #if HAVE_SYS_TIME_H #include #endif #include #include #define TYPE_SIGNED(t) (! ((t) 0 < (t) -1)) #define TYPE_MAXIMUM(t) \ ((t) (! TYPE_SIGNED (t) \ ? (t) -1 \ : ~ (~ (t) 0 << (sizeof (t) * CHAR_BIT - 1)))) static void check_for_SIGALRM (int sig) { if (sig != SIGALRM) _exit (1); } int main () { static struct timespec ts_sleep; static struct timespec ts_remaining; static struct sigaction act; if (! nanosleep) return 1; act.sa_handler = check_for_SIGALRM; sigemptyset (&act.sa_mask); sigaction (SIGALRM, &act, NULL); ts_sleep.tv_sec = 0; ts_sleep.tv_nsec = 1; alarm (1); if (nanosleep (&ts_sleep, NULL) != 0) return 1; ts_sleep.tv_sec = TYPE_MAXIMUM (time_t); ts_sleep.tv_nsec = 999999999; alarm (1); if (nanosleep (&ts_sleep, &ts_remaining) == -1 && errno == EINTR && TYPE_MAXIMUM (time_t) - 10 < ts_remaining.tv_sec) return 0; return 119; } _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 gl_cv_func_nanosleep=yes 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 ) case $? in 119) gl_cv_func_nanosleep='no (mishandles large arguments)';; *) gl_cv_func_nanosleep=no;; esac fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { echo "$as_me:$LINENO: result: $gl_cv_func_nanosleep" >&5 echo "${ECHO_T}$gl_cv_func_nanosleep" >&6; } if test "$gl_cv_func_nanosleep" = yes; then REPLACE_NANOSLEEP=0 else REPLACE_NANOSLEEP=1 if test "$gl_cv_func_nanosleep" = 'no (mishandles large arguments)'; then cat >>confdefs.h <<\_ACEOF #define HAVE_BUG_BIG_NANOSLEEP 1 _ACEOF for ac_lib in $LIB_CLOCK_GETTIME; do case " $LIB_NANOSLEEP " in *" $ac_lib "*) ;; *) LIB_NANOSLEEP="$LIB_NANOSLEEP $ac_lib";; esac done fi gl_LIBOBJS="$gl_LIBOBJS nanosleep.$ac_objext" : fi LIBS=$nanosleep_save_libs case "$host_os" in mingw* | pw*) if test $REPLACE_OPEN != 1; then gl_LIBOBJS="$gl_LIBOBJS open.$ac_objext" : fi REPLACE_OPEN=1 ;; *) { echo "$as_me:$LINENO: checking whether open recognizes a trailing slash" >&5 echo $ECHO_N "checking whether open recognizes a trailing slash... $ECHO_C" >&6; } if test "${gl_cv_func_open_slash+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then case "$host_os" in solaris2.[0-9]*) gl_cv_func_open_slash="guessing no" ;; hpux*) gl_cv_func_open_slash="guessing no" ;; *) gl_cv_func_open_slash="guessing yes" ;; esac else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #if HAVE_UNISTD_H # include #endif int main () { return open ("conftest.sl/", O_CREAT, 0600) >= 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 gl_cv_func_open_slash=yes 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 ) gl_cv_func_open_slash=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.sl fi { echo "$as_me:$LINENO: result: $gl_cv_func_open_slash" >&5 echo "${ECHO_T}$gl_cv_func_open_slash" >&6; } case "$gl_cv_func_open_slash" in *no) cat >>confdefs.h <<\_ACEOF #define OPEN_TRAILING_SLASH_BUG 1 _ACEOF if test $REPLACE_OPEN != 1; then gl_LIBOBJS="$gl_LIBOBJS open.$ac_objext" : fi REPLACE_OPEN=1 ;; esac ;; esac cat >>confdefs.h <<\_ACEOF #define GNULIB_OPEN 1 _ACEOF GNULIB_OPEN=1 { echo "$as_me:$LINENO: checking for putenv compatible with GNU and SVID" >&5 echo $ECHO_N "checking for putenv compatible with GNU and SVID... $ECHO_C" >&6; } if test "${gl_cv_func_svid_putenv+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then gl_cv_func_svid_putenv=no 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 int main () { /* Put it in env. */ if (putenv ("CONFTEST_putenv=val")) return 1; /* Try to remove it. */ if (putenv ("CONFTEST_putenv")) return 1; /* Make sure it was deleted. */ if (getenv ("CONFTEST_putenv") != 0) return 1; return 0; ; 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 gl_cv_func_svid_putenv=yes 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 ) gl_cv_func_svid_putenv=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { echo "$as_me:$LINENO: result: $gl_cv_func_svid_putenv" >&5 echo "${ECHO_T}$gl_cv_func_svid_putenv" >&6; } if test $gl_cv_func_svid_putenv = no; then REPLACE_PUTENV=1 gl_LIBOBJS="$gl_LIBOBJS putenv.$ac_objext" fi GNULIB_PUTENV=1 gl_LIBOBJS="$gl_LIBOBJS quote.$ac_objext" gl_LIBOBJS="$gl_LIBOBJS quotearg.$ac_objext" : { echo "$as_me:$LINENO: checking for mbstate_t" >&5 echo $ECHO_N "checking for mbstate_t... $ECHO_C" >&6; } if test "${ac_cv_type_mbstate_t+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 int main () { mbstate_t x; return sizeof x; ; 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_type_mbstate_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_mbstate_t=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_type_mbstate_t" >&5 echo "${ECHO_T}$ac_cv_type_mbstate_t" >&6; } if test $ac_cv_type_mbstate_t = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_MBSTATE_T 1 _ACEOF else cat >>confdefs.h <<\_ACEOF #define mbstate_t int _ACEOF fi { echo "$as_me:$LINENO: checking whether mbrtowc and mbstate_t are properly declared" >&5 echo $ECHO_N "checking whether mbrtowc and mbstate_t are properly declared... $ECHO_C" >&6; } if test "${ac_cv_func_mbrtowc+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 int main () { wchar_t wc; char const s[] = ""; size_t n = 1; mbstate_t state; return ! (sizeof state && (mbrtowc) (&wc, s, n, &state)); ; 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_func_mbrtowc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_mbrtowc=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_func_mbrtowc" >&5 echo "${ECHO_T}$ac_cv_func_mbrtowc" >&6; } if test $ac_cv_func_mbrtowc = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_MBRTOWC 1 _ACEOF fi : if test $ac_cv_func_readlink = no; then HAVE_READLINK=0 gl_LIBOBJS="$gl_LIBOBJS readlink.$ac_objext" : fi GNULIB_READLINK=1 { echo "$as_me:$LINENO: checking whether rename is broken" >&5 echo $ECHO_N "checking whether rename is broken... $ECHO_C" >&6; } if test "${gl_cv_func_rename_trailing_slash_bug+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else rm -rf conftest.d1 conftest.d2 mkdir conftest.d1 || { { echo "$as_me:$LINENO: error: cannot create temporary directory" >&5 echo "$as_me: error: cannot create temporary directory" >&2;} { (exit 1); exit 1; }; } if test "$cross_compiling" = yes; then gl_cv_func_rename_trailing_slash_bug=yes 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 int main () { exit (rename ("conftest.d1/", "conftest.d2") ? 1 : 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 gl_cv_func_rename_trailing_slash_bug=no 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 ) gl_cv_func_rename_trailing_slash_bug=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi rm -rf conftest.d1 conftest.d2 fi { echo "$as_me:$LINENO: result: $gl_cv_func_rename_trailing_slash_bug" >&5 echo "${ECHO_T}$gl_cv_func_rename_trailing_slash_bug" >&6; } if test $gl_cv_func_rename_trailing_slash_bug = yes; then gl_LIBOBJS="$gl_LIBOBJS rename.$ac_objext" cat >>confdefs.h <<\_ACEOF #define rename rpl_rename _ACEOF cat >>confdefs.h <<\_ACEOF #define RENAME_TRAILING_SLASH_BUG 1 _ACEOF : fi gl_LIBOBJS="$gl_LIBOBJS safe-read.$ac_objext" gl_LIBOBJS="$gl_LIBOBJS safe-write.$ac_objext" : if test $ac_cv_func_sigaction = yes; then { echo "$as_me:$LINENO: checking for struct sigaction.sa_sigaction" >&5 echo $ECHO_N "checking for struct sigaction.sa_sigaction... $ECHO_C" >&6; } if test "${ac_cv_member_struct_sigaction_sa_sigaction+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 int main () { static struct sigaction ac_aggr; if (ac_aggr.sa_sigaction) return 0; ; 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_member_struct_sigaction_sa_sigaction=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { static struct sigaction ac_aggr; if (sizeof ac_aggr.sa_sigaction) return 0; ; 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_member_struct_sigaction_sa_sigaction=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_member_struct_sigaction_sa_sigaction=no 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 { echo "$as_me:$LINENO: result: $ac_cv_member_struct_sigaction_sa_sigaction" >&5 echo "${ECHO_T}$ac_cv_member_struct_sigaction_sa_sigaction" >&6; } if test $ac_cv_member_struct_sigaction_sa_sigaction = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_STRUCT_SIGACTION_SA_SIGACTION 1 _ACEOF fi if test $ac_cv_member_struct_sigaction_sa_sigaction = no; then HAVE_STRUCT_SIGACTION_SA_SIGACTION=0 fi else HAVE_SIGACTION=0 gl_LIBOBJS="$gl_LIBOBJS sigaction.$ac_objext" : { echo "$as_me:$LINENO: checking for siginfo_t" >&5 echo $ECHO_N "checking for siginfo_t... $ECHO_C" >&6; } if test "${ac_cv_type_siginfo_t+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 typedef siginfo_t ac__type_new_; int main () { if ((ac__type_new_ *) 0) return 0; if (sizeof (ac__type_new_)) return 0; ; 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_type_siginfo_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_siginfo_t=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_type_siginfo_t" >&5 echo "${ECHO_T}$ac_cv_type_siginfo_t" >&6; } if test $ac_cv_type_siginfo_t = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_SIGINFO_T 1 _ACEOF fi if test $ac_cv_type_siginfo_t = no; then HAVE_SIGINFO_T=0 fi fi GNULIB_SIGACTION=1 : if test $gl_cv_have_include_next = yes; then gl_cv_next_signal_h='<'signal.h'>' else { echo "$as_me:$LINENO: checking absolute name of " >&5 echo $ECHO_N "checking absolute name of ... $ECHO_C" >&6; } if test "${gl_cv_next_signal_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test $ac_cv_header_signal_h = yes; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF case "$host_os" in aix*) gl_absname_cpp="$ac_cpp -C" ;; *) gl_absname_cpp="$ac_cpp" ;; esac gl_cv_next_signal_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | sed -n '\#/signal.h#{ s#.*"\(.*/signal.h\)".*#\1# s#^/[^/]#//&# p q }'`'"' else gl_cv_next_signal_h='<'signal.h'>' fi fi { echo "$as_me:$LINENO: result: $gl_cv_next_signal_h" >&5 echo "${ECHO_T}$gl_cv_next_signal_h" >&6; } fi NEXT_SIGNAL_H=$gl_cv_next_signal_h signals_not_posix= 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 "sigset_t" >/dev/null 2>&1; then : else signals_not_posix=1 fi rm -f conftest* if test -z "$signals_not_posix"; then { echo "$as_me:$LINENO: checking for sigprocmask" >&5 echo $ECHO_N "checking for sigprocmask... $ECHO_C" >&6; } if test "${ac_cv_func_sigprocmask+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. */ /* Define sigprocmask to an innocuous variant, in case declares sigprocmask. For example, HP-UX 11i declares gettimeofday. */ #define sigprocmask innocuous_sigprocmask /* System header to define __stub macros and hopefully few prototypes, which can conflict with char sigprocmask (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef sigprocmask /* 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 sigprocmask (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_sigprocmask || defined __stub___sigprocmask choke me #endif int main () { return sigprocmask (); ; 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_func_sigprocmask=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_sigprocmask=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_func_sigprocmask" >&5 echo "${ECHO_T}$ac_cv_func_sigprocmask" >&6; } if test $ac_cv_func_sigprocmask = yes; then gl_cv_func_sigprocmask=1 fi fi if test -z "$gl_cv_func_sigprocmask"; then HAVE_POSIX_SIGNALBLOCKING=0 gl_LIBOBJS="$gl_LIBOBJS sigprocmask.$ac_objext" { echo "$as_me:$LINENO: checking for sigset_t" >&5 echo $ECHO_N "checking for sigset_t... $ECHO_C" >&6; } if test "${ac_cv_type_sigset_t+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 /* Mingw defines sigset_t not in , but in . */ #include typedef sigset_t ac__type_new_; int main () { if ((ac__type_new_ *) 0) return 0; if (sizeof (ac__type_new_)) return 0; ; 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_type_sigset_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_sigset_t=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_type_sigset_t" >&5 echo "${ECHO_T}$ac_cv_type_sigset_t" >&6; } if test $ac_cv_type_sigset_t = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_SIGSET_T 1 _ACEOF gl_cv_type_sigset_t=yes else gl_cv_type_sigset_t=no fi if test $gl_cv_type_sigset_t != yes; then HAVE_SIGSET_T=0 fi fi GNULIB_SIGPROCMASK=1 { echo "$as_me:$LINENO: checking for ssize_t" >&5 echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6; } if test "${gt_cv_ssize_t+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 int main () { int x = sizeof (ssize_t *) + sizeof (ssize_t); return !x; ; 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 gt_cv_ssize_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gt_cv_ssize_t=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $gt_cv_ssize_t" >&5 echo "${ECHO_T}$gt_cv_ssize_t" >&6; } if test $gt_cv_ssize_t = no; then cat >>confdefs.h <<\_ACEOF #define ssize_t int _ACEOF fi # Define two additional variables used in the Makefile substitution. if test "$ac_cv_header_stdbool_h" = yes; then STDBOOL_H='' else STDBOOL_H='stdbool.h' fi if test "$ac_cv_type__Bool" = yes; then HAVE__BOOL=1 else HAVE__BOOL=0 fi if test $ac_cv_type_long_long_int = yes; then HAVE_LONG_LONG_INT=1 else HAVE_LONG_LONG_INT=0 fi if test $ac_cv_type_unsigned_long_long_int = yes; then HAVE_UNSIGNED_LONG_LONG_INT=1 else HAVE_UNSIGNED_LONG_LONG_INT=0 fi if test $ac_cv_header_inttypes_h = yes; then HAVE_INTTYPES_H=1 else HAVE_INTTYPES_H=0 fi if test $ac_cv_header_sys_types_h = yes; then HAVE_SYS_TYPES_H=1 else HAVE_SYS_TYPES_H=0 fi : if test $gl_cv_have_include_next = yes; then gl_cv_next_stdint_h='<'stdint.h'>' else { echo "$as_me:$LINENO: checking absolute name of " >&5 echo $ECHO_N "checking absolute name of ... $ECHO_C" >&6; } if test "${gl_cv_next_stdint_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test $ac_cv_header_stdint_h = yes; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF case "$host_os" in aix*) gl_absname_cpp="$ac_cpp -C" ;; *) gl_absname_cpp="$ac_cpp" ;; esac gl_cv_next_stdint_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | sed -n '\#/stdint.h#{ s#.*"\(.*/stdint.h\)".*#\1# s#^/[^/]#//&# p q }'`'"' else gl_cv_next_stdint_h='<'stdint.h'>' fi fi { echo "$as_me:$LINENO: result: $gl_cv_next_stdint_h" >&5 echo "${ECHO_T}$gl_cv_next_stdint_h" >&6; } fi NEXT_STDINT_H=$gl_cv_next_stdint_h if test $ac_cv_header_stdint_h = yes; then HAVE_STDINT_H=1 else HAVE_STDINT_H=0 fi if test $ac_cv_header_stdint_h = yes; then { echo "$as_me:$LINENO: checking whether stdint.h conforms to C99" >&5 echo $ECHO_N "checking whether stdint.h conforms to C99... $ECHO_C" >&6; } if test "${gl_cv_header_working_stdint_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else gl_cv_header_working_stdint_h=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */ #define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */ #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */ #include /* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in . */ #if !(defined WCHAR_MIN && defined WCHAR_MAX) #error "WCHAR_MIN, WCHAR_MAX not defined in " #endif /* BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #if HAVE_WCHAR_H # include # include # include #endif #ifdef INT8_MAX int8_t a1 = INT8_MAX; int8_t a1min = INT8_MIN; #endif #ifdef INT16_MAX int16_t a2 = INT16_MAX; int16_t a2min = INT16_MIN; #endif #ifdef INT32_MAX int32_t a3 = INT32_MAX; int32_t a3min = INT32_MIN; #endif #ifdef INT64_MAX int64_t a4 = INT64_MAX; int64_t a4min = INT64_MIN; #endif #ifdef UINT8_MAX uint8_t b1 = UINT8_MAX; #else typedef int b1[(unsigned char) -1 != 255 ? 1 : -1]; #endif #ifdef UINT16_MAX uint16_t b2 = UINT16_MAX; #endif #ifdef UINT32_MAX uint32_t b3 = UINT32_MAX; #endif #ifdef UINT64_MAX uint64_t b4 = UINT64_MAX; #endif int_least8_t c1 = INT8_C (0x7f); int_least8_t c1max = INT_LEAST8_MAX; int_least8_t c1min = INT_LEAST8_MIN; int_least16_t c2 = INT16_C (0x7fff); int_least16_t c2max = INT_LEAST16_MAX; int_least16_t c2min = INT_LEAST16_MIN; int_least32_t c3 = INT32_C (0x7fffffff); int_least32_t c3max = INT_LEAST32_MAX; int_least32_t c3min = INT_LEAST32_MIN; int_least64_t c4 = INT64_C (0x7fffffffffffffff); int_least64_t c4max = INT_LEAST64_MAX; int_least64_t c4min = INT_LEAST64_MIN; uint_least8_t d1 = UINT8_C (0xff); uint_least8_t d1max = UINT_LEAST8_MAX; uint_least16_t d2 = UINT16_C (0xffff); uint_least16_t d2max = UINT_LEAST16_MAX; uint_least32_t d3 = UINT32_C (0xffffffff); uint_least32_t d3max = UINT_LEAST32_MAX; uint_least64_t d4 = UINT64_C (0xffffffffffffffff); uint_least64_t d4max = UINT_LEAST64_MAX; int_fast8_t e1 = INT_FAST8_MAX; int_fast8_t e1min = INT_FAST8_MIN; int_fast16_t e2 = INT_FAST16_MAX; int_fast16_t e2min = INT_FAST16_MIN; int_fast32_t e3 = INT_FAST32_MAX; int_fast32_t e3min = INT_FAST32_MIN; int_fast64_t e4 = INT_FAST64_MAX; int_fast64_t e4min = INT_FAST64_MIN; uint_fast8_t f1 = UINT_FAST8_MAX; uint_fast16_t f2 = UINT_FAST16_MAX; uint_fast32_t f3 = UINT_FAST32_MAX; uint_fast64_t f4 = UINT_FAST64_MAX; #ifdef INTPTR_MAX intptr_t g = INTPTR_MAX; intptr_t gmin = INTPTR_MIN; #endif #ifdef UINTPTR_MAX uintptr_t h = UINTPTR_MAX; #endif intmax_t i = INTMAX_MAX; uintmax_t j = UINTMAX_MAX; #include /* for CHAR_BIT */ #define TYPE_MINIMUM(t) \ ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ (t) 0 << (sizeof (t) * CHAR_BIT - 1))) #define TYPE_MAXIMUM(t) \ ((t) ((t) 0 < (t) -1 ? (t) -1 : ~ (~ (t) 0 << (sizeof (t) * CHAR_BIT - 1)))) struct s { int check_PTRDIFF: PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t) && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t) ? 1 : -1; /* Detect bug in FreeBSD 6.0 / ia64. */ int check_SIG_ATOMIC: SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t) && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t) ? 1 : -1; int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1; int check_WCHAR: WCHAR_MIN == TYPE_MINIMUM (wchar_t) && WCHAR_MAX == TYPE_MAXIMUM (wchar_t) ? 1 : -1; /* Detect bug in mingw. */ int check_WINT: WINT_MIN == TYPE_MINIMUM (wint_t) && WINT_MAX == TYPE_MAXIMUM (wint_t) ? 1 : -1; /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */ int check_UINT8_C: (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1; int check_UINT16_C: (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1; /* Detect bugs in OpenBSD 3.9 stdint.h. */ #ifdef UINT8_MAX int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1; #endif #ifdef UINT16_MAX int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1; #endif #ifdef UINT32_MAX int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1; #endif #ifdef UINT64_MAX int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1; #endif int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1; int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1; int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1; int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1; int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1; int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1; int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1; int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1; int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1; int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1; int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1; }; 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 gl_cv_header_working_stdint_h=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 { echo "$as_me:$LINENO: result: $gl_cv_header_working_stdint_h" >&5 echo "${ECHO_T}$gl_cv_header_working_stdint_h" >&6; } fi if test "$gl_cv_header_working_stdint_h" = yes; then STDINT_H= else for ac_header in sys/inttypes.h sys/bitypes.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;} ( cat <<\_ASBOX ## -------------------------------- ## ## Report this to ianb@erislabs.net ## ## -------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&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 if test $ac_cv_header_sys_inttypes_h = yes; then HAVE_SYS_INTTYPES_H=1 else HAVE_SYS_INTTYPES_H=0 fi if test $ac_cv_header_sys_bitypes_h = yes; then HAVE_SYS_BITYPES_H=1 else HAVE_SYS_BITYPES_H=0 fi : if test $APPLE_UNIVERSAL_BUILD = 0; then for gltype in ptrdiff_t size_t ; do { echo "$as_me:$LINENO: checking for bit size of $gltype" >&5 echo $ECHO_N "checking for bit size of $gltype... $ECHO_C" >&6; } if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #if HAVE_WCHAR_H # include # include # include #endif #include int main () { static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) >= 0)]; test_array [0] = 0 ; 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_lo=0 ac_mid=0 while :; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #if HAVE_WCHAR_H # include # include # include #endif #include int main () { static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) <= $ac_mid)]; test_array [0] = 0 ; 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_hi=$ac_mid; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr $ac_mid + 1` if test $ac_lo -le $ac_mid; then ac_lo= ac_hi= break fi ac_mid=`expr 2 '*' $ac_mid + 1` fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #if HAVE_WCHAR_H # include # include # include #endif #include int main () { static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) < 0)]; test_array [0] = 0 ; 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_hi=-1 ac_mid=-1 while :; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #if HAVE_WCHAR_H # include # include # include #endif #include int main () { static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) >= $ac_mid)]; test_array [0] = 0 ; 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_lo=$ac_mid; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_hi=`expr '(' $ac_mid ')' - 1` if test $ac_mid -le $ac_hi; then ac_lo= ac_hi= break fi ac_mid=`expr 2 '*' $ac_mid` fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo= ac_hi= fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # Binary search between lo and hi bounds. while test "x$ac_lo" != "x$ac_hi"; do ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #if HAVE_WCHAR_H # include # include # include #endif #include int main () { static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) <= $ac_mid)]; test_array [0] = 0 ; 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_hi=$ac_mid else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr '(' $ac_mid ')' + 1` fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in ?*) result=$ac_lo;; '') result=unknown ;; esac else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #if HAVE_WCHAR_H # include # include # include #endif #include static long int longval () { return sizeof ($gltype) * CHAR_BIT; } static unsigned long int ulongval () { return sizeof ($gltype) * CHAR_BIT; } #include #include int main () { FILE *f = fopen ("conftest.val", "w"); if (! f) return 1; if ((sizeof ($gltype) * CHAR_BIT) < 0) { long int i = longval (); if (i != (sizeof ($gltype) * CHAR_BIT)) return 1; fprintf (f, "%ld\n", i); } else { unsigned long int i = ulongval (); if (i != (sizeof ($gltype) * CHAR_BIT)) return 1; fprintf (f, "%lu\n", i); } return ferror (f) || fclose (f) != 0; ; 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 result=`cat conftest.val` 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 ) result=unknown fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.val eval gl_cv_bitsizeof_${gltype}=\$result fi ac_res=`eval echo '${'gl_cv_bitsizeof_${gltype}'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } eval result=\$gl_cv_bitsizeof_${gltype} if test $result = unknown; then result=0 fi GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` cat >>confdefs.h <<_ACEOF #define BITSIZEOF_${GLTYPE} $result _ACEOF eval BITSIZEOF_${GLTYPE}=\$result done fi for gltype in sig_atomic_t wchar_t wint_t ; do { echo "$as_me:$LINENO: checking for bit size of $gltype" >&5 echo $ECHO_N "checking for bit size of $gltype... $ECHO_C" >&6; } if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #if HAVE_WCHAR_H # include # include # include #endif #include int main () { static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) >= 0)]; test_array [0] = 0 ; 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_lo=0 ac_mid=0 while :; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #if HAVE_WCHAR_H # include # include # include #endif #include int main () { static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) <= $ac_mid)]; test_array [0] = 0 ; 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_hi=$ac_mid; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr $ac_mid + 1` if test $ac_lo -le $ac_mid; then ac_lo= ac_hi= break fi ac_mid=`expr 2 '*' $ac_mid + 1` fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #if HAVE_WCHAR_H # include # include # include #endif #include int main () { static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) < 0)]; test_array [0] = 0 ; 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_hi=-1 ac_mid=-1 while :; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #if HAVE_WCHAR_H # include # include # include #endif #include int main () { static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) >= $ac_mid)]; test_array [0] = 0 ; 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_lo=$ac_mid; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_hi=`expr '(' $ac_mid ')' - 1` if test $ac_mid -le $ac_hi; then ac_lo= ac_hi= break fi ac_mid=`expr 2 '*' $ac_mid` fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo= ac_hi= fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # Binary search between lo and hi bounds. while test "x$ac_lo" != "x$ac_hi"; do ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #if HAVE_WCHAR_H # include # include # include #endif #include int main () { static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) <= $ac_mid)]; test_array [0] = 0 ; 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_hi=$ac_mid else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr '(' $ac_mid ')' + 1` fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in ?*) result=$ac_lo;; '') result=unknown ;; esac else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #if HAVE_WCHAR_H # include # include # include #endif #include static long int longval () { return sizeof ($gltype) * CHAR_BIT; } static unsigned long int ulongval () { return sizeof ($gltype) * CHAR_BIT; } #include #include int main () { FILE *f = fopen ("conftest.val", "w"); if (! f) return 1; if ((sizeof ($gltype) * CHAR_BIT) < 0) { long int i = longval (); if (i != (sizeof ($gltype) * CHAR_BIT)) return 1; fprintf (f, "%ld\n", i); } else { unsigned long int i = ulongval (); if (i != (sizeof ($gltype) * CHAR_BIT)) return 1; fprintf (f, "%lu\n", i); } return ferror (f) || fclose (f) != 0; ; 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 result=`cat conftest.val` 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 ) result=unknown fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.val eval gl_cv_bitsizeof_${gltype}=\$result fi ac_res=`eval echo '${'gl_cv_bitsizeof_${gltype}'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } eval result=\$gl_cv_bitsizeof_${gltype} if test $result = unknown; then result=0 fi GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` cat >>confdefs.h <<_ACEOF #define BITSIZEOF_${GLTYPE} $result _ACEOF eval BITSIZEOF_${GLTYPE}=\$result done for gltype in sig_atomic_t wchar_t wint_t ; do { echo "$as_me:$LINENO: checking whether $gltype is signed" >&5 echo $ECHO_N "checking whether $gltype is signed... $ECHO_C" >&6; } if { as_var=gl_cv_type_${gltype}_signed; 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. */ /* BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #if HAVE_WCHAR_H # include # include # include #endif int verify[2 * (($gltype) -1 < ($gltype) 0) - 1]; 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 result=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 result=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext eval gl_cv_type_${gltype}_signed=\$result fi ac_res=`eval echo '${'gl_cv_type_${gltype}_signed'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } eval result=\$gl_cv_type_${gltype}_signed GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` if test "$result" = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_SIGNED_${GLTYPE} 1 _ACEOF eval HAVE_SIGNED_${GLTYPE}=1 else eval HAVE_SIGNED_${GLTYPE}=0 fi done gl_cv_type_ptrdiff_t_signed=yes gl_cv_type_size_t_signed=no if test $APPLE_UNIVERSAL_BUILD = 0; then for gltype in ptrdiff_t size_t ; do { echo "$as_me:$LINENO: checking for $gltype integer literal suffix" >&5 echo $ECHO_N "checking for $gltype integer literal suffix... $ECHO_C" >&6; } if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval gl_cv_type_${gltype}_suffix=no eval result=\$gl_cv_type_${gltype}_signed if test "$result" = yes; then glsufu= else glsufu=u fi for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do case $glsuf in '') gltype1='int';; l) gltype1='long int';; ll) gltype1='long long int';; i64) gltype1='__int64';; u) gltype1='unsigned int';; ul) gltype1='unsigned long int';; ull) gltype1='unsigned long long int';; ui64)gltype1='unsigned __int64';; esac cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #if HAVE_WCHAR_H # include # include # include #endif extern $gltype foo; extern $gltype1 foo; 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 eval gl_cv_type_${gltype}_suffix=\$glsuf 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 eval result=\$gl_cv_type_${gltype}_suffix test "$result" != no && break done fi ac_res=`eval echo '${'gl_cv_type_${gltype}_suffix'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` eval result=\$gl_cv_type_${gltype}_suffix test "$result" = no && result= eval ${GLTYPE}_SUFFIX=\$result cat >>confdefs.h <<_ACEOF #define ${GLTYPE}_SUFFIX $result _ACEOF done fi for gltype in sig_atomic_t wchar_t wint_t ; do { echo "$as_me:$LINENO: checking for $gltype integer literal suffix" >&5 echo $ECHO_N "checking for $gltype integer literal suffix... $ECHO_C" >&6; } if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval gl_cv_type_${gltype}_suffix=no eval result=\$gl_cv_type_${gltype}_signed if test "$result" = yes; then glsufu= else glsufu=u fi for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do case $glsuf in '') gltype1='int';; l) gltype1='long int';; ll) gltype1='long long int';; i64) gltype1='__int64';; u) gltype1='unsigned int';; ul) gltype1='unsigned long int';; ull) gltype1='unsigned long long int';; ui64)gltype1='unsigned __int64';; esac cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #if HAVE_WCHAR_H # include # include # include #endif extern $gltype foo; extern $gltype1 foo; 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 eval gl_cv_type_${gltype}_suffix=\$glsuf 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 eval result=\$gl_cv_type_${gltype}_suffix test "$result" != no && break done fi ac_res=`eval echo '${'gl_cv_type_${gltype}_suffix'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` eval result=\$gl_cv_type_${gltype}_suffix test "$result" = no && result= eval ${GLTYPE}_SUFFIX=\$result cat >>confdefs.h <<_ACEOF #define ${GLTYPE}_SUFFIX $result _ACEOF done STDINT_H=stdint.h fi : if test $gl_cv_have_include_next = yes; then gl_cv_next_stdlib_h='<'stdlib.h'>' else { echo "$as_me:$LINENO: checking absolute name of " >&5 echo $ECHO_N "checking absolute name of ... $ECHO_C" >&6; } if test "${gl_cv_next_stdlib_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test $ac_cv_header_stdlib_h = yes; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF case "$host_os" in aix*) gl_absname_cpp="$ac_cpp -C" ;; *) gl_absname_cpp="$ac_cpp" ;; esac gl_cv_next_stdlib_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | sed -n '\#/stdlib.h#{ s#.*"\(.*/stdlib.h\)".*#\1# s#^/[^/]#//&# p q }'`'"' else gl_cv_next_stdlib_h='<'stdlib.h'>' fi fi { echo "$as_me:$LINENO: result: $gl_cv_next_stdlib_h" >&5 echo "${ECHO_T}$gl_cv_next_stdlib_h" >&6; } fi NEXT_STDLIB_H=$gl_cv_next_stdlib_h for ac_header in random.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;} ( cat <<\_ASBOX ## -------------------------------- ## ## Report this to ianb@erislabs.net ## ## -------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&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 if test $ac_cv_header_random_h = yes; then HAVE_RANDOM_H=1 else HAVE_RANDOM_H=0 fi { echo "$as_me:$LINENO: checking for struct random_data" >&5 echo $ECHO_N "checking for struct random_data... $ECHO_C" >&6; } if test "${ac_cv_type_struct_random_data+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 #if HAVE_RANDOM_H # include #endif typedef struct random_data ac__type_new_; int main () { if ((ac__type_new_ *) 0) return 0; if (sizeof (ac__type_new_)) return 0; ; 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_type_struct_random_data=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_struct_random_data=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_type_struct_random_data" >&5 echo "${ECHO_T}$ac_cv_type_struct_random_data" >&6; } if test $ac_cv_type_struct_random_data = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_STRUCT_RANDOM_DATA 1 _ACEOF else HAVE_STRUCT_RANDOM_DATA=0 fi for ac_func in strcasecmp do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } if { as_var=$as_ac_var; 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. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* 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 $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; 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 eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval echo '${'$as_ac_var'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF else gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext" fi done if test $ac_cv_func_strcasecmp = no; then HAVE_STRCASECMP=0 : fi for ac_func in strncasecmp do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } if { as_var=$as_ac_var; 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. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* 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 $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; 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 eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval echo '${'$as_ac_var'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF else gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext" fi done if test $ac_cv_func_strncasecmp = no; then : fi { echo "$as_me:$LINENO: checking whether strncasecmp is declared" >&5 echo $ECHO_N "checking whether strncasecmp is declared... $ECHO_C" >&6; } if test "${ac_cv_have_decl_strncasecmp+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 int main () { #ifndef strncasecmp (void) strncasecmp; #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_cv_have_decl_strncasecmp=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_have_decl_strncasecmp=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_have_decl_strncasecmp" >&5 echo "${ECHO_T}$ac_cv_have_decl_strncasecmp" >&6; } if test $ac_cv_have_decl_strncasecmp = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_DECL_STRNCASECMP 1 _ACEOF else cat >>confdefs.h <<_ACEOF #define HAVE_DECL_STRNCASECMP 0 _ACEOF fi if test $ac_cv_have_decl_strncasecmp = no; then HAVE_DECL_STRNCASECMP=0 fi if test $ac_cv_func_strcasestr = yes; then { echo "$as_me:$LINENO: checking whether strcasestr works in linear time" >&5 echo $ECHO_N "checking whether strcasestr works in linear time... $ECHO_C" >&6; } if test "${gl_cv_func_strcasestr_linear+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #ifdef __GNU_LIBRARY__ #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 9) || (__GLIBC__ > 2) Lucky user #endif #endif #ifdef __CYGWIN__ #include #if CYGWIN_VERSION_DLL_MAJOR >= 1007 Lucky user #endif #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "Lucky user" >/dev/null 2>&1; then gl_cv_func_strcasestr_linear=yes else gl_cv_func_strcasestr_linear="guessing no" fi rm -f conftest* else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include /* for signal */ #include /* for memmem */ #include /* for malloc */ #include /* for alarm */ int main () { size_t m = 1000000; char *haystack = (char *) malloc (2 * m + 2); char *needle = (char *) malloc (m + 2); void *result = 0; /* Failure to compile this test due to missing alarm is okay, since all such platforms (mingw) also lack strcasestr. */ signal (SIGALRM, SIG_DFL); alarm (5); /* Check for quadratic performance. */ if (haystack && needle) { memset (haystack, 'A', 2 * m); haystack[2 * m] = 'B'; haystack[2 * m + 1] = 0; memset (needle, 'A', m); needle[m] = 'B'; needle[m + 1] = 0; result = strcasestr (haystack, needle); } return !result; ; 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 gl_cv_func_strcasestr_linear=yes 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 ) gl_cv_func_strcasestr_linear=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { echo "$as_me:$LINENO: result: $gl_cv_func_strcasestr_linear" >&5 echo "${ECHO_T}$gl_cv_func_strcasestr_linear" >&6; } if test "$gl_cv_func_strcasestr_linear" != yes; then REPLACE_STRCASESTR=1 gl_LIBOBJS="$gl_LIBOBJS strcasestr.$ac_objext" fi fi for ac_func in strcasestr do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } if { as_var=$as_ac_var; 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. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* 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 $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; 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 eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval echo '${'$as_ac_var'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF else gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext" fi done if test $ac_cv_func_strcasestr = no; then HAVE_STRCASESTR=0 : fi GNULIB_STRCASESTR=1 if test $REPLACE_STRERROR = 1; then gl_LIBOBJS="$gl_LIBOBJS strerror.$ac_objext" cat >>confdefs.h <<_ACEOF #define REPLACE_STRERROR $REPLACE_STRERROR _ACEOF fi GNULIB_STRERROR=1 : if test $ac_cv_have_decl_strndup = no; then HAVE_DECL_STRNDUP=0 fi # AIX 4.3.3, AIX 5.1 have a function that fails to add the terminating '\0'. { echo "$as_me:$LINENO: checking for working strndup" >&5 echo $ECHO_N "checking for working strndup... $ECHO_C" >&6; } if test "${gl_cv_func_strndup+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then { echo "$as_me:$LINENO: checking for strndup" >&5 echo $ECHO_N "checking for strndup... $ECHO_C" >&6; } if test "${ac_cv_func_strndup+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. */ /* Define strndup to an innocuous variant, in case declares strndup. For example, HP-UX 11i declares gettimeofday. */ #define strndup innocuous_strndup /* System header to define __stub macros and hopefully few prototypes, which can conflict with char strndup (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef strndup /* 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 strndup (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_strndup || defined __stub___strndup choke me #endif int main () { return strndup (); ; 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_func_strndup=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_strndup=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_func_strndup" >&5 echo "${ECHO_T}$ac_cv_func_strndup" >&6; } if test $ac_cv_func_strndup = yes; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef _AIX too risky #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "too risky" >/dev/null 2>&1; then gl_cv_func_strndup=no else gl_cv_func_strndup=yes fi rm -f conftest* else gl_cv_func_strndup=no fi 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 int main () { #ifndef HAVE_DECL_STRNDUP extern char *strndup (const char *, size_t); #endif char *s; s = strndup ("some longer string", 15); free (s); s = strndup ("shorter string", 13); return s[13] != '\0'; ; 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 gl_cv_func_strndup=yes 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 ) gl_cv_func_strndup=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { echo "$as_me:$LINENO: result: $gl_cv_func_strndup" >&5 echo "${ECHO_T}$gl_cv_func_strndup" >&6; } if test $gl_cv_func_strndup = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_STRNDUP 1 _ACEOF else HAVE_STRNDUP=0 gl_LIBOBJS="$gl_LIBOBJS strndup.$ac_objext" : fi GNULIB_STRNDUP=1 : if test $ac_cv_have_decl_strnlen = no; then HAVE_DECL_STRNLEN=0 fi { echo "$as_me:$LINENO: checking for working strnlen" >&5 echo $ECHO_N "checking for working strnlen... $ECHO_C" >&6; } if test "${ac_cv_func_strnlen_working+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then ac_cv_func_strnlen_working=no 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 int main () { #define S "foobar" #define S_LEN (sizeof S - 1) /* At least one implementation is buggy: that of AIX 4.3 would give strnlen (S, 1) == 3. */ int i; for (i = 0; i < S_LEN + 1; ++i) { int expected = i <= S_LEN ? i : S_LEN; if (strnlen (S, i) != expected) return 1; } return 0; ; 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 ac_cv_func_strnlen_working=yes 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_func_strnlen_working=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { echo "$as_me:$LINENO: result: $ac_cv_func_strnlen_working" >&5 echo "${ECHO_T}$ac_cv_func_strnlen_working" >&6; } test $ac_cv_func_strnlen_working = no && gl_LIBOBJS="$gl_LIBOBJS strnlen.$ac_objext" if test $ac_cv_func_strnlen_working = no; then # This is necessary because automake-1.6.1 doesn't understand # that the above use of AC_FUNC_STRNLEN means we may have to use # lib/strnlen.c. #AC_LIBOBJ([strnlen]) cat >>confdefs.h <<\_ACEOF #define strnlen rpl_strnlen _ACEOF : fi GNULIB_STRNLEN=1 { echo "$as_me:$LINENO: checking whether defines strtoimax as a macro" >&5 echo $ECHO_N "checking whether defines strtoimax as a macro... $ECHO_C" >&6; } if test "${gl_cv_func_strtoimax_macro+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 #ifdef strtoimax inttypes_h_defines_strtoimax #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "inttypes_h_defines_strtoimax" >/dev/null 2>&1; then gl_cv_func_strtoimax_macro=yes else gl_cv_func_strtoimax_macro=no fi rm -f conftest* fi { echo "$as_me:$LINENO: result: $gl_cv_func_strtoimax_macro" >&5 echo "${ECHO_T}$gl_cv_func_strtoimax_macro" >&6; } if test "$gl_cv_func_strtoimax_macro" != yes; then for ac_func in strtoimax do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } if { as_var=$as_ac_var; 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. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* 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 $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; 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 eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval echo '${'$as_ac_var'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF else gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext" fi done if test $ac_cv_func_strtoimax = no; then { echo "$as_me:$LINENO: checking whether strtoll is declared" >&5 echo $ECHO_N "checking whether strtoll is declared... $ECHO_C" >&6; } if test "${ac_cv_have_decl_strtoll+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 int main () { #ifndef strtoll (void) strtoll; #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_cv_have_decl_strtoll=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_have_decl_strtoll=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_have_decl_strtoll" >&5 echo "${ECHO_T}$ac_cv_have_decl_strtoll" >&6; } if test $ac_cv_have_decl_strtoll = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_DECL_STRTOLL 1 _ACEOF else cat >>confdefs.h <<_ACEOF #define HAVE_DECL_STRTOLL 0 _ACEOF fi fi fi GNULIB_STRTOIMAX=1 for ac_func in strtol do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } if { as_var=$as_ac_var; 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. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* 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 $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; 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 eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval echo '${'$as_ac_var'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF else gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext" fi done if test "$ac_cv_type_long_long_int" = yes; then for ac_func in strtoll do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } if { as_var=$as_ac_var; 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. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* 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 $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; 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 eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval echo '${'$as_ac_var'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF else gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext" fi done if test $ac_cv_func_strtoll = no; then HAVE_STRTOLL=0 : fi fi GNULIB_STRTOLL=1 for ac_func in strtoul do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } if { as_var=$as_ac_var; 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. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* 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 $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; 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 eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval echo '${'$as_ac_var'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF else gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext" fi done if test "$ac_cv_type_unsigned_long_long_int" = yes; then for ac_func in strtoull do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } if { as_var=$as_ac_var; 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. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* 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 $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; 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 eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval echo '${'$as_ac_var'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF else gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext" fi done if test $ac_cv_func_strtoull = no; then HAVE_STRTOULL=0 : fi fi GNULIB_STRTOULL=1 { echo "$as_me:$LINENO: checking whether defines strtoumax as a macro" >&5 echo $ECHO_N "checking whether defines strtoumax as a macro... $ECHO_C" >&6; } if test "${gl_cv_func_strtoumax_macro+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 #ifdef strtoumax inttypes_h_defines_strtoumax #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "inttypes_h_defines_strtoumax" >/dev/null 2>&1; then gl_cv_func_strtoumax_macro=yes else gl_cv_func_strtoumax_macro=no fi rm -f conftest* fi { echo "$as_me:$LINENO: result: $gl_cv_func_strtoumax_macro" >&5 echo "${ECHO_T}$gl_cv_func_strtoumax_macro" >&6; } if test "$gl_cv_func_strtoumax_macro" != yes; then for ac_func in strtoumax do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } if { as_var=$as_ac_var; 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. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* 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 $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; 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 eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval echo '${'$as_ac_var'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF else gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext" fi done if test $ac_cv_func_strtoumax = no; then { echo "$as_me:$LINENO: checking whether strtoull is declared" >&5 echo $ECHO_N "checking whether strtoull is declared... $ECHO_C" >&6; } if test "${ac_cv_have_decl_strtoull+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 int main () { #ifndef strtoull (void) strtoull; #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_cv_have_decl_strtoull=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_have_decl_strtoull=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_have_decl_strtoull" >&5 echo "${ECHO_T}$ac_cv_have_decl_strtoull" >&6; } if test $ac_cv_have_decl_strtoull = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_DECL_STRTOULL 1 _ACEOF else cat >>confdefs.h <<_ACEOF #define HAVE_DECL_STRTOULL 0 _ACEOF fi fi fi GNULIB_STRTOUMAX=1 { echo "$as_me:$LINENO: checking whether is self-contained" >&5 echo $ECHO_N "checking whether is self-contained... $ECHO_C" >&6; } if test "${gl_cv_header_sys_select_h_selfcontained+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 int main () { struct timeval b; ; 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 gl_cv_header_sys_select_h_selfcontained=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gl_cv_header_sys_select_h_selfcontained=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $gl_cv_header_sys_select_h_selfcontained" >&5 echo "${ECHO_T}$gl_cv_header_sys_select_h_selfcontained" >&6; } if test $gl_cv_header_sys_select_h_selfcontained = yes; then SYS_SELECT_H='' else SYS_SELECT_H='sys/select.h' : if test $gl_cv_have_include_next = yes; then gl_cv_next_sys_select_h='<'sys/select.h'>' else { echo "$as_me:$LINENO: checking absolute name of " >&5 echo $ECHO_N "checking absolute name of ... $ECHO_C" >&6; } if test "${gl_cv_next_sys_select_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test $ac_cv_header_sys_select_h = yes; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF case "$host_os" in aix*) gl_absname_cpp="$ac_cpp -C" ;; *) gl_absname_cpp="$ac_cpp" ;; esac gl_cv_next_sys_select_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | sed -n '\#/sys/select.h#{ s#.*"\(.*/sys/select.h\)".*#\1# s#^/[^/]#//&# p q }'`'"' else gl_cv_next_sys_select_h='<'sys/select.h'>' fi fi { echo "$as_me:$LINENO: result: $gl_cv_next_sys_select_h" >&5 echo "${ECHO_T}$gl_cv_next_sys_select_h" >&6; } fi NEXT_SYS_SELECT_H=$gl_cv_next_sys_select_h if test $ac_cv_header_sys_select_h = yes; then HAVE_SYS_SELECT_H=1 else HAVE_SYS_SELECT_H=0 fi : if test $ac_cv_header_sys_socket_h != yes; then for ac_header in winsock2.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;} ( cat <<\_ASBOX ## -------------------------------- ## ## Report this to ianb@erislabs.net ## ## -------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&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 fi if test "$ac_cv_header_winsock2_h" = yes; then HAVE_WINSOCK2_H=1 UNISTD_H_HAVE_WINSOCK2_H=1 SYS_IOCTL_H_HAVE_WINSOCK2_H=1 else HAVE_WINSOCK2_H=0 fi 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; } { echo "$as_me:$LINENO: checking whether is self-contained" >&5 echo $ECHO_N "checking whether is self-contained... $ECHO_C" >&6; } if test "${gl_cv_header_sys_socket_h_selfcontained+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 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 gl_cv_header_sys_socket_h_selfcontained=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gl_cv_header_sys_socket_h_selfcontained=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $gl_cv_header_sys_socket_h_selfcontained" >&5 echo "${ECHO_T}$gl_cv_header_sys_socket_h_selfcontained" >&6; } if test $gl_cv_header_sys_socket_h_selfcontained = yes; then SYS_SOCKET_H='' for ac_func in shutdown do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } if { as_var=$as_ac_var; 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. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* 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 $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; 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 eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval echo '${'$as_ac_var'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done if test $ac_cv_func_shutdown = yes; then { echo "$as_me:$LINENO: checking whether defines the SHUT_* macros" >&5 echo $ECHO_N "checking whether defines the SHUT_* macros... $ECHO_C" >&6; } if test "${gl_cv_header_sys_socket_h_shut+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 int main () { int a[] = { SHUT_RD, SHUT_WR, SHUT_RDWR }; ; 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 gl_cv_header_sys_socket_h_shut=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gl_cv_header_sys_socket_h_shut=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $gl_cv_header_sys_socket_h_shut" >&5 echo "${ECHO_T}$gl_cv_header_sys_socket_h_shut" >&6; } if test $gl_cv_header_sys_socket_h_shut = no; then SYS_SOCKET_H='sys/socket.h' fi fi else SYS_SOCKET_H='sys/socket.h' fi if test -n "$SYS_SOCKET_H"; then : if test $gl_cv_have_include_next = yes; then gl_cv_next_sys_socket_h='<'sys/socket.h'>' else { echo "$as_me:$LINENO: checking absolute name of " >&5 echo $ECHO_N "checking absolute name of ... $ECHO_C" >&6; } if test "${gl_cv_next_sys_socket_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test $ac_cv_header_sys_socket_h = yes; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF case "$host_os" in aix*) gl_absname_cpp="$ac_cpp -C" ;; *) gl_absname_cpp="$ac_cpp" ;; esac gl_cv_next_sys_socket_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | sed -n '\#/sys/socket.h#{ s#.*"\(.*/sys/socket.h\)".*#\1# s#^/[^/]#//&# p q }'`'"' else gl_cv_next_sys_socket_h='<'sys/socket.h'>' fi fi { echo "$as_me:$LINENO: result: $gl_cv_next_sys_socket_h" >&5 echo "${ECHO_T}$gl_cv_next_sys_socket_h" >&6; } fi NEXT_SYS_SOCKET_H=$gl_cv_next_sys_socket_h if test $ac_cv_header_sys_socket_h = yes; then HAVE_SYS_SOCKET_H=1 HAVE_WS2TCPIP_H=0 else HAVE_SYS_SOCKET_H=0 for ac_header in ws2tcpip.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;} ( cat <<\_ASBOX ## -------------------------------- ## ## Report this to ianb@erislabs.net ## ## -------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&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 if test $ac_cv_header_ws2tcpip_h = yes; then HAVE_WS2TCPIP_H=1 else HAVE_WS2TCPIP_H=0 fi fi : if test $ac_cv_header_sys_socket_h != yes; then for ac_header in winsock2.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;} ( cat <<\_ASBOX ## -------------------------------- ## ## Report this to ianb@erislabs.net ## ## -------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&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 fi if test "$ac_cv_header_winsock2_h" = yes; then HAVE_WINSOCK2_H=1 UNISTD_H_HAVE_WINSOCK2_H=1 SYS_IOCTL_H_HAVE_WINSOCK2_H=1 else HAVE_WINSOCK2_H=0 fi fi cat >>confdefs.h <<\_ACEOF #define GNULIB_SYS_SOCKET 1 _ACEOF { 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; } : if test $ac_cv_func_lstat = yes; then HAVE_LSTAT=1 else HAVE_LSTAT=0 fi : if test $gl_cv_have_include_next = yes; then gl_cv_next_sys_stat_h='<'sys/stat.h'>' else { echo "$as_me:$LINENO: checking absolute name of " >&5 echo $ECHO_N "checking absolute name of ... $ECHO_C" >&6; } if test "${gl_cv_next_sys_stat_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test $ac_cv_header_sys_stat_h = yes; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF case "$host_os" in aix*) gl_absname_cpp="$ac_cpp -C" ;; *) gl_absname_cpp="$ac_cpp" ;; esac gl_cv_next_sys_stat_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | sed -n '\#/sys/stat.h#{ s#.*"\(.*/sys/stat.h\)".*#\1# s#^/[^/]#//&# p q }'`'"' else gl_cv_next_sys_stat_h='<'sys/stat.h'>' fi fi { echo "$as_me:$LINENO: result: $gl_cv_next_sys_stat_h" >&5 echo "${ECHO_T}$gl_cv_next_sys_stat_h" >&6; } fi NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h SYS_STAT_H='sys/stat.h' { echo "$as_me:$LINENO: checking for nlink_t" >&5 echo $ECHO_N "checking for nlink_t... $ECHO_C" >&6; } if test "${ac_cv_type_nlink_t+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 typedef nlink_t ac__type_new_; int main () { if ((ac__type_new_ *) 0) return 0; if (sizeof (ac__type_new_)) return 0; ; 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_type_nlink_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_nlink_t=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_type_nlink_t" >&5 echo "${ECHO_T}$ac_cv_type_nlink_t" >&6; } if test $ac_cv_type_nlink_t = yes; then : else cat >>confdefs.h <<\_ACEOF #define nlink_t int _ACEOF 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; } { 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; } gl_LIBOBJS="$gl_LIBOBJS tempname.$ac_objext" : : if test $gl_cv_have_include_next = yes; then gl_cv_next_unistd_h='<'unistd.h'>' else { echo "$as_me:$LINENO: checking absolute name of " >&5 echo $ECHO_N "checking absolute name of ... $ECHO_C" >&6; } if test "${gl_cv_next_unistd_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test $ac_cv_header_unistd_h = yes; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF case "$host_os" in aix*) gl_absname_cpp="$ac_cpp -C" ;; *) gl_absname_cpp="$ac_cpp" ;; esac gl_cv_next_unistd_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | sed -n '\#/unistd.h#{ s#.*"\(.*/unistd.h\)".*#\1# s#^/[^/]#//&# p q }'`'"' else gl_cv_next_unistd_h='<'unistd.h'>' fi fi { echo "$as_me:$LINENO: result: $gl_cv_next_unistd_h" >&5 echo "${ECHO_T}$gl_cv_next_unistd_h" >&6; } fi NEXT_UNISTD_H=$gl_cv_next_unistd_h : if test $ac_cv_header_unistd_h = yes; then HAVE_UNISTD_H=1 else HAVE_UNISTD_H=0 fi if test $ac_cv_func_utime_null = no; then gl_LIBOBJS="$gl_LIBOBJS utime.$ac_objext" cat >>confdefs.h <<\_ACEOF #define utime rpl_utime _ACEOF : { echo "$as_me:$LINENO: checking whether utimes accepts a null argument" >&5 echo $ECHO_N "checking whether utimes accepts a null argument... $ECHO_C" >&6; } if test "${ac_cv_func_utimes_null+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else rm -f conftest.data; > conftest.data if test "$cross_compiling" = yes; then ac_cv_func_utimes_null=no else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* In case stat has been defined to rpl_stat, undef it here. */ #undef stat #include #include #include int main () { struct stat s, t; return ! (stat ("conftest.data", &s) == 0 && utimes ("conftest.data", 0) == 0 && stat ("conftest.data", &t) == 0 && t.st_mtime >= s.st_mtime && t.st_mtime - s.st_mtime < 120)); } _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 ac_cv_func_utimes_null=yes 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_func_utimes_null=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi rm -f core core.* *.core fi { echo "$as_me:$LINENO: result: $ac_cv_func_utimes_null" >&5 echo "${ECHO_T}$ac_cv_func_utimes_null" >&6; } if test $ac_cv_func_utimes_null = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_UTIMES_NULL 1 _ACEOF fi fi { echo "$as_me:$LINENO: checking whether is standalone" >&5 echo $ECHO_N "checking whether is standalone... $ECHO_C" >&6; } if test "${gl_cv_header_wchar_h_standalone+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #include wchar_t w; _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 gl_cv_header_wchar_h_standalone=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gl_cv_header_wchar_h_standalone=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $gl_cv_header_wchar_h_standalone" >&5 echo "${ECHO_T}$gl_cv_header_wchar_h_standalone" >&6; } if test $gt_cv_c_wint_t = yes; then HAVE_WINT_T=1 else HAVE_WINT_T=0 fi if test $gl_cv_header_wchar_h_standalone != yes || test $gt_cv_c_wint_t != yes; then WCHAR_H=wchar.h fi : if test $ac_cv_header_wchar_h = yes; then HAVE_WCHAR_H=1 else HAVE_WCHAR_H=0 fi : if test $gl_cv_have_include_next = yes; then gl_cv_next_wchar_h='<'wchar.h'>' else { echo "$as_me:$LINENO: checking absolute name of " >&5 echo $ECHO_N "checking absolute name of ... $ECHO_C" >&6; } if test "${gl_cv_next_wchar_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test $ac_cv_header_wchar_h = yes; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF case "$host_os" in aix*) gl_absname_cpp="$ac_cpp -C" ;; *) gl_absname_cpp="$ac_cpp" ;; esac gl_cv_next_wchar_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | sed -n '\#/wchar.h#{ s#.*"\(.*/wchar.h\)".*#\1# s#^/[^/]#//&# p q }'`'"' else gl_cv_next_wchar_h='<'wchar.h'>' fi fi { echo "$as_me:$LINENO: result: $gl_cv_next_wchar_h" >&5 echo "${ECHO_T}$gl_cv_next_wchar_h" >&6; } fi NEXT_WCHAR_H=$gl_cv_next_wchar_h : if test $ac_cv_func_iswcntrl = yes; then HAVE_ISWCNTRL=1 else HAVE_ISWCNTRL=0 fi : if test $gt_cv_c_wint_t = yes; then HAVE_WINT_T=1 else HAVE_WINT_T=0 fi WCTYPE_H=wctype.h if test $ac_cv_header_wctype_h = yes; then if test $ac_cv_func_iswcntrl = yes; then { echo "$as_me:$LINENO: checking whether iswcntrl works" >&5 echo $ECHO_N "checking whether iswcntrl works... $ECHO_C" >&6; } if test "${gl_cv_func_iswcntrl_works+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #if __GNU_LIBRARY__ == 1 Linux libc5 i18n is broken. #endif 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 gl_cv_func_iswcntrl_works=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gl_cv_func_iswcntrl_works=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 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 #include int main () { return iswprint ('x') == 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 gl_cv_func_iswcntrl_works=yes 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 ) gl_cv_func_iswcntrl_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { echo "$as_me:$LINENO: result: $gl_cv_func_iswcntrl_works" >&5 echo "${ECHO_T}$gl_cv_func_iswcntrl_works" >&6; } if test $gl_cv_func_iswcntrl_works = yes; then WCTYPE_H= fi fi : if test $gl_cv_have_include_next = yes; then gl_cv_next_wctype_h='<'wctype.h'>' else { echo "$as_me:$LINENO: checking absolute name of " >&5 echo $ECHO_N "checking absolute name of ... $ECHO_C" >&6; } if test "${gl_cv_next_wctype_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test $ac_cv_header_wctype_h = yes; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF case "$host_os" in aix*) gl_absname_cpp="$ac_cpp -C" ;; *) gl_absname_cpp="$ac_cpp" ;; esac gl_cv_next_wctype_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | sed -n '\#/wctype.h#{ s#.*"\(.*/wctype.h\)".*#\1# s#^/[^/]#//&# p q }'`'"' else gl_cv_next_wctype_h='<'wctype.h'>' fi fi { echo "$as_me:$LINENO: result: $gl_cv_next_wctype_h" >&5 echo "${ECHO_T}$gl_cv_next_wctype_h" >&6; } fi NEXT_WCTYPE_H=$gl_cv_next_wctype_h HAVE_WCTYPE_H=1 else HAVE_WCTYPE_H=0 fi if test "$gl_cv_func_iswcntrl_works" = no; then REPLACE_ISWCNTRL=1 else REPLACE_ISWCNTRL=0 fi : : { echo "$as_me:$LINENO: checking whether wcwidth is declared" >&5 echo $ECHO_N "checking whether wcwidth is declared... $ECHO_C" >&6; } if test "${ac_cv_have_decl_wcwidth+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. */ /* AIX 3.2.5 declares wcwidth in . */ #include /* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #include #include int main () { #ifndef wcwidth (void) wcwidth; #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_cv_have_decl_wcwidth=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_have_decl_wcwidth=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_have_decl_wcwidth" >&5 echo "${ECHO_T}$ac_cv_have_decl_wcwidth" >&6; } if test $ac_cv_have_decl_wcwidth = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_DECL_WCWIDTH 1 _ACEOF else cat >>confdefs.h <<_ACEOF #define HAVE_DECL_WCWIDTH 0 _ACEOF fi if test $ac_cv_have_decl_wcwidth != yes; then HAVE_DECL_WCWIDTH=0 fi if test $ac_cv_func_wcwidth = no; then REPLACE_WCWIDTH=1 else { echo "$as_me:$LINENO: checking whether wcwidth works reasonably in UTF-8 locales" >&5 echo $ECHO_N "checking whether wcwidth works reasonably in UTF-8 locales... $ECHO_C" >&6; } if test "${gl_cv_func_wcwidth_works+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then gl_cv_func_wcwidth_works="guessing no" else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include /* AIX 3.2.5 declares wcwidth in . */ #include /* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #include #include #if !HAVE_DECL_WCWIDTH extern # ifdef __cplusplus "C" # endif int wcwidth (int); #endif int main () { if (setlocale (LC_ALL, "fr_FR.UTF-8") != NULL) if (wcwidth (0x0301) > 0 || wcwidth (0x200B) > 0) return 1; 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 gl_cv_func_wcwidth_works=yes 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 ) gl_cv_func_wcwidth_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { echo "$as_me:$LINENO: result: $gl_cv_func_wcwidth_works" >&5 echo "${ECHO_T}$gl_cv_func_wcwidth_works" >&6; } case "$gl_cv_func_wcwidth_works" in *yes) ;; *no) REPLACE_WCWIDTH=1 ;; esac fi if test $REPLACE_WCWIDTH = 1; then gl_LIBOBJS="$gl_LIBOBJS wcwidth.$ac_objext" fi if test $REPLACE_WCWIDTH = 1 || test $HAVE_DECL_WCWIDTH = 0; then WCHAR_H=wchar.h fi GNULIB_WCWIDTH=1 GNULIB_WRITE=1 gl_LIBOBJS="$gl_LIBOBJS xmalloc.$ac_objext" : : : gl_LIBOBJS="$gl_LIBOBJS xstrtol.$ac_objext" gl_LIBOBJS="$gl_LIBOBJS xstrtoul.$ac_objext" gl_LIBOBJS="$gl_LIBOBJS xstrtol-error.$ac_objext" gltests_libdeps= gltests_ltlibdeps= gl_source_base='tests' LIBGNU_LIBDEPS="$gl_libdeps" LIBGNU_LTLIBDEPS="$gl_ltlibdeps" # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! { echo "$as_me:$LINENO: checking for working alloca.h" >&5 echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6; } if test "${ac_cv_working_alloca_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 int main () { char *p = (char *) alloca (2 * sizeof (int)); if (p) return 0; ; 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_working_alloca_h=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_working_alloca_h=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5 echo "${ECHO_T}$ac_cv_working_alloca_h" >&6; } if test $ac_cv_working_alloca_h = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_ALLOCA_H 1 _ACEOF fi { echo "$as_me:$LINENO: checking for alloca" >&5 echo $ECHO_N "checking for alloca... $ECHO_C" >&6; } if test "${ac_cv_func_alloca_works+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. */ #ifdef __GNUC__ # define alloca __builtin_alloca #else # ifdef _MSC_VER # include # define alloca _alloca # else # ifdef HAVE_ALLOCA_H # include # else # ifdef _AIX #pragma alloca # else # ifndef alloca /* predefined by HP cc +Olibcalls */ char *alloca (); # endif # endif # endif # endif #endif int main () { char *p = (char *) alloca (1); if (p) return 0; ; 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_func_alloca_works=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_alloca_works=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5 echo "${ECHO_T}$ac_cv_func_alloca_works" >&6; } if test $ac_cv_func_alloca_works = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_ALLOCA 1 _ACEOF else # The SVR3 libPW and SVR4 libucb both contain incompatible functions # that cause trouble. Some versions do not even contain alloca or # contain a buggy version. If you still want to use their alloca, # use ar to extract alloca.o from them instead of compiling alloca.c. ALLOCA=\${LIBOBJDIR}alloca.$ac_objext cat >>confdefs.h <<\_ACEOF #define C_ALLOCA 1 _ACEOF { echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5 echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6; } if test "${ac_cv_os_cray+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. */ #if defined CRAY && ! defined CRAY2 webecray #else wenotbecray #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "webecray" >/dev/null 2>&1; then ac_cv_os_cray=yes else ac_cv_os_cray=no fi rm -f conftest* fi { echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5 echo "${ECHO_T}$ac_cv_os_cray" >&6; } if test $ac_cv_os_cray = yes; then for ac_func in _getb67 GETB67 getb67; do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } if { as_var=$as_ac_var; 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. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* 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 $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; 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 eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval echo '${'$as_ac_var'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define CRAY_STACKSEG_END $ac_func _ACEOF break fi done fi { echo "$as_me:$LINENO: checking stack direction for C alloca" >&5 echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6; } if test "${ac_cv_c_stack_direction+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then ac_cv_c_stack_direction=0 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 int find_stack_direction () { static char *addr = 0; auto char dummy; if (addr == 0) { addr = &dummy; return find_stack_direction (); } else return (&dummy > addr) ? 1 : -1; } int main () { return find_stack_direction () < 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 ac_cv_c_stack_direction=1 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_c_stack_direction=-1 fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5 echo "${ECHO_T}$ac_cv_c_stack_direction" >&6; } cat >>confdefs.h <<_ACEOF #define STACK_DIRECTION $ac_cv_c_stack_direction _ACEOF fi { echo "$as_me:$LINENO: checking for broken sys/filsys.h" >&5 echo $ECHO_N "checking for broken sys/filsys.h... $ECHO_C" >&6; } if test "${ac_cv_broken_sys_filsys_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 #ifdef HAVE_SYS_FILSYS_H #include #endif int main () { {} ; 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_broken_sys_filsys_h=no else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_broken_sys_filsys_h=yes fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_broken_sys_filsys_h" >&5 echo "${ECHO_T}$ac_cv_broken_sys_filsys_h" >&6; } if test $ac_cv_broken_sys_filsys_h = yes; then cat >>confdefs.h <<\_ACEOF #define BROKEN_SYS_FILSYS_H 1 _ACEOF fi ac_header_dirent=no for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5 echo $ECHO_N "checking for $ac_hdr that defines DIR... $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. */ #include #include <$ac_hdr> int main () { if ((DIR *) 0) return 0; ; 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 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_hdr" | $as_tr_cpp` 1 _ACEOF ac_header_dirent=$ac_hdr; break fi done # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. if test $ac_header_dirent = dirent.h; then { echo "$as_me:$LINENO: checking for library containing opendir" >&5 echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; } if test "${ac_cv_search_opendir+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_func_search_save_LIBS=$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 opendir (); int main () { return opendir (); ; return 0; } _ACEOF for ac_lib in '' dir; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi 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_search_opendir=$ac_res else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext if test "${ac_cv_search_opendir+set}" = set; then break fi done if test "${ac_cv_search_opendir+set}" = set; then : else ac_cv_search_opendir=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5 echo "${ECHO_T}$ac_cv_search_opendir" >&6; } ac_res=$ac_cv_search_opendir if test "$ac_res" != no; then test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi else { echo "$as_me:$LINENO: checking for library containing opendir" >&5 echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; } if test "${ac_cv_search_opendir+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_func_search_save_LIBS=$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 opendir (); int main () { return opendir (); ; return 0; } _ACEOF for ac_lib in '' x; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi 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_search_opendir=$ac_res else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext if test "${ac_cv_search_opendir+set}" = set; then break fi done if test "${ac_cv_search_opendir+set}" = set; then : else ac_cv_search_opendir=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5 echo "${ECHO_T}$ac_cv_search_opendir" >&6; } ac_res=$ac_cv_search_opendir if test "$ac_res" != no; then test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi fi { echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; } if test "${ac_cv_c_const+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 () { /* FIXME: Include the comments suggested by Paul. */ #ifndef __cplusplus /* Ultrix mips cc rejects this. */ typedef int charset[2]; const charset cs; /* SunOS 4.1.1 cc rejects this. */ char const *const *pcpcc; char **ppc; /* NEC SVR4.0.2 mips cc rejects this. */ struct point {int x, y;}; static struct point const zero = {0,0}; /* AIX XL C 1.02.0.0 rejects this. It does not let you subtract one const X* pointer from another in an arm of an if-expression whose if-part is not a constant expression */ const char *g = "string"; pcpcc = &g + (g ? g-g : 0); /* HPUX 7.0 cc rejects these. */ ++pcpcc; ppc = (char**) pcpcc; pcpcc = (char const *const *) ppc; { /* SCO 3.2v4 cc rejects this. */ char *t; char const *s = 0 ? (char *) 0 : (char const *) 0; *t++ = 0; if (s) return 0; } { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ int x[] = {25, 17}; const int *foo = &x[0]; ++foo; } { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ typedef const int *iptr; iptr p = 0; ++p; } { /* AIX XL C 1.02.0.0 rejects this saying "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ struct s { int j; const int *ap[3]; }; struct s *b; b->j = 5; } { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ const int foo = 10; if (!foo) return 0; } return !cs[0] && !zero.x; #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_cv_c_const=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_c_const=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5 echo "${ECHO_T}$ac_cv_c_const" >&6; } if test $ac_cv_c_const = no; then cat >>confdefs.h <<\_ACEOF #define const _ACEOF fi { echo "$as_me:$LINENO: checking return type of signal handlers" >&5 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; } if test "${ac_cv_type_signal+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 int main () { return *(signal (0, 0)) (0) == 1; ; 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_type_signal=int else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_signal=void fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5 echo "${ECHO_T}$ac_cv_type_signal" >&6; } cat >>confdefs.h <<_ACEOF #define RETSIGTYPE $ac_cv_type_signal _ACEOF { echo "$as_me:$LINENO: checking for mode_t" >&5 echo $ECHO_N "checking for mode_t... $ECHO_C" >&6; } if test "${ac_cv_type_mode_t+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 typedef mode_t ac__type_new_; int main () { if ((ac__type_new_ *) 0) return 0; if (sizeof (ac__type_new_)) return 0; ; 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_type_mode_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_mode_t=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5 echo "${ECHO_T}$ac_cv_type_mode_t" >&6; } if test $ac_cv_type_mode_t = yes; then : else cat >>confdefs.h <<_ACEOF #define mode_t int _ACEOF fi { echo "$as_me:$LINENO: checking for off_t" >&5 echo $ECHO_N "checking for off_t... $ECHO_C" >&6; } if test "${ac_cv_type_off_t+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 typedef off_t ac__type_new_; int main () { if ((ac__type_new_ *) 0) return 0; if (sizeof (ac__type_new_)) return 0; ; 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_type_off_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_off_t=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5 echo "${ECHO_T}$ac_cv_type_off_t" >&6; } if test $ac_cv_type_off_t = yes; then : else cat >>confdefs.h <<_ACEOF #define off_t long int _ACEOF fi { echo "$as_me:$LINENO: checking for pid_t" >&5 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; } if test "${ac_cv_type_pid_t+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 typedef pid_t ac__type_new_; int main () { if ((ac__type_new_ *) 0) return 0; if (sizeof (ac__type_new_)) return 0; ; 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_type_pid_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_pid_t=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5 echo "${ECHO_T}$ac_cv_type_pid_t" >&6; } if test $ac_cv_type_pid_t = yes; then : else cat >>confdefs.h <<_ACEOF #define pid_t int _ACEOF fi { echo "$as_me:$LINENO: checking for size_t" >&5 echo $ECHO_N "checking for size_t... $ECHO_C" >&6; } if test "${ac_cv_type_size_t+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 typedef size_t ac__type_new_; int main () { if ((ac__type_new_ *) 0) return 0; if (sizeof (ac__type_new_)) return 0; ; 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_type_size_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_size_t=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 echo "${ECHO_T}$ac_cv_type_size_t" >&6; } if test $ac_cv_type_size_t = yes; then : else cat >>confdefs.h <<_ACEOF #define size_t unsigned int _ACEOF fi { echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5 echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6; } if test "${ac_cv_type_uid_t+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 _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "uid_t" >/dev/null 2>&1; then ac_cv_type_uid_t=yes else ac_cv_type_uid_t=no fi rm -f conftest* fi { echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5 echo "${ECHO_T}$ac_cv_type_uid_t" >&6; } if test $ac_cv_type_uid_t = no; then cat >>confdefs.h <<\_ACEOF #define uid_t int _ACEOF cat >>confdefs.h <<\_ACEOF #define gid_t int _ACEOF fi for ac_header in sys/time.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;} ( cat <<\_ASBOX ## -------------------------------- ## ## Report this to ianb@erislabs.net ## ## -------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&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 { echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6; } if test "${ac_cv_header_time+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 int main () { if ((struct tm *) 0) return 0; ; 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_time=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_time=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5 echo "${ECHO_T}$ac_cv_header_time" >&6; } if test $ac_cv_header_time = yes; then cat >>confdefs.h <<\_ACEOF #define TIME_WITH_SYS_TIME 1 _ACEOF fi { echo "$as_me:$LINENO: checking for long file names" >&5 echo $ECHO_N "checking for long file names... $ECHO_C" >&6; } if test "${ac_cv_sys_long_file_names+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_sys_long_file_names=yes # Test for long file names in all the places we know might matter: # . the current directory, where building will happen # $prefix/lib where we will be installing things # $exec_prefix/lib likewise # $TMPDIR if set, where it might want to write temporary files # /tmp where it might want to write temporary files # /var/tmp likewise # /usr/tmp likewise for ac_dir in . "$TMPDIR" /tmp /var/tmp /usr/tmp "$prefix/lib" "$exec_prefix/lib"; do # Skip $TMPDIR if it is empty or bogus, and skip $exec_prefix/lib # in the usual case where exec_prefix is '${prefix}'. case $ac_dir in #( . | /* | ?:[\\/]*) ;; #( *) continue;; esac test -w "$ac_dir/." || continue # It is less confusing to not echo anything here. ac_xdir=$ac_dir/cf$$ (umask 077 && mkdir "$ac_xdir" 2>/dev/null) || continue ac_tf1=$ac_xdir/conftest9012345 ac_tf2=$ac_xdir/conftest9012346 touch "$ac_tf1" 2>/dev/null && test -f "$ac_tf1" && test ! -f "$ac_tf2" || ac_cv_sys_long_file_names=no rm -f -r "$ac_xdir" 2>/dev/null test $ac_cv_sys_long_file_names = no && break done fi { echo "$as_me:$LINENO: result: $ac_cv_sys_long_file_names" >&5 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6; } if test $ac_cv_sys_long_file_names = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_LONG_FILE_NAMES 1 _ACEOF fi { echo "$as_me:$LINENO: checking whether stat file-mode macros are broken" >&5 echo $ECHO_N "checking whether stat file-mode macros are broken... $ECHO_C" >&6; } if test "${ac_cv_header_stat_broken+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 #if defined S_ISBLK && defined S_IFDIR extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1]; #endif #if defined S_ISBLK && defined S_IFCHR extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1]; #endif #if defined S_ISLNK && defined S_IFREG extern char c3[S_ISLNK (S_IFREG) ? -1 : 1]; #endif #if defined S_ISSOCK && defined S_IFREG extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1]; #endif _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_stat_broken=no else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_stat_broken=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_header_stat_broken" >&5 echo "${ECHO_T}$ac_cv_header_stat_broken" >&6; } if test $ac_cv_header_stat_broken = yes; then cat >>confdefs.h <<\_ACEOF #define STAT_MACROS_BROKEN 1 _ACEOF fi { echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5 echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6; } if test "${ac_cv_header_sys_wait_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 #ifndef WEXITSTATUS # define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8) #endif #ifndef WIFEXITED # define WIFEXITED(stat_val) (((stat_val) & 255) == 0) #endif int main () { int s; wait (&s); s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; 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_sys_wait_h=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_sys_wait_h=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5 echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6; } if test $ac_cv_header_sys_wait_h = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_SYS_WAIT_H 1 _ACEOF fi for ac_func in \ lstat sigaction strerror strcasecmp strncasecmp\ strstr memmove putenv setenv getcwd rename readlink setlocale do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } if { as_var=$as_ac_var; 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. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* 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 $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; 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 eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval echo '${'$as_ac_var'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done space=no # Here we'll compromise a little (and perform only the link test) # since it seems there are no variants of the statvfs function. if test $space = no; then # SVR4 for ac_func in statvfs do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } if { as_var=$as_ac_var; 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. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* 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 $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; 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 eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval echo '${'$as_ac_var'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done if test $ac_cv_func_statvfs = yes; then space=yes cat >>confdefs.h <<\_ACEOF #define STAT_STATVFS 1 _ACEOF fi fi if test $space = no; then # DEC Alpha running OSF/1 { echo "$as_me:$LINENO: checking for 3-argument statfs function (DEC OSF/1)" >&5 echo $ECHO_N "checking for 3-argument statfs function (DEC OSF/1)... $ECHO_C" >&6; } if test "${fu_cv_sys_stat_statfs3_osf1+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then fu_cv_sys_stat_statfs3_osf1=no else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef HAVE_SYS_PARAM_H #include #endif #include #ifdef HAVE_SYS_MOUNT_H #include #endif main() { struct statfs fsd; fsd.f_fsize = 0; exit(statfs(".", &fsd, sizeof(struct statfs))); } _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 fu_cv_sys_stat_statfs3_osf1=yes 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 ) fu_cv_sys_stat_statfs3_osf1=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { echo "$as_me:$LINENO: result: $fu_cv_sys_stat_statfs3_osf1" >&5 echo "${ECHO_T}$fu_cv_sys_stat_statfs3_osf1" >&6; } if test $fu_cv_sys_stat_statfs3_osf1 = yes; then space=yes cat >>confdefs.h <<\_ACEOF #define STAT_STATFS3_OSF1 1 _ACEOF fi fi if test $space = no; then # AIX { echo "$as_me:$LINENO: checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)" >&5 echo $ECHO_N "checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)... $ECHO_C" >&6; } if test "${fu_cv_sys_stat_statfs2_bsize+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then fu_cv_sys_stat_statfs2_bsize=no else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef HAVE_SYS_PARAM_H #include #endif #ifdef HAVE_SYS_MOUNT_H #include #endif #ifdef HAVE_SYS_VFS_H #include #endif main() { struct statfs fsd; fsd.f_bsize = 0; exit(statfs(".", &fsd)); } _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 fu_cv_sys_stat_statfs2_bsize=yes 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 ) fu_cv_sys_stat_statfs2_bsize=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { echo "$as_me:$LINENO: result: $fu_cv_sys_stat_statfs2_bsize" >&5 echo "${ECHO_T}$fu_cv_sys_stat_statfs2_bsize" >&6; } if test $fu_cv_sys_stat_statfs2_bsize = yes; then space=yes cat >>confdefs.h <<\_ACEOF #define STAT_STATFS2_BSIZE 1 _ACEOF fi fi if test $space = no; then # SVR3 { echo "$as_me:$LINENO: checking for four-argument statfs (AIX-3.2.5, SVR3)" >&5 echo $ECHO_N "checking for four-argument statfs (AIX-3.2.5, SVR3)... $ECHO_C" >&6; } if test "${fu_cv_sys_stat_statfs4+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then fu_cv_sys_stat_statfs4=no else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #ifdef HAVE_SYS_STATFS_H #include #endif main() { struct statfs fsd; exit(statfs(".", &fsd, sizeof fsd, 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 fu_cv_sys_stat_statfs4=yes 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 ) fu_cv_sys_stat_statfs4=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { echo "$as_me:$LINENO: result: $fu_cv_sys_stat_statfs4" >&5 echo "${ECHO_T}$fu_cv_sys_stat_statfs4" >&6; } if test $fu_cv_sys_stat_statfs4 = yes; then space=yes cat >>confdefs.h <<\_ACEOF #define STAT_STATFS4 1 _ACEOF fi fi if test $space = no; then # 4.4BSD and NetBSD { echo "$as_me:$LINENO: checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)" >&5 echo $ECHO_N "checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)... $ECHO_C" >&6; } if test "${fu_cv_sys_stat_statfs2_fsize+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then fu_cv_sys_stat_statfs2_fsize=no else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #ifdef HAVE_SYS_PARAM_H #include #endif #ifdef HAVE_SYS_MOUNT_H #include #endif main() { struct statfs fsd; fsd.f_fsize = 0; exit(statfs(".", &fsd)); } _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 fu_cv_sys_stat_statfs2_fsize=yes 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 ) fu_cv_sys_stat_statfs2_fsize=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { echo "$as_me:$LINENO: result: $fu_cv_sys_stat_statfs2_fsize" >&5 echo "${ECHO_T}$fu_cv_sys_stat_statfs2_fsize" >&6; } if test $fu_cv_sys_stat_statfs2_fsize = yes; then space=yes cat >>confdefs.h <<\_ACEOF #define STAT_STATFS2_FSIZE 1 _ACEOF fi fi if test $space = no; then # Ultrix { echo "$as_me:$LINENO: checking for two-argument statfs with struct fs_data (Ultrix)" >&5 echo $ECHO_N "checking for two-argument statfs with struct fs_data (Ultrix)... $ECHO_C" >&6; } if test "${fu_cv_sys_stat_fs_data+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then fu_cv_sys_stat_fs_data=no else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #ifdef HAVE_SYS_PARAM_H #include #endif #ifdef HAVE_SYS_MOUNT_H #include #endif #ifdef HAVE_SYS_FS_TYPES_H #include #endif main() { struct fs_data fsd; /* Ultrix's statfs returns 1 for success, 0 for not mounted, -1 for failure. */ exit(statfs(".", &fsd) != 1); } _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 fu_cv_sys_stat_fs_data=yes 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 ) fu_cv_sys_stat_fs_data=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { echo "$as_me:$LINENO: result: $fu_cv_sys_stat_fs_data" >&5 echo "${ECHO_T}$fu_cv_sys_stat_fs_data" >&6; } if test $fu_cv_sys_stat_fs_data = yes; then space=yes cat >>confdefs.h <<\_ACEOF #define STAT_STATFS2_FS_DATA 1 _ACEOF fi fi { echo "$as_me:$LINENO: checking for dumb C compiler" >&5 echo $ECHO_N "checking for dumb C compiler... $ECHO_C" >&6; } if test "${git_cv_dumb_cc+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. */ void tst(char); void tst(i) char i; {} int main () { { tst('A'); } ; 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 git_cv_dumb_cc=no else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 git_cv_dumb_cc=yes fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $git_cv_dumb_cc" >&5 echo "${ECHO_T}$git_cv_dumb_cc" >&6; } if test "$git_cv_dumb_cc" = "yes"; then cat >>confdefs.h <<\_ACEOF #define HAVE_DUMB_CC 1 _ACEOF fi { echo "$as_me:$LINENO: checking for struct utsname" >&5 echo $ECHO_N "checking for struct utsname... $ECHO_C" >&6; } if test "${git_cv_struct_utsname+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 int main () { { char *ptr; struct utsname u; uname(&u); ptr = u.nodename; ptr = u.sysname; ptr = u.machine; } ; 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 git_cv_struct_utsname=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 git_cv_struct_utsname=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $git_cv_struct_utsname" >&5 echo "${ECHO_T}$git_cv_struct_utsname" >&6; } if test "$git_cv_struct_utsname" = "yes"; then cat >>confdefs.h <<\_ACEOF #define HAVE_UTSNAME 1 _ACEOF fi { echo "$as_me:$LINENO: checking for POSIX compatible terminal interface" >&5 echo $ECHO_N "checking for POSIX compatible terminal interface... $ECHO_C" >&6; } if test "${git_cv_sys_posix_tty+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 int main () { { struct termios term; tcgetattr(0, &term); } ; 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 git_cv_sys_posix_tty=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 git_cv_sys_posix_tty=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $git_cv_sys_posix_tty" >&5 echo "${ECHO_T}$git_cv_sys_posix_tty" >&6; } if test "$git_cv_sys_posix_tty" = "yes"; then cat >>confdefs.h <<\_ACEOF #define HAVE_POSIX_TTY 1 _ACEOF fi { echo "$as_me:$LINENO: checking for System V compatible terminal interface" >&5 echo $ECHO_N "checking for System V compatible terminal interface... $ECHO_C" >&6; } if test "${git_cv_sys_systemv_tty+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 int main () { { struct termio term; ioctl(0, TCGETA, &term); } ; 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 git_cv_sys_systemv_tty=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 git_cv_sys_systemv_tty=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $git_cv_sys_systemv_tty" >&5 echo "${ECHO_T}$git_cv_sys_systemv_tty" >&6; } if test "$git_cv_sys_systemv_tty" = "yes"; then cat >>confdefs.h <<\_ACEOF #define HAVE_SYSTEMV_TTY 1 _ACEOF fi { echo "$as_me:$LINENO: checking for BSD compatible terminal interface" >&5 echo $ECHO_N "checking for BSD compatible terminal interface... $ECHO_C" >&6; } if test "${git_cv_sys_bsd_tty+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 int main () { { struct sgttyb arg; struct tchars targ; struct ltchars ltarg; ioctl(0, TIOCGETP,&arg); ioctl(0, TIOCGETC,&targ); ioctl(0, TIOCGLTC,<arg); } ; 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 git_cv_sys_bsd_tty=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 git_cv_sys_bsd_tty=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $git_cv_sys_bsd_tty" >&5 echo "${ECHO_T}$git_cv_sys_bsd_tty" >&6; } if test "$git_cv_sys_bsd_tty" = "yes"; then cat >>confdefs.h <<\_ACEOF #define HAVE_BSD_TTY 1 _ACEOF fi { echo "$as_me:$LINENO: checking for struct winsz" >&5 echo $ECHO_N "checking for struct winsz... $ECHO_C" >&6; } if test "${git_cv_struct_winsz+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 #ifdef HAVE_POSIX_TTY #include #else #ifdef HAVE_SYSTEMV_TTY #include #else #include #endif /* HAVE_SYSTEMV_TTY */ #endif /* HAVE_POSIX_TTY */ #if defined TIOCGSIZE && !defined TIOCGWINSZ #define TIOCGWINSZ TIOCGSIZE #endif int main () { { struct winsize winsz; ioctl(1, TIOCGWINSZ, &winsz); winsz.ws_col = winsz.ws_row; } ; 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 git_cv_struct_winsz=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 git_cv_struct_winsz=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $git_cv_struct_winsz" >&5 echo "${ECHO_T}$git_cv_struct_winsz" >&6; } if test "$git_cv_struct_winsz" = "yes"; then cat >>confdefs.h <<\_ACEOF #define HAVE_WINSZ 1 _ACEOF fi { echo "$as_me:$LINENO: checking for tgetent in -lncursesw" >&5 echo $ECHO_N "checking for tgetent in -lncursesw... $ECHO_C" >&6; } if test "${ac_cv_lib_ncursesw_tgetent+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lncursesw $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 tgetent (); int main () { return tgetent (); ; 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_ncursesw_tgetent=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_ncursesw_tgetent=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_ncursesw_tgetent" >&5 echo "${ECHO_T}$ac_cv_lib_ncursesw_tgetent" >&6; } if test $ac_cv_lib_ncursesw_tgetent = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_LIBTERMINFO 1 _ACEOF LIBS="$LIBS -lncursesw" TERMLIB_FOUND=yes else { echo "$as_me:$LINENO: checking for tgetent in -lncurses" >&5 echo $ECHO_N "checking for tgetent in -lncurses... $ECHO_C" >&6; } if test "${ac_cv_lib_ncurses_tgetent+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lncurses $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 tgetent (); int main () { return tgetent (); ; 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_ncurses_tgetent=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_ncurses_tgetent=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_ncurses_tgetent" >&5 echo "${ECHO_T}$ac_cv_lib_ncurses_tgetent" >&6; } if test $ac_cv_lib_ncurses_tgetent = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_LIBTERMINFO 1 _ACEOF LIBS="$LIBS -lncurses" TERMLIB_FOUND=yes else { echo "$as_me:$LINENO: checking for tgetent in -ltermlib" >&5 echo $ECHO_N "checking for tgetent in -ltermlib... $ECHO_C" >&6; } if test "${ac_cv_lib_termlib_tgetent+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ltermlib $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 tgetent (); int main () { return tgetent (); ; 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_termlib_tgetent=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_termlib_tgetent=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_termlib_tgetent" >&5 echo "${ECHO_T}$ac_cv_lib_termlib_tgetent" >&6; } if test $ac_cv_lib_termlib_tgetent = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_LIBTERMINFO 1 _ACEOF LIBS="$LIBS -ltermlib" TERMLIB_FOUND=yes else { echo "$as_me:$LINENO: checking for tgetent in -lcurses" >&5 echo $ECHO_N "checking for tgetent in -lcurses... $ECHO_C" >&6; } if test "${ac_cv_lib_curses_tgetent+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcurses $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 tgetent (); int main () { return tgetent (); ; 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_curses_tgetent=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_curses_tgetent=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_curses_tgetent" >&5 echo "${ECHO_T}$ac_cv_lib_curses_tgetent" >&6; } if test $ac_cv_lib_curses_tgetent = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_LIBTERMINFO 1 _ACEOF LIBS="$LIBS -lcurses" TERMLIB_FOUND=yes else { echo "$as_me:$LINENO: checking for tgetent in -ltinfo" >&5 echo $ECHO_N "checking for tgetent in -ltinfo... $ECHO_C" >&6; } if test "${ac_cv_lib_tinfo_tgetent+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ltinfo $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 tgetent (); int main () { return tgetent (); ; 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_tinfo_tgetent=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_tinfo_tgetent=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_tinfo_tgetent" >&5 echo "${ECHO_T}$ac_cv_lib_tinfo_tgetent" >&6; } if test $ac_cv_lib_tinfo_tgetent = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_LIBTERMINFO 1 _ACEOF LIBS="$LIBS -ltinfo" TERMLIB_FOUND=yes else { echo "$as_me:$LINENO: checking for tgetent in -lterminfo" >&5 echo $ECHO_N "checking for tgetent in -lterminfo... $ECHO_C" >&6; } if test "${ac_cv_lib_terminfo_tgetent+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lterminfo $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 tgetent (); int main () { return tgetent (); ; 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_terminfo_tgetent=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_terminfo_tgetent=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_terminfo_tgetent" >&5 echo "${ECHO_T}$ac_cv_lib_terminfo_tgetent" >&6; } if test $ac_cv_lib_terminfo_tgetent = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_LIBTERMINFO 1 _ACEOF LIBS="$LIBS -lterminfo" TERMLIB_FOUND=yes else { echo "$as_me:$LINENO: checking for tgetent in -ltermcap" >&5 echo $ECHO_N "checking for tgetent in -ltermcap... $ECHO_C" >&6; } if test "${ac_cv_lib_termcap_tgetent+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ltermcap $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 tgetent (); int main () { return tgetent (); ; 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_termcap_tgetent=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_termcap_tgetent=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_termcap_tgetent" >&5 echo "${ECHO_T}$ac_cv_lib_termcap_tgetent" >&6; } if test $ac_cv_lib_termcap_tgetent = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_LIBTERMCAP 1 _ACEOF LIBS="$LIBS -ltermcap" TERMLIB_FOUND=yes else TERMLIB_FOUND=no fi fi fi fi fi fi fi if test "$TERMLIB_FOUND" = "no"; then { { echo "$as_me:$LINENO: error: no library for handling terminal capabilities" >&5 echo "$as_me: error: no library for handling terminal capabilities" >&2;} { (exit 1); exit 1; }; } fi { echo "$as_me:$LINENO: checking for 64bit I/O support" >&5 echo $ECHO_N "checking for 64bit I/O support... $ECHO_C" >&6; } if test "${git_cv_64bit_io+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. */ #define _LARGEFILE64_SOURCE #include #include #include int main () { { off64_t x; fopen64("x", "r"); } ; 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 git_cv_64bit_io=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 git_cv_64bit_io=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $git_cv_64bit_io" >&5 echo "${ECHO_T}$git_cv_64bit_io" >&6; } if test "$git_cv_64bit_io" = "yes"; then cat >>confdefs.h <<\_ACEOF #define HAVE_64BIT_IO 1 _ACEOF fi # Extract the first word of "texi2dvi", so it can be a program name with args. set dummy texi2dvi; 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_TEXI2DVI+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$TEXI2DVI"; then ac_cv_prog_TEXI2DVI="$TEXI2DVI" # 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_TEXI2DVI="texi2dvi" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_prog_TEXI2DVI" && ac_cv_prog_TEXI2DVI="false" fi fi TEXI2DVI=$ac_cv_prog_TEXI2DVI if test -n "$TEXI2DVI"; then { echo "$as_me:$LINENO: result: $TEXI2DVI" >&5 echo "${ECHO_T}$TEXI2DVI" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "$TEXI2DVI" = "false"; then { echo "$as_me:$LINENO: WARNING: ***** texi2dvi utility not found *****" >&5 echo "$as_me: WARNING: ***** texi2dvi utility not found *****" >&2;} fi htmldocs_texi2html=no # Extract the first word of "texi2html", so it can be a program name with args. set dummy texi2html; 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_TEXI2HTML+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$TEXI2HTML"; then ac_cv_prog_TEXI2HTML="$TEXI2HTML" # 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_TEXI2HTML="texi2html" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_prog_TEXI2HTML" && ac_cv_prog_TEXI2HTML="false" fi fi TEXI2HTML=$ac_cv_prog_TEXI2HTML if test -n "$TEXI2HTML"; then { echo "$as_me:$LINENO: result: $TEXI2HTML" >&5 echo "${ECHO_T}$TEXI2HTML" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "$TEXI2HTML" = "false"; then { echo "$as_me:$LINENO: WARNING: ***** texi2html utility not found *****" >&5 echo "$as_me: WARNING: ***** texi2html utility not found *****" >&2;} else htmldocs_texi2html=yes fi if test "$htmldocs_texi2html" = yes; then HTMLDOCS_TEXI2HTML_TRUE= HTMLDOCS_TEXI2HTML_FALSE='#' else HTMLDOCS_TEXI2HTML_TRUE='#' HTMLDOCS_TEXI2HTML_FALSE= fi htmldocs_makeinfo=no # Extract the first word of "makeinfo", so it can be a program name with args. set dummy makeinfo; 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_MAKEINFO+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$MAKEINFO"; then ac_cv_prog_MAKEINFO="$MAKEINFO" # 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_MAKEINFO="makeinfo" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_prog_MAKEINFO" && ac_cv_prog_MAKEINFO="false" fi fi MAKEINFO=$ac_cv_prog_MAKEINFO if test -n "$MAKEINFO"; then { echo "$as_me:$LINENO: result: $MAKEINFO" >&5 echo "${ECHO_T}$MAKEINFO" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "$MAKEINFO" = "false"; then { echo "$as_me:$LINENO: WARNING: ***** makeinfo utility not found *****" >&5 echo "$as_me: WARNING: ***** makeinfo utility not found *****" >&2;} else htmldocs_makeinfo=yes fi if test "$htmldocs_makeinfo" = yes; then HTMLDOCS_MAKEINFO_TRUE= HTMLDOCS_MAKEINFO_FALSE='#' else HTMLDOCS_MAKEINFO_TRUE='#' HTMLDOCS_MAKEINFO_FALSE= fi if test "$HAVE_LIBTERMCAP" = "yes"; then if test "$host_os" = "solaris2.3" || test "$host_os" = "solaris2.4"; then { echo "$as_me:$LINENO: checking for tgetent in -lucb" >&5 echo $ECHO_N "checking for tgetent in -lucb... $ECHO_C" >&6; } if test "${ac_cv_lib_ucb_tgetent+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lucb $LIBS $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 tgetent (); int main () { return tgetent (); ; 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_ucb_tgetent=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_ucb_tgetent=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_ucb_tgetent" >&5 echo "${ECHO_T}$ac_cv_lib_ucb_tgetent" >&6; } if test $ac_cv_lib_ucb_tgetent = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBUCB 1 _ACEOF LIBS="-lucb $LIBS" fi fi fi CLEANFILES="core tutu gogu *.out t tt mwatch.log mtrace.log autoscan.log autom4te.cache/*" PRODUCT="GNU Interactive Tools" ac_config_files="$ac_config_files version.h Makefile src/Makefile term/Makefile term/gnuitrc.aixterm term/gnuitrc.ansi term/gnuitrc.generic term/gnuitrc.hft term/gnuitrc.hpterm term/gnuitrc.linux term/gnuitrc.linux-m term/gnuitrc.mach term/gnuitrc.minix term/gnuitrc.thix term/gnuitrc.vt100 term/gnuitrc.vt102 term/gnuitrc.xterm term/gnuitrc.xterm-color doc/Makefile lib/Makefile gnuit.spec LSM" 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 "${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 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 "${TRANSITION_TRUE}" && test -z "${TRANSITION_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"TRANSITION\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"TRANSITION\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${DEBIAN_TRUE}" && test -z "${DEBIAN_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"DEBIAN\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"DEBIAN\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"GL_COND_LIBTOOL\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"GL_COND_LIBTOOL\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi gl_libobjs= gl_ltlibobjs= if test -n "$gl_LIBOBJS"; then # Remove the extension. sed_drop_objext='s/\.o$//;s/\.obj$//' for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed "$sed_drop_objext" | sort | uniq`; do gl_libobjs="$gl_libobjs $i.$ac_objext" gl_ltlibobjs="$gl_ltlibobjs $i.lo" done fi gl_LIBOBJS=$gl_libobjs gl_LTLIBOBJS=$gl_ltlibobjs gltests_libobjs= gltests_ltlibobjs= if test -n "$gltests_LIBOBJS"; then # Remove the extension. sed_drop_objext='s/\.o$//;s/\.obj$//' for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed "$sed_drop_objext" | sort | uniq`; do gltests_libobjs="$gltests_libobjs $i.$ac_objext" gltests_ltlibobjs="$gltests_ltlibobjs $i.lo" done fi gltests_LIBOBJS=$gltests_libobjs gltests_LTLIBOBJS=$gltests_ltlibobjs if test -z "${HTMLDOCS_TEXI2HTML_TRUE}" && test -z "${HTMLDOCS_TEXI2HTML_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"HTMLDOCS_TEXI2HTML\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"HTMLDOCS_TEXI2HTML\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${HTMLDOCS_MAKEINFO_TRUE}" && test -z "${HTMLDOCS_MAKEINFO_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"HTMLDOCS_MAKEINFO\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"HTMLDOCS_MAKEINFO\" 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 gnuit $as_me 4.9.5, 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="\\ gnuit config.status 4.9.5 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 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "version.h") CONFIG_FILES="$CONFIG_FILES version.h" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; "term/Makefile") CONFIG_FILES="$CONFIG_FILES term/Makefile" ;; "term/gnuitrc.aixterm") CONFIG_FILES="$CONFIG_FILES term/gnuitrc.aixterm" ;; "term/gnuitrc.ansi") CONFIG_FILES="$CONFIG_FILES term/gnuitrc.ansi" ;; "term/gnuitrc.generic") CONFIG_FILES="$CONFIG_FILES term/gnuitrc.generic" ;; "term/gnuitrc.hft") CONFIG_FILES="$CONFIG_FILES term/gnuitrc.hft" ;; "term/gnuitrc.hpterm") CONFIG_FILES="$CONFIG_FILES term/gnuitrc.hpterm" ;; "term/gnuitrc.linux") CONFIG_FILES="$CONFIG_FILES term/gnuitrc.linux" ;; "term/gnuitrc.linux-m") CONFIG_FILES="$CONFIG_FILES term/gnuitrc.linux-m" ;; "term/gnuitrc.mach") CONFIG_FILES="$CONFIG_FILES term/gnuitrc.mach" ;; "term/gnuitrc.minix") CONFIG_FILES="$CONFIG_FILES term/gnuitrc.minix" ;; "term/gnuitrc.thix") CONFIG_FILES="$CONFIG_FILES term/gnuitrc.thix" ;; "term/gnuitrc.vt100") CONFIG_FILES="$CONFIG_FILES term/gnuitrc.vt100" ;; "term/gnuitrc.vt102") CONFIG_FILES="$CONFIG_FILES term/gnuitrc.vt102" ;; "term/gnuitrc.xterm") CONFIG_FILES="$CONFIG_FILES term/gnuitrc.xterm" ;; "term/gnuitrc.xterm-color") CONFIG_FILES="$CONFIG_FILES term/gnuitrc.xterm-color" ;; "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; "lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;; "gnuit.spec") CONFIG_FILES="$CONFIG_FILES gnuit.spec" ;; "LSM") CONFIG_FILES="$CONFIG_FILES LSM" ;; *) { { 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 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 build!$build$ac_delim build_cpu!$build_cpu$ac_delim build_vendor!$build_vendor$ac_delim build_os!$build_os$ac_delim host!$host$ac_delim host_cpu!$host_cpu$ac_delim host_vendor!$host_vendor$ac_delim host_os!$host_os$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 RANLIB!$RANLIB$ac_delim CPP!$CPP$ac_delim GREP!$GREP$ac_delim EGREP!$EGREP$ac_delim MAINTAINER_MODE_TRUE!$MAINTAINER_MODE_TRUE$ac_delim MAINTAINER_MODE_FALSE!$MAINTAINER_MODE_FALSE$ac_delim MAINT!$MAINT$ac_delim TRANSITION_TRUE!$TRANSITION_TRUE$ac_delim TRANSITION_FALSE!$TRANSITION_FALSE$ac_delim DEBIAN_TRUE!$DEBIAN_TRUE$ac_delim DEBIAN_FALSE!$DEBIAN_FALSE$ac_delim GL_COND_LIBTOOL_TRUE!$GL_COND_LIBTOOL_TRUE$ac_delim GL_COND_LIBTOOL_FALSE!$GL_COND_LIBTOOL_FALSE$ac_delim ALLOCA!$ALLOCA$ac_delim ALLOCA_H!$ALLOCA_H$ac_delim _ACEOF if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; 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 _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 CEOF$ac_eof _ACEOF ac_delim='%!_!# ' for ac_last_try in false false false false false :; do cat >conf$$subs.sed <<_ACEOF LIB_CLOCK_GETTIME!$LIB_CLOCK_GETTIME$ac_delim INCLUDE_NEXT!$INCLUDE_NEXT$ac_delim INCLUDE_NEXT_AS_FIRST_DIRECTIVE!$INCLUDE_NEXT_AS_FIRST_DIRECTIVE$ac_delim PRAGMA_SYSTEM_HEADER!$PRAGMA_SYSTEM_HEADER$ac_delim NEXT_ERRNO_H!$NEXT_ERRNO_H$ac_delim ERRNO_H!$ERRNO_H$ac_delim EMULTIHOP_HIDDEN!$EMULTIHOP_HIDDEN$ac_delim EMULTIHOP_VALUE!$EMULTIHOP_VALUE$ac_delim ENOLINK_HIDDEN!$ENOLINK_HIDDEN$ac_delim ENOLINK_VALUE!$ENOLINK_VALUE$ac_delim EOVERFLOW_HIDDEN!$EOVERFLOW_HIDDEN$ac_delim EOVERFLOW_VALUE!$EOVERFLOW_VALUE$ac_delim GNULIB_OPEN!$GNULIB_OPEN$ac_delim REPLACE_OPEN!$REPLACE_OPEN$ac_delim NEXT_FCNTL_H!$NEXT_FCNTL_H$ac_delim FCNTL_H!$FCNTL_H$ac_delim FNMATCH_H!$FNMATCH_H$ac_delim GETOPT_H!$GETOPT_H$ac_delim LIBINTL!$LIBINTL$ac_delim LTLIBINTL!$LTLIBINTL$ac_delim NEXT_SYS_TIME_H!$NEXT_SYS_TIME_H$ac_delim HAVE_SYS_TIME_H!$HAVE_SYS_TIME_H$ac_delim HAVE_STRUCT_TIMEVAL!$HAVE_STRUCT_TIMEVAL$ac_delim REPLACE_GETTIMEOFDAY!$REPLACE_GETTIMEOFDAY$ac_delim SYS_TIME_H!$SYS_TIME_H$ac_delim HAVE_LONG_LONG_INT!$HAVE_LONG_LONG_INT$ac_delim HAVE_UNSIGNED_LONG_LONG_INT!$HAVE_UNSIGNED_LONG_LONG_INT$ac_delim HAVE_INTTYPES_H!$HAVE_INTTYPES_H$ac_delim HAVE_SYS_TYPES_H!$HAVE_SYS_TYPES_H$ac_delim NEXT_STDINT_H!$NEXT_STDINT_H$ac_delim HAVE_STDINT_H!$HAVE_STDINT_H$ac_delim HAVE_SYS_INTTYPES_H!$HAVE_SYS_INTTYPES_H$ac_delim HAVE_SYS_BITYPES_H!$HAVE_SYS_BITYPES_H$ac_delim APPLE_UNIVERSAL_BUILD!$APPLE_UNIVERSAL_BUILD$ac_delim BITSIZEOF_PTRDIFF_T!$BITSIZEOF_PTRDIFF_T$ac_delim BITSIZEOF_SIZE_T!$BITSIZEOF_SIZE_T$ac_delim BITSIZEOF_SIG_ATOMIC_T!$BITSIZEOF_SIG_ATOMIC_T$ac_delim BITSIZEOF_WCHAR_T!$BITSIZEOF_WCHAR_T$ac_delim BITSIZEOF_WINT_T!$BITSIZEOF_WINT_T$ac_delim HAVE_SIGNED_SIG_ATOMIC_T!$HAVE_SIGNED_SIG_ATOMIC_T$ac_delim HAVE_SIGNED_WCHAR_T!$HAVE_SIGNED_WCHAR_T$ac_delim HAVE_SIGNED_WINT_T!$HAVE_SIGNED_WINT_T$ac_delim PTRDIFF_T_SUFFIX!$PTRDIFF_T_SUFFIX$ac_delim SIZE_T_SUFFIX!$SIZE_T_SUFFIX$ac_delim SIG_ATOMIC_T_SUFFIX!$SIG_ATOMIC_T_SUFFIX$ac_delim WCHAR_T_SUFFIX!$WCHAR_T_SUFFIX$ac_delim WINT_T_SUFFIX!$WINT_T_SUFFIX$ac_delim STDINT_H!$STDINT_H$ac_delim PRI_MACROS_BROKEN!$PRI_MACROS_BROKEN$ac_delim GNULIB_IMAXABS!$GNULIB_IMAXABS$ac_delim GNULIB_IMAXDIV!$GNULIB_IMAXDIV$ac_delim GNULIB_STRTOIMAX!$GNULIB_STRTOIMAX$ac_delim GNULIB_STRTOUMAX!$GNULIB_STRTOUMAX$ac_delim HAVE_DECL_IMAXABS!$HAVE_DECL_IMAXABS$ac_delim HAVE_DECL_IMAXDIV!$HAVE_DECL_IMAXDIV$ac_delim HAVE_DECL_STRTOIMAX!$HAVE_DECL_STRTOIMAX$ac_delim HAVE_DECL_STRTOUMAX!$HAVE_DECL_STRTOUMAX$ac_delim NEXT_INTTYPES_H!$NEXT_INTTYPES_H$ac_delim PRIPTR_PREFIX!$PRIPTR_PREFIX$ac_delim INT32_MAX_LT_INTMAX_MAX!$INT32_MAX_LT_INTMAX_MAX$ac_delim INT64_MAX_EQ_LONG_MAX!$INT64_MAX_EQ_LONG_MAX$ac_delim UINT32_MAX_LT_UINTMAX_MAX!$UINT32_MAX_LT_UINTMAX_MAX$ac_delim UINT64_MAX_EQ_ULONG_MAX!$UINT64_MAX_EQ_ULONG_MAX$ac_delim INTTYPES_H!$INTTYPES_H$ac_delim GLIBC21!$GLIBC21$ac_delim LOCALCHARSET_TESTS_ENVIRONMENT!$LOCALCHARSET_TESTS_ENVIRONMENT$ac_delim GNULIB_LCHMOD!$GNULIB_LCHMOD$ac_delim GNULIB_LSTAT!$GNULIB_LSTAT$ac_delim HAVE_LCHMOD!$HAVE_LCHMOD$ac_delim REPLACE_LSTAT!$REPLACE_LSTAT$ac_delim REPLACE_MKDIR!$REPLACE_MKDIR$ac_delim HAVE_MALLOC_POSIX!$HAVE_MALLOC_POSIX$ac_delim GNULIB_MALLOC_POSIX!$GNULIB_MALLOC_POSIX$ac_delim GNULIB_REALLOC_POSIX!$GNULIB_REALLOC_POSIX$ac_delim GNULIB_CALLOC_POSIX!$GNULIB_CALLOC_POSIX$ac_delim GNULIB_ATOLL!$GNULIB_ATOLL$ac_delim GNULIB_GETLOADAVG!$GNULIB_GETLOADAVG$ac_delim GNULIB_GETSUBOPT!$GNULIB_GETSUBOPT$ac_delim GNULIB_MKDTEMP!$GNULIB_MKDTEMP$ac_delim GNULIB_MKSTEMP!$GNULIB_MKSTEMP$ac_delim GNULIB_PUTENV!$GNULIB_PUTENV$ac_delim GNULIB_RANDOM_R!$GNULIB_RANDOM_R$ac_delim GNULIB_RPMATCH!$GNULIB_RPMATCH$ac_delim GNULIB_SETENV!$GNULIB_SETENV$ac_delim GNULIB_STRTOD!$GNULIB_STRTOD$ac_delim GNULIB_STRTOLL!$GNULIB_STRTOLL$ac_delim GNULIB_STRTOULL!$GNULIB_STRTOULL$ac_delim GNULIB_UNSETENV!$GNULIB_UNSETENV$ac_delim HAVE_ATOLL!$HAVE_ATOLL$ac_delim HAVE_CALLOC_POSIX!$HAVE_CALLOC_POSIX$ac_delim HAVE_GETSUBOPT!$HAVE_GETSUBOPT$ac_delim HAVE_MKDTEMP!$HAVE_MKDTEMP$ac_delim HAVE_REALLOC_POSIX!$HAVE_REALLOC_POSIX$ac_delim HAVE_RANDOM_R!$HAVE_RANDOM_R$ac_delim HAVE_RPMATCH!$HAVE_RPMATCH$ac_delim HAVE_SETENV!$HAVE_SETENV$ac_delim HAVE_STRTOD!$HAVE_STRTOD$ac_delim _ACEOF if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; 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-2.sed" <<\CEOF$ac_eof /@[a-zA-Z_][a-zA-Z_0-9]*@/!b _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 CEOF$ac_eof _ACEOF ac_delim='%!_!# ' for ac_last_try in false false false false false :; do cat >conf$$subs.sed <<_ACEOF HAVE_STRTOLL!$HAVE_STRTOLL$ac_delim HAVE_STRTOULL!$HAVE_STRTOULL$ac_delim HAVE_STRUCT_RANDOM_DATA!$HAVE_STRUCT_RANDOM_DATA$ac_delim HAVE_SYS_LOADAVG_H!$HAVE_SYS_LOADAVG_H$ac_delim HAVE_UNSETENV!$HAVE_UNSETENV$ac_delim HAVE_DECL_GETLOADAVG!$HAVE_DECL_GETLOADAVG$ac_delim REPLACE_MKSTEMP!$REPLACE_MKSTEMP$ac_delim REPLACE_PUTENV!$REPLACE_PUTENV$ac_delim REPLACE_STRTOD!$REPLACE_STRTOD$ac_delim VOID_UNSETENV!$VOID_UNSETENV$ac_delim GNULIB_BTOWC!$GNULIB_BTOWC$ac_delim GNULIB_WCTOB!$GNULIB_WCTOB$ac_delim GNULIB_MBSINIT!$GNULIB_MBSINIT$ac_delim GNULIB_MBRTOWC!$GNULIB_MBRTOWC$ac_delim GNULIB_MBRLEN!$GNULIB_MBRLEN$ac_delim GNULIB_MBSRTOWCS!$GNULIB_MBSRTOWCS$ac_delim GNULIB_MBSNRTOWCS!$GNULIB_MBSNRTOWCS$ac_delim GNULIB_WCRTOMB!$GNULIB_WCRTOMB$ac_delim GNULIB_WCSRTOMBS!$GNULIB_WCSRTOMBS$ac_delim GNULIB_WCSNRTOMBS!$GNULIB_WCSNRTOMBS$ac_delim GNULIB_WCWIDTH!$GNULIB_WCWIDTH$ac_delim HAVE_BTOWC!$HAVE_BTOWC$ac_delim HAVE_MBSINIT!$HAVE_MBSINIT$ac_delim HAVE_MBRTOWC!$HAVE_MBRTOWC$ac_delim HAVE_MBRLEN!$HAVE_MBRLEN$ac_delim HAVE_MBSRTOWCS!$HAVE_MBSRTOWCS$ac_delim HAVE_MBSNRTOWCS!$HAVE_MBSNRTOWCS$ac_delim HAVE_WCRTOMB!$HAVE_WCRTOMB$ac_delim HAVE_WCSRTOMBS!$HAVE_WCSRTOMBS$ac_delim HAVE_WCSNRTOMBS!$HAVE_WCSNRTOMBS$ac_delim HAVE_DECL_WCTOB!$HAVE_DECL_WCTOB$ac_delim HAVE_DECL_WCWIDTH!$HAVE_DECL_WCWIDTH$ac_delim REPLACE_MBSTATE_T!$REPLACE_MBSTATE_T$ac_delim REPLACE_BTOWC!$REPLACE_BTOWC$ac_delim REPLACE_WCTOB!$REPLACE_WCTOB$ac_delim REPLACE_MBSINIT!$REPLACE_MBSINIT$ac_delim REPLACE_MBRTOWC!$REPLACE_MBRTOWC$ac_delim REPLACE_MBRLEN!$REPLACE_MBRLEN$ac_delim REPLACE_MBSRTOWCS!$REPLACE_MBSRTOWCS$ac_delim REPLACE_MBSNRTOWCS!$REPLACE_MBSNRTOWCS$ac_delim REPLACE_WCRTOMB!$REPLACE_WCRTOMB$ac_delim REPLACE_WCSRTOMBS!$REPLACE_WCSRTOMBS$ac_delim REPLACE_WCWIDTH!$REPLACE_WCWIDTH$ac_delim WCHAR_H!$WCHAR_H$ac_delim LOCALE_JA!$LOCALE_JA$ac_delim LOCALE_FR_UTF8!$LOCALE_FR_UTF8$ac_delim LOCALE_ZH_CN!$LOCALE_ZH_CN$ac_delim GNULIB_MEMMEM!$GNULIB_MEMMEM$ac_delim GNULIB_MEMPCPY!$GNULIB_MEMPCPY$ac_delim GNULIB_MEMRCHR!$GNULIB_MEMRCHR$ac_delim GNULIB_RAWMEMCHR!$GNULIB_RAWMEMCHR$ac_delim GNULIB_STPCPY!$GNULIB_STPCPY$ac_delim GNULIB_STPNCPY!$GNULIB_STPNCPY$ac_delim GNULIB_STRCHRNUL!$GNULIB_STRCHRNUL$ac_delim GNULIB_STRDUP!$GNULIB_STRDUP$ac_delim GNULIB_STRNDUP!$GNULIB_STRNDUP$ac_delim GNULIB_STRNLEN!$GNULIB_STRNLEN$ac_delim GNULIB_STRPBRK!$GNULIB_STRPBRK$ac_delim GNULIB_STRSEP!$GNULIB_STRSEP$ac_delim GNULIB_STRSTR!$GNULIB_STRSTR$ac_delim GNULIB_STRCASESTR!$GNULIB_STRCASESTR$ac_delim GNULIB_STRTOK_R!$GNULIB_STRTOK_R$ac_delim GNULIB_MBSLEN!$GNULIB_MBSLEN$ac_delim GNULIB_MBSNLEN!$GNULIB_MBSNLEN$ac_delim GNULIB_MBSCHR!$GNULIB_MBSCHR$ac_delim GNULIB_MBSRCHR!$GNULIB_MBSRCHR$ac_delim GNULIB_MBSSTR!$GNULIB_MBSSTR$ac_delim GNULIB_MBSCASECMP!$GNULIB_MBSCASECMP$ac_delim GNULIB_MBSNCASECMP!$GNULIB_MBSNCASECMP$ac_delim GNULIB_MBSPCASECMP!$GNULIB_MBSPCASECMP$ac_delim GNULIB_MBSCASESTR!$GNULIB_MBSCASESTR$ac_delim GNULIB_MBSCSPN!$GNULIB_MBSCSPN$ac_delim GNULIB_MBSPBRK!$GNULIB_MBSPBRK$ac_delim GNULIB_MBSSPN!$GNULIB_MBSSPN$ac_delim GNULIB_MBSSEP!$GNULIB_MBSSEP$ac_delim GNULIB_MBSTOK_R!$GNULIB_MBSTOK_R$ac_delim GNULIB_STRERROR!$GNULIB_STRERROR$ac_delim GNULIB_STRSIGNAL!$GNULIB_STRSIGNAL$ac_delim GNULIB_STRVERSCMP!$GNULIB_STRVERSCMP$ac_delim HAVE_DECL_MEMMEM!$HAVE_DECL_MEMMEM$ac_delim HAVE_MEMPCPY!$HAVE_MEMPCPY$ac_delim HAVE_DECL_MEMRCHR!$HAVE_DECL_MEMRCHR$ac_delim HAVE_RAWMEMCHR!$HAVE_RAWMEMCHR$ac_delim HAVE_STPCPY!$HAVE_STPCPY$ac_delim HAVE_STPNCPY!$HAVE_STPNCPY$ac_delim HAVE_STRCHRNUL!$HAVE_STRCHRNUL$ac_delim HAVE_DECL_STRDUP!$HAVE_DECL_STRDUP$ac_delim HAVE_STRNDUP!$HAVE_STRNDUP$ac_delim HAVE_DECL_STRNDUP!$HAVE_DECL_STRNDUP$ac_delim HAVE_DECL_STRNLEN!$HAVE_DECL_STRNLEN$ac_delim HAVE_STRPBRK!$HAVE_STRPBRK$ac_delim HAVE_STRSEP!$HAVE_STRSEP$ac_delim HAVE_STRCASESTR!$HAVE_STRCASESTR$ac_delim HAVE_DECL_STRTOK_R!$HAVE_DECL_STRTOK_R$ac_delim HAVE_DECL_STRERROR!$HAVE_DECL_STRERROR$ac_delim HAVE_DECL_STRSIGNAL!$HAVE_DECL_STRSIGNAL$ac_delim HAVE_STRVERSCMP!$HAVE_STRVERSCMP$ac_delim _ACEOF if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; 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-3.sed" <<\CEOF$ac_eof /@[a-zA-Z_][a-zA-Z_0-9]*@/!b _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 CEOF$ac_eof _ACEOF ac_delim='%!_!# ' for ac_last_try in false false false false false :; do cat >conf$$subs.sed <<_ACEOF REPLACE_MEMMEM!$REPLACE_MEMMEM$ac_delim REPLACE_STRDUP!$REPLACE_STRDUP$ac_delim REPLACE_STRSTR!$REPLACE_STRSTR$ac_delim REPLACE_STRCASESTR!$REPLACE_STRCASESTR$ac_delim REPLACE_STRERROR!$REPLACE_STRERROR$ac_delim REPLACE_STRSIGNAL!$REPLACE_STRSIGNAL$ac_delim REPLACE_LOCALTIME_R!$REPLACE_LOCALTIME_R$ac_delim REPLACE_NANOSLEEP!$REPLACE_NANOSLEEP$ac_delim REPLACE_STRPTIME!$REPLACE_STRPTIME$ac_delim REPLACE_TIMEGM!$REPLACE_TIMEGM$ac_delim LIB_NANOSLEEP!$LIB_NANOSLEEP$ac_delim GNULIB_CHOWN!$GNULIB_CHOWN$ac_delim GNULIB_CLOSE!$GNULIB_CLOSE$ac_delim GNULIB_DUP2!$GNULIB_DUP2$ac_delim GNULIB_ENVIRON!$GNULIB_ENVIRON$ac_delim GNULIB_EUIDACCESS!$GNULIB_EUIDACCESS$ac_delim GNULIB_FCHDIR!$GNULIB_FCHDIR$ac_delim GNULIB_FSYNC!$GNULIB_FSYNC$ac_delim GNULIB_FTRUNCATE!$GNULIB_FTRUNCATE$ac_delim GNULIB_GETCWD!$GNULIB_GETCWD$ac_delim GNULIB_GETDOMAINNAME!$GNULIB_GETDOMAINNAME$ac_delim GNULIB_GETDTABLESIZE!$GNULIB_GETDTABLESIZE$ac_delim GNULIB_GETHOSTNAME!$GNULIB_GETHOSTNAME$ac_delim GNULIB_GETLOGIN_R!$GNULIB_GETLOGIN_R$ac_delim GNULIB_GETPAGESIZE!$GNULIB_GETPAGESIZE$ac_delim GNULIB_GETUSERSHELL!$GNULIB_GETUSERSHELL$ac_delim GNULIB_LCHOWN!$GNULIB_LCHOWN$ac_delim GNULIB_LINK!$GNULIB_LINK$ac_delim GNULIB_LSEEK!$GNULIB_LSEEK$ac_delim GNULIB_READLINK!$GNULIB_READLINK$ac_delim GNULIB_SLEEP!$GNULIB_SLEEP$ac_delim GNULIB_UNISTD_H_SIGPIPE!$GNULIB_UNISTD_H_SIGPIPE$ac_delim GNULIB_WRITE!$GNULIB_WRITE$ac_delim HAVE_DUP2!$HAVE_DUP2$ac_delim HAVE_EUIDACCESS!$HAVE_EUIDACCESS$ac_delim HAVE_FSYNC!$HAVE_FSYNC$ac_delim HAVE_FTRUNCATE!$HAVE_FTRUNCATE$ac_delim HAVE_GETDOMAINNAME!$HAVE_GETDOMAINNAME$ac_delim HAVE_GETDTABLESIZE!$HAVE_GETDTABLESIZE$ac_delim HAVE_GETHOSTNAME!$HAVE_GETHOSTNAME$ac_delim HAVE_GETPAGESIZE!$HAVE_GETPAGESIZE$ac_delim HAVE_GETUSERSHELL!$HAVE_GETUSERSHELL$ac_delim HAVE_LINK!$HAVE_LINK$ac_delim HAVE_READLINK!$HAVE_READLINK$ac_delim HAVE_SLEEP!$HAVE_SLEEP$ac_delim HAVE_DECL_ENVIRON!$HAVE_DECL_ENVIRON$ac_delim HAVE_DECL_GETLOGIN_R!$HAVE_DECL_GETLOGIN_R$ac_delim HAVE_OS_H!$HAVE_OS_H$ac_delim HAVE_SYS_PARAM_H!$HAVE_SYS_PARAM_H$ac_delim REPLACE_CHOWN!$REPLACE_CHOWN$ac_delim REPLACE_CLOSE!$REPLACE_CLOSE$ac_delim REPLACE_FCHDIR!$REPLACE_FCHDIR$ac_delim REPLACE_GETCWD!$REPLACE_GETCWD$ac_delim REPLACE_GETPAGESIZE!$REPLACE_GETPAGESIZE$ac_delim REPLACE_LCHOWN!$REPLACE_LCHOWN$ac_delim REPLACE_LSEEK!$REPLACE_LSEEK$ac_delim REPLACE_WRITE!$REPLACE_WRITE$ac_delim UNISTD_H_HAVE_WINSOCK2_H!$UNISTD_H_HAVE_WINSOCK2_H$ac_delim GNULIB_SIGNAL_H_SIGPIPE!$GNULIB_SIGNAL_H_SIGPIPE$ac_delim GNULIB_SIGPROCMASK!$GNULIB_SIGPROCMASK$ac_delim GNULIB_SIGACTION!$GNULIB_SIGACTION$ac_delim HAVE_POSIX_SIGNALBLOCKING!$HAVE_POSIX_SIGNALBLOCKING$ac_delim HAVE_SIGSET_T!$HAVE_SIGSET_T$ac_delim HAVE_SIGINFO_T!$HAVE_SIGINFO_T$ac_delim HAVE_SIGACTION!$HAVE_SIGACTION$ac_delim HAVE_STRUCT_SIGACTION_SA_SIGACTION!$HAVE_STRUCT_SIGACTION_SA_SIGACTION$ac_delim NEXT_SIGNAL_H!$NEXT_SIGNAL_H$ac_delim STDBOOL_H!$STDBOOL_H$ac_delim HAVE__BOOL!$HAVE__BOOL$ac_delim NEXT_STDLIB_H!$NEXT_STDLIB_H$ac_delim HAVE_RANDOM_H!$HAVE_RANDOM_H$ac_delim HAVE_STRCASECMP!$HAVE_STRCASECMP$ac_delim HAVE_DECL_STRNCASECMP!$HAVE_DECL_STRNCASECMP$ac_delim NEXT_STRING_H!$NEXT_STRING_H$ac_delim NEXT_STRINGS_H!$NEXT_STRINGS_H$ac_delim GNULIB_SOCKET!$GNULIB_SOCKET$ac_delim GNULIB_CONNECT!$GNULIB_CONNECT$ac_delim GNULIB_ACCEPT!$GNULIB_ACCEPT$ac_delim GNULIB_BIND!$GNULIB_BIND$ac_delim GNULIB_GETPEERNAME!$GNULIB_GETPEERNAME$ac_delim GNULIB_GETSOCKNAME!$GNULIB_GETSOCKNAME$ac_delim GNULIB_GETSOCKOPT!$GNULIB_GETSOCKOPT$ac_delim GNULIB_LISTEN!$GNULIB_LISTEN$ac_delim GNULIB_RECV!$GNULIB_RECV$ac_delim GNULIB_SEND!$GNULIB_SEND$ac_delim GNULIB_RECVFROM!$GNULIB_RECVFROM$ac_delim GNULIB_SENDTO!$GNULIB_SENDTO$ac_delim GNULIB_SETSOCKOPT!$GNULIB_SETSOCKOPT$ac_delim GNULIB_SHUTDOWN!$GNULIB_SHUTDOWN$ac_delim NEXT_SYS_SOCKET_H!$NEXT_SYS_SOCKET_H$ac_delim HAVE_WINSOCK2_H!$HAVE_WINSOCK2_H$ac_delim HAVE_SYS_SOCKET_H!$HAVE_SYS_SOCKET_H$ac_delim HAVE_WS2TCPIP_H!$HAVE_WS2TCPIP_H$ac_delim SYS_SOCKET_H!$SYS_SOCKET_H$ac_delim GNULIB_SELECT!$GNULIB_SELECT$ac_delim NEXT_SYS_SELECT_H!$NEXT_SYS_SELECT_H$ac_delim HAVE_SYS_SELECT_H!$HAVE_SYS_SELECT_H$ac_delim _ACEOF if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; 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-4.sed" <<\CEOF$ac_eof /@[a-zA-Z_][a-zA-Z_0-9]*@/!b _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 CEOF$ac_eof _ACEOF ac_delim='%!_!# ' for ac_last_try in false false false false false :; do cat >conf$$subs.sed <<_ACEOF SYS_SELECT_H!$SYS_SELECT_H$ac_delim HAVE_LSTAT!$HAVE_LSTAT$ac_delim NEXT_SYS_STAT_H!$NEXT_SYS_STAT_H$ac_delim SYS_STAT_H!$SYS_STAT_H$ac_delim NEXT_TIME_H!$NEXT_TIME_H$ac_delim TIME_H_DEFINES_STRUCT_TIMESPEC!$TIME_H_DEFINES_STRUCT_TIMESPEC$ac_delim SYS_TIME_H_DEFINES_STRUCT_TIMESPEC!$SYS_TIME_H_DEFINES_STRUCT_TIMESPEC$ac_delim NEXT_UNISTD_H!$NEXT_UNISTD_H$ac_delim HAVE_UNISTD_H!$HAVE_UNISTD_H$ac_delim HAVE_WINT_T!$HAVE_WINT_T$ac_delim HAVE_WCHAR_H!$HAVE_WCHAR_H$ac_delim NEXT_WCHAR_H!$NEXT_WCHAR_H$ac_delim HAVE_ISWCNTRL!$HAVE_ISWCNTRL$ac_delim NEXT_WCTYPE_H!$NEXT_WCTYPE_H$ac_delim HAVE_WCTYPE_H!$HAVE_WCTYPE_H$ac_delim WCTYPE_H!$WCTYPE_H$ac_delim REPLACE_ISWCNTRL!$REPLACE_ISWCNTRL$ac_delim LIBGNU_LIBDEPS!$LIBGNU_LIBDEPS$ac_delim LIBGNU_LTLIBDEPS!$LIBGNU_LTLIBDEPS$ac_delim TEXI2DVI!$TEXI2DVI$ac_delim TEXI2HTML!$TEXI2HTML$ac_delim HTMLDOCS_TEXI2HTML_TRUE!$HTMLDOCS_TEXI2HTML_TRUE$ac_delim HTMLDOCS_TEXI2HTML_FALSE!$HTMLDOCS_TEXI2HTML_FALSE$ac_delim HTMLDOCS_MAKEINFO_TRUE!$HTMLDOCS_MAKEINFO_TRUE$ac_delim HTMLDOCS_MAKEINFO_FALSE!$HTMLDOCS_MAKEINFO_FALSE$ac_delim PRODUCT!$PRODUCT$ac_delim HOST!$HOST$ac_delim MAKE!$MAKE$ac_delim INSTALL!$INSTALL$ac_delim INCLUDES!$INCLUDES$ac_delim CLEANFILES!$CLEANFILES$ac_delim LIBOBJS!$LIBOBJS$ac_delim LTLIBOBJS!$LTLIBOBJS$ac_delim gl_LIBOBJS!$gl_LIBOBJS$ac_delim gl_LTLIBOBJS!$gl_LTLIBOBJS$ac_delim gltests_LIBOBJS!$gltests_LIBOBJS$ac_delim gltests_LTLIBOBJS!$gltests_LTLIBOBJS$ac_delim _ACEOF if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 37; 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-5.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" | sed -f "$tmp/subs-2.sed" | sed -f "$tmp/subs-3.sed" | sed -f "$tmp/subs-4.sed" | sed -f "$tmp/subs-5.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. # So let's grep whole file. if grep '^#.*generated by automake' $mf > /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 gnuit-4.9.5/config.h.in0000644000175000017500000005704511146671375011651 00000000000000/* config.h.in. Generated from configure.ac by autoheader. */ /* Include the header file containing the version of the package. */ #include /* Define to get the GNU functionality in the C header files. */ #define _GNU_SOURCE /* Define if the compiler is building for multiple architectures of Apple platforms at once. */ #undef AA_APPLE_UNIVERSAL_BUILD /* Define to the number of bits in type 'ptrdiff_t'. */ #undef BITSIZEOF_PTRDIFF_T /* Define to the number of bits in type 'sig_atomic_t'. */ #undef BITSIZEOF_SIG_ATOMIC_T /* Define to the number of bits in type 'size_t'. */ #undef BITSIZEOF_SIZE_T /* Define to the number of bits in type 'wchar_t'. */ #undef BITSIZEOF_WCHAR_T /* Define to the number of bits in type 'wint_t'. */ #undef BITSIZEOF_WINT_T /* Define if you have a broken sys/filesys.h header file. */ #undef BROKEN_SYS_FILSYS_H /* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP systems. This function is required for `alloca.c' support on those systems. */ #undef CRAY_STACKSEG_END /* Define to 1 if using `alloca.c'. */ #undef C_ALLOCA /* Define to 1 if // is a file system root distinct from /. */ #undef DOUBLE_SLASH_IS_DISTINCT_ROOT /* Define on systems for which file names may have a so-called `drive letter' prefix, define this to compute the length of that prefix, including the colon. */ #undef FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX /* Define if the backslash character may also serve as a file name component separator. */ #undef FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR /* Define if a drive letter prefix denotes a relative path if it is not followed by a file name component separator. */ #undef FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE /* Define to nothing if C supports flexible array members, and to 1 if it does not. That way, with a declaration like `struct s { int n; double d[FLEXIBLE_ARRAY_MEMBER]; };', the struct hack can be used with pre-C99 compilers. When computing the size of such an object, don't use 'sizeof (struct s)' as it overestimates the size. Use 'offsetof (struct s, d)' instead. Don't use 'offsetof (struct s, d[0])', as this doesn't work with MSVC and with C++ compilers. */ #undef FLEXIBLE_ARRAY_MEMBER /* Define if gettimeofday clobbers the localtime buffer. */ #undef GETTIMEOFDAY_CLOBBERS_LOCALTIME /* Define to make the limit macros in visible. */ #undef GL_TRIGGER_STDC_LIMIT_MACROS /* Define to 1 when using the gnulib module open. */ #undef GNULIB_OPEN /* Define to 1 when using the gnulib module sys_socket. */ #undef GNULIB_SYS_SOCKET /* Define if you have the Unix 64bit I/O API. */ #undef HAVE_64BIT_IO /* Define to 1 if you have `alloca', as a function or macro. */ #undef HAVE_ALLOCA /* Define to 1 if you have and it should be used (not on Ultrix). */ #undef HAVE_ALLOCA_H /* Define if you have BSD compatible terminal interface. */ #undef HAVE_BSD_TTY /* Define to 1 if you have the `btowc' function. */ #undef HAVE_BTOWC /* Define to 1 if nanosleep mishandles large arguments. */ #undef HAVE_BUG_BIG_NANOSLEEP /* Define to 1 if you have the `clock_gettime' function. */ #undef HAVE_CLOCK_GETTIME /* Define to 1 if you have the `clock_settime' function. */ #undef HAVE_CLOCK_SETTIME /* Define to 1 if you have the declaration of `getc_unlocked', and to 0 if you don't. */ #undef HAVE_DECL_GETC_UNLOCKED /* Define to 1 if you have the declaration of `getenv', and to 0 if you don't. */ #undef HAVE_DECL_GETENV /* Define to 1 if you have the declaration of `imaxabs', and to 0 if you don't. */ #undef HAVE_DECL_IMAXABS /* Define to 1 if you have the declaration of `imaxdiv', and to 0 if you don't. */ #undef HAVE_DECL_IMAXDIV /* Define to 1 if you have the declaration of `isblank', and to 0 if you don't. */ #undef HAVE_DECL_ISBLANK /* Define to 1 if you have the declaration of `strerror', and to 0 if you don't. */ #undef HAVE_DECL_STRERROR /* Define to 1 if you have the declaration of `strerror_r', and to 0 if you don't. */ #undef HAVE_DECL_STRERROR_R /* Define to 1 if you have the declaration of `strncasecmp', and to 0 if you don't. */ #undef HAVE_DECL_STRNCASECMP /* Define to 1 if you have the declaration of `strndup', and to 0 if you don't. */ #undef HAVE_DECL_STRNDUP /* Define to 1 if you have the declaration of `strnlen', and to 0 if you don't. */ #undef HAVE_DECL_STRNLEN /* Define to 1 if you have the declaration of `strtoimax', and to 0 if you don't. */ #undef HAVE_DECL_STRTOIMAX /* Define to 1 if you have the declaration of `strtoll', and to 0 if you don't. */ #undef HAVE_DECL_STRTOLL /* Define to 1 if you have the declaration of `strtoull', and to 0 if you don't. */ #undef HAVE_DECL_STRTOULL /* Define to 1 if you have the declaration of `strtoumax', and to 0 if you don't. */ #undef HAVE_DECL_STRTOUMAX /* Define to 1 if you have the declaration of `wcwidth', and to 0 if you don't. */ #undef HAVE_DECL_WCWIDTH /* Define to 1 if you have the header file, and it defines `DIR'. */ #undef HAVE_DIRENT_H /* Define if you have a dumb C compiler (e.g. B.O.S.). */ #undef HAVE_DUMB_CC /* Define to 1 if you have the header file. */ #undef HAVE_DUSTAT_H /* Define to 1 if you have the header file. */ #undef HAVE_ERRNO_H /* Define to 1 if you have the header file. */ #undef HAVE_FCNTL_H /* Define if the compiler used is GNU CC. */ #undef HAVE_GCC /* Define to 1 if you have the `getcwd' function. */ #undef HAVE_GETCWD /* Define to 1 if you have the header file. */ #undef HAVE_GETOPT_H /* Define to 1 if you have the `getopt_long_only' function. */ #undef HAVE_GETOPT_LONG_ONLY /* Define to 1 if you have the `gettimeofday' function. */ #undef HAVE_GETTIMEOFDAY /* Define to 1 if the compiler supports one of the keywords 'inline', '__inline__', '__inline' and effectively inlines functions marked as such. */ #undef HAVE_INLINE /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Define to 1 if you have the `isblank' function. */ #undef HAVE_ISBLANK /* Define to 1 if you have the `iswcntrl' function. */ #undef HAVE_ISWCNTRL /* Define to 1 if you have the `iswctype' function. */ #undef HAVE_ISWCTYPE /* Define if you have and nl_langinfo(CODESET). */ #undef HAVE_LANGINFO_CODESET /* Define to 1 if you have the `sun' library (-lsun). */ #undef HAVE_LIBSUN /* Define if you have a termcap library. */ #undef HAVE_LIBTERMCAP /* Define if you have a terminfo library. */ #undef HAVE_LIBTERMINFO /* Define to 1 if you have the `ucb' library (-lucb). */ #undef HAVE_LIBUCB /* Define if your system Linux. */ #undef HAVE_LINUX /* Define to 1 if you have the header file. */ #undef HAVE_LOCALE_H /* Define to 1 if you support file names longer than 14 characters. */ #undef HAVE_LONG_FILE_NAMES /* Define to 1 if the system has the type `long long int'. */ #undef HAVE_LONG_LONG_INT /* Define to 1 if you have the `lstat' function. */ #undef HAVE_LSTAT /* Define if the 'malloc' function is POSIX compliant. */ #undef HAVE_MALLOC_POSIX /* Define to 1 if mbrtowc and mbstate_t are properly declared. */ #undef HAVE_MBRTOWC /* Define to 1 if you have the `mbsinit' function. */ #undef HAVE_MBSINIT /* Define to 1 if you have the `mbsrtowcs' function. */ #undef HAVE_MBSRTOWCS /* Define to 1 if declares mbstate_t. */ #undef HAVE_MBSTATE_T /* Define to 1 if you have the `memmove' function. */ #undef HAVE_MEMMOVE /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* Define to 1 if you have the `mempcpy' function. */ #undef HAVE_MEMPCPY /* Define to 1 if you have the `nanotime' function. */ #undef HAVE_NANOTIME /* Define to 1 if you have the header file, and it defines `DIR'. */ #undef HAVE_NDIR_H /* Define if you have POSIX compatible terminal interface. */ #undef HAVE_POSIX_TTY /* Define to 1 if you have the `putenv' function. */ #undef HAVE_PUTENV /* Define to 1 if you have the header file. */ #undef HAVE_RANDOM_H /* Define to 1 if you have the `readlink' function. */ #undef HAVE_READLINK /* Define to 1 if you have the `rename' function. */ #undef HAVE_RENAME /* Define to 1 if you have the `setenv' function. */ #undef HAVE_SETENV /* Define to 1 if you have the `setlocale' function. */ #undef HAVE_SETLOCALE /* Define to 1 if you have the `shutdown' function. */ #undef HAVE_SHUTDOWN /* Define to 1 if you have the `sigaction' function. */ #undef HAVE_SIGACTION /* Define to 1 if you have the `sigaltstack' function. */ #undef HAVE_SIGALTSTACK /* Define to 1 if the system has the type `siginfo_t'. */ #undef HAVE_SIGINFO_T /* Define to 1 if you have the `siginterrupt' function. */ #undef HAVE_SIGINTERRUPT /* Define to 1 if you have the header file. */ #undef HAVE_SIGNAL_H /* Define to 1 if 'sig_atomic_t' is a signed integer type. */ #undef HAVE_SIGNED_SIG_ATOMIC_T /* Define to 1 if 'wchar_t' is a signed integer type. */ #undef HAVE_SIGNED_WCHAR_T /* Define to 1 if 'wint_t' is a signed integer type. */ #undef HAVE_SIGNED_WINT_T /* Define to 1 if the system has the type `sigset_t'. */ #undef HAVE_SIGSET_T /* Define to 1 if you have the `statvfs' function. */ #undef HAVE_STATVFS /* Define to 1 if stdbool.h conforms to C99. */ #undef HAVE_STDBOOL_H /* Define to 1 if you have the header file. */ #undef HAVE_STDDEF_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 `strcasecmp' function. */ #undef HAVE_STRCASECMP /* Define to 1 if you have the `strcasestr' function. */ #undef HAVE_STRCASESTR /* Define to 1 if you have the `strerror' function. */ #undef HAVE_STRERROR /* Define to 1 if you have the `strerror_r' function. */ #undef HAVE_STRERROR_R /* 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 `strncasecmp' function. */ #undef HAVE_STRNCASECMP /* Define if you have the strndup() function and it works. */ #undef HAVE_STRNDUP /* Define to 1 if you have the `strstr' function. */ #undef HAVE_STRSTR /* Define to 1 if you have the `strtoimax' function. */ #undef HAVE_STRTOIMAX /* Define to 1 if you have the `strtol' function. */ #undef HAVE_STRTOL /* Define to 1 if you have the `strtoll' function. */ #undef HAVE_STRTOLL /* Define to 1 if you have the `strtoul' function. */ #undef HAVE_STRTOUL /* Define to 1 if you have the `strtoull' function. */ #undef HAVE_STRTOULL /* Define to 1 if you have the `strtoumax' function. */ #undef HAVE_STRTOUMAX /* Define to 1 if the system has the type `struct random_data'. */ #undef HAVE_STRUCT_RANDOM_DATA /* Define to 1 if `sa_sigaction' is member of `struct sigaction'. */ #undef HAVE_STRUCT_SIGACTION_SA_SIGACTION /* Define if struct utimbuf is declared -- usually in . Some systems have utime.h but don't declare the struct anywhere. */ #undef HAVE_STRUCT_UTIMBUF /* Define if you have System V compatible terminal interface. */ #undef HAVE_SYSTEMV_TTY /* Define to 1 if you have the header file. */ #undef HAVE_SYS_BITYPES_H /* Define to 1 if you have the header file, and it defines `DIR'. */ #undef HAVE_SYS_DIR_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_DUSTAT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_FILSYS_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_FS_S5PARAM_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_FS_TYPES_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_INTTYPES_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_MOUNT_H /* Define to 1 if you have the header file, and it defines `DIR'. */ #undef HAVE_SYS_NDIR_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_PARAM_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_SELECT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_SIOCTL_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_SOCKET_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STATFS_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STATVFS_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_TIMEB_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TIME_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_SYS_VFS_H /* Define to 1 if you have that is POSIX.1 compatible. */ #undef HAVE_SYS_WAIT_H /* Define to 1 if you have the header file. */ #undef HAVE_TIME_H /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* Define to 1 if the system has the type `unsigned long long int'. */ #undef HAVE_UNSIGNED_LONG_LONG_INT /* Define if utimes accepts a null argument */ #undef HAVE_UTIMES_NULL /* Define to 1 if you have the header file. */ #undef HAVE_UTIME_H /* Define to 1 if `utime(file, NULL)' sets file's timestamp to the present. */ #undef HAVE_UTIME_NULL /* Define if you have the utsname system call. */ #undef HAVE_UTSNAME /* Define to 1 if you have the header file. */ #undef HAVE_VALUES_H /* Define to 1 if you have the header file. */ #undef HAVE_WCHAR_H /* Define if you have the 'wchar_t' type. */ #undef HAVE_WCHAR_T /* Define to 1 if you have the header file. */ #undef HAVE_WCTYPE_H /* Define to 1 if you have the `wcwidth' function. */ #undef HAVE_WCWIDTH /* Define to 1 if you have the header file. */ #undef HAVE_WINSOCK2_H /* Define if you have the TIOCGWINSZ ioctl system call. */ #undef HAVE_WINSZ /* Define if you have the 'wint_t' type. */ #undef HAVE_WINT_T /* Define to 1 if you have the `wmemchr' function. */ #undef HAVE_WMEMCHR /* Define to 1 if you have the `wmemcpy' function. */ #undef HAVE_WMEMCPY /* Define to 1 if you have the `wmempcpy' function. */ #undef HAVE_WMEMPCPY /* Define to 1 if O_NOATIME works. */ #undef HAVE_WORKING_O_NOATIME /* Define to 1 if O_NOFOLLOW works. */ #undef HAVE_WORKING_O_NOFOLLOW /* Define to 1 if you have the header file. */ #undef HAVE_WS2TCPIP_H /* Define to 1 if the system has the type `_Bool'. */ #undef HAVE__BOOL /* Define to 1 if you have the `_ftime' function. */ #undef HAVE__FTIME #if FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR # define ISSLASH(C) ((C) == '/' || (C) == '\\') #else # define ISSLASH(C) ((C) == '/') #endif /* Define to 1 if `lstat' dereferences a symlink specified with a trailing slash. */ #undef LSTAT_FOLLOWS_SLASHED_SYMLINK /* If malloc(0) is != NULL, define this to 1. Otherwise define this to 0. */ #undef MALLOC_0_IS_NONNULL /* Define if the mbrtowc function has the NULL string argument bug. */ #undef MBRTOWC_NULL_ARG_BUG /* Define if the mbrtowc function does not return 0 for a NUL character. */ #undef MBRTOWC_NUL_RETVAL_BUG /* Define if the mbrtowc function returns a wrong return value. */ #undef MBRTOWC_RETVAL_BUG /* Define if you want to disable various consistency checkings. */ #undef NDEBUG /* Define to 1 if your C compiler doesn't accept -c and -o together. */ #undef NO_MINUS_C_MINUS_O /* Define to 1 if open() fails to recognize a trailing slash. */ #undef OPEN_TRAILING_SLASH_BUG /* 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 if exists and defines unusable PRI* macros. */ #undef PRI_MACROS_BROKEN /* Define to l, ll, u, ul, ull, etc., as suitable for constants of type 'ptrdiff_t'. */ #undef PTRDIFF_T_SUFFIX /* Define if rename does not work for source file names with a trailing slash, like the one from SunOS 4.1.1_U1. */ #undef RENAME_TRAILING_SLASH_BUG /* Define this to 1 if strerror is broken. */ #undef REPLACE_STRERROR /* Define as the return type of signal handlers (`int' or `void'). */ #undef RETSIGTYPE /* Define to l, ll, u, ul, ull, etc., as suitable for constants of type 'sig_atomic_t'. */ #undef SIG_ATOMIC_T_SUFFIX /* Define to l, ll, u, ul, ull, etc., as suitable for constants of type 'size_t'. */ #undef SIZE_T_SUFFIX /* If using the C implementation of alloca, define if you know the direction of stack growth for your system; otherwise it will be automatically deduced at runtime. STACK_DIRECTION > 0 => grows toward higher addresses STACK_DIRECTION < 0 => grows toward lower addresses STACK_DIRECTION = 0 => direction of growth unknown */ #undef STACK_DIRECTION /* Define if the block counts reported by statfs may be truncated to 2GB and the correct values may be stored in the f_spare array. (SunOS 4.1.2, 4.1.3, and 4.1.3_U1 are reported to have this problem. SunOS 4.1.1 seems not to be affected.) */ #undef STATFS_TRUNCATES_BLOCK_COUNTS /* Define to 1 if the `S_IS*' macros in do not work properly. */ #undef STAT_MACROS_BROKEN /* Define if there is no specific function for reading file systems usage information and you have the header file. (SVR2) */ #undef STAT_READ_FILSYS /* Define if you have two-argument statfs with statfs.bsize member (AIX, 4.3BSD). */ #undef STAT_STATFS2_BSIZE /* Define if you have two-argument statfs with statfs.fsize member (4.4BSD and NetBSD). */ #undef STAT_STATFS2_FSIZE /* Define if you have two-argument statfs with struct fs_data (Ultrix). */ #undef STAT_STATFS2_FS_DATA /* Define if you have 3-argument statfs function (DEC OSF/1). */ #undef STAT_STATFS3_OSF1 /* Define if you have four-argument statfs (AIX-3.2.5, SVR3). */ #undef STAT_STATFS4 /* Define if you have the statvfs system call. */ #undef STAT_STATVFS /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* Define to 1 if strerror_r returns char *. */ #undef STRERROR_R_CHAR_P /* Define to 1 if you can safely include both and . */ #undef TIME_WITH_SYS_TIME /* Version number of package */ #undef VERSION /* Define to l, ll, u, ul, ull, etc., as suitable for constants of type 'wchar_t'. */ #undef WCHAR_T_SUFFIX /* Define to l, ll, u, ul, ull, etc., as suitable for constants of type 'wint_t'. */ #undef WINT_T_SUFFIX /* Define to 1 if on AIX 3. System headers sometimes define this. We just want to avoid a redefinition error message. */ #ifndef _ALL_SOURCE # undef _ALL_SOURCE #endif /* Number of bits in a file offset, on hosts where this is settable. */ #undef _FILE_OFFSET_BITS /* Enable GNU extensions on systems that have them. */ #ifndef _GNU_SOURCE # undef _GNU_SOURCE #endif /* Define for large files, on AIX-style hosts. */ #undef _LARGE_FILES /* Define to 1 if on MINIX. */ #undef _MINIX /* Define to 2 if the system does not provide POSIX.1 features except with this defined. */ #undef _POSIX_1_SOURCE /* Define to 1 if you need to in order for `stat' and other things to work. */ #undef _POSIX_SOURCE /* Define to 500 only on HP-UX. */ #undef _XOPEN_SOURCE /* Enable extensions on AIX 3, Interix. */ #ifndef _ALL_SOURCE # undef _ALL_SOURCE #endif /* Enable GNU extensions on systems that have them. */ #ifndef _GNU_SOURCE # undef _GNU_SOURCE #endif /* Enable threading extensions on Solaris. */ #ifndef _POSIX_PTHREAD_SEMANTICS # undef _POSIX_PTHREAD_SEMANTICS #endif /* Enable extensions on HP NonStop. */ #ifndef _TANDEM_SOURCE # undef _TANDEM_SOURCE #endif /* Enable general extensions on Solaris. */ #ifndef __EXTENSIONS__ # undef __EXTENSIONS__ #endif /* Define to rpl_ if the getopt replacement functions and variables should be used. */ #undef __GETOPT_PREFIX /* Ensure that defines the limit macros, since gnulib's relies on them. */ #if defined __cplusplus && !defined __STDC_LIMIT_MACROS && GL_TRIGGER_STDC_LIMIT_MACROS # define __STDC_LIMIT_MACROS 1 #endif /* Define to empty if `const' does not conform to ANSI C. */ #undef const /* Define to a replacement function name for fnmatch(). */ #undef fnmatch /* Define to `int' if doesn't define. */ #undef gid_t /* Define to rpl_gmtime if the replacement function should be used. */ #undef gmtime /* Define to `__inline__' or `__inline' if that's what the C compiler calls it, or to nothing if 'inline' is not supported under any name. */ #ifndef __cplusplus #undef inline #endif /* Work around a bug in Apple GCC 4.0.1 build 5465: In C99 mode, it supports the ISO C 99 semantics of 'extern inline' (unlike the GNU C semantics of earlier versions), but does not display it by setting __GNUC_STDC_INLINE__. __APPLE__ && __MACH__ test for MacOS X. __APPLE_CC__ tests for the Apple compiler and its version. __STDC_VERSION__ tests for the C99 mode. */ #if defined __APPLE__ && defined __MACH__ && __APPLE_CC__ >= 5465 && !defined __cplusplus && __STDC_VERSION__ >= 199901L && !defined __GNUC_STDC_INLINE__ # define __GNUC_STDC_INLINE__ 1 #endif /* Define to rpl_localtime if the replacement function should be used. */ #undef localtime /* Define to a type if does not define. */ #undef mbstate_t /* Define to `int' if does not define. */ #undef mode_t /* Define to the type of st_nlink in struct stat, or a supertype. */ #undef nlink_t /* Define to `long int' if does not define. */ #undef off_t /* Define to `int' if does not define. */ #undef pid_t /* Define to rpl_rename if the replacement function should be used. */ #undef rename /* Define to the equivalent of the C99 'restrict' keyword, or to nothing if this is not supported. Do not define if restrict is supported directly. */ #undef restrict /* Work around a bug in Sun C++: it does not support _Restrict, even though the corresponding Sun C compiler does, which causes "#define restrict _Restrict" in the previous line. Perhaps some future version of Sun C++ will work with _Restrict; if so, it'll probably define __RESTRICT, just as Sun C does. */ #if defined __SUNPRO_CC && !defined __RESTRICT # define _Restrict #endif /* Define to `unsigned int' if does not define. */ #undef size_t /* Define as a signed type of the same size as size_t. */ #undef ssize_t /* Define to rpl_strnlen if the replacement function should be used. */ #undef strnlen /* Define to `int' if doesn't define. */ #undef uid_t /* Define as a marker that can be attached to function parameter declarations for parameters that are not used. This helps to reduce warnings, such as from GCC -Wunused-parameter. */ #if __GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) # define _UNUSED_PARAMETER_ __attribute__ ((__unused__)) #else # define _UNUSED_PARAMETER_ #endif /* Define to rpl_utime if the replacement function should be used. */ #undef utime /* Define to get the Unix 64bit I/O API (Linux/glibc only). */ #ifdef HAVE_64BIT_IO #ifndef _LARGEFILE64_SOURCE #define _LARGEFILE64_SOURCE #endif #endif /* See the file PROBLEMS for details on this. */ #ifdef HAVE_LINUX #undef HAVE_LSTAT #define HAVE_LSTAT 1 #endif /* Support for O_BINARY, required for CYGWIN. */ #ifndef O_BINARY #define O_BINARY 0 #endif gnuit-4.9.5/configure.ac0000644000175000017500000004373711146671375012117 00000000000000dnl ##################################################################### dnl # Autoconf input file for GNU Interactive Tools # dnl # Copyright (C) 1993-2003, 2006-2007 Free Software Foundation, Inc. # dnl ##################################################################### dnl Initialize the autoconf & automake stuff. AC_REVISION($Revision: 1.7 $) AC_INIT(gnuit, 4.9.5, ianb@erislabs.net) AC_CONFIG_SRCDIR([config.h.in]) AM_INIT_AUTOMAKE AC_PROG_MAKE_SET AM_SANITY_CHECK AM_CONFIG_HEADER([config.h]) AC_PREREQ(2.59) AC_CANONICAL_HOST AC_PROG_CC AM_PROG_CC_C_O gl_EARLY AC_PROG_CPP AC_PROG_RANLIB AC_PROG_INSTALL AC_REQUIRE_CPP AC_SYS_LARGEFILE HOST=$host AM_MAINTAINER_MODE AH_TOP( [ /* Include the header file containing the version of the package. */ #include /* Define to get the GNU functionality in the C header files. */ #define _GNU_SOURCE ]) AH_BOTTOM( [ /* Define to get the Unix 64bit I/O API (Linux/glibc only). */ #ifdef HAVE_64BIT_IO #ifndef _LARGEFILE64_SOURCE #define _LARGEFILE64_SOURCE #endif #endif /* See the file PROBLEMS for details on this. */ #ifdef HAVE_LINUX #undef HAVE_LSTAT #define HAVE_LSTAT 1 #endif /* Support for O_BINARY, required for CYGWIN. */ #ifndef O_BINARY #define O_BINARY 0 #endif ]) dnl Default to enabling transition for this release TRANSITIONOPT=yes AC_ARG_ENABLE( transition, AS_HELP_STRING([--enable-transition], [install transitional /usr/bin/git]), TRANSITIONOPT="$enableval", TRANSITIONOPT=yes) AM_CONDITIONAL(TRANSITION, test "$TRANSITIONOPT" = yes) dnl whether to enable debian customisations (sensible-browser, etc) DEBIANOPT=yes AC_ARG_ENABLE( debian, AS_HELP_STRING([--enable-debian], [Enable Debian-specific customisations]), DEBIANOPT="$enableval", DEBIANOPT=no) AM_CONDITIONAL(DEBIAN, test "$DEBIANOPT" = yes) dnl Check for SMP compilation. AC_ARG_ENABLE( smp, AS_HELP_STRING([--enable-smp],[enable parallel compilation (Linux only)]), SMP="$enableval", SMP=no) dnl Check the system type. We are especially looking for Linux. MAKE="make" if test "$host_os" = "linux-gnu"; then AC_DEFINE([HAVE_LINUX], 1, [Define if your system Linux.]) if test "$SMP" = "yes"; then AC_CACHE_CHECK( [for the number of processors], [ac_cv_processors], [ac_cv_processors="1" if test -f /proc/cpuinfo; then ac_cv_processors=`cat /proc/cpuinfo |\ grep processor | wc -l | sed 's/ //g'` fi]) if test "$ac_cv_processors" -ge 2; then MAKE="make -j`expr $ac_cv_processors + 1`" fi fi fi AC_ARG_ENABLE( gcc-warnings, AS_HELP_STRING([--enable-gcc-warnings],[more gcc warnings for debugging purposes]), GCC_WARNINGS="$enableval", GCC_WARNINGS=no) AC_ARG_ENABLE( efence, AS_HELP_STRING([--enable-efence],[link against the Electric Fence library]), EFENCE="$enableval", EFENCE=no) dnl Increase the warnings level if using GNU C. dnl We don't pass -ansi here, since it disables 64bit I/O. if test "$CC" = "gcc"; then AC_DEFINE([HAVE_GCC], 1, [Define if the compiler used is GNU CC.]) if test "$GCC_WARNINGS" = "yes"; then CFLAGS="$CFLAGS -W -Wall \ -Waggregate-return -Wbad-function-cast -fstrict-aliasing \ -Winline -Wpointer-arith -Wcast-qual" else AC_DEFINE( [NDEBUG], 1, [Define if you want to disable various consistency checkings.]) fi else AC_DEFINE( [NDEBUG], 1, [Define if you want to disable various consistency checkings.]) fi dnl Use the Electric Fence library for debugging purposes. if test "$EFENCE" = "yes"; then LIBS="$LIBS -lefence" fi dnl Check for some UNIX variants. These ones need special treatement dnl due to exceptional oddities in their header files or libraries. AC_AIX AC_ISC_POSIX AC_MINIX AC_CHECK_LIB(sun, getpwnam) dnl Check for standard C as well as system dependent header files. AC_HEADER_STDC AC_CHECK_HEADERS( unistd.h stdlib.h string.h memory.h values.h\ sys/param.h sys/vfs.h sys/filsys.h fcntl.h sys/statfs.h\ sys/dustat.h sys/statvfs.h sys/sioctl.h stddef.h locale.h) dnl freebsd needs sys/param.h included before sys/mount.h AC_CHECK_HEADERS([sys/mount.h],[],[], [#if HAVE_SYS_PARAM_H #include #endif ]) gl_INIT AC_FUNC_ALLOCA dnl Unisys has a broken sys/filsys.h. We don't want to include it, dnl considering the fact that other methods are available. AC_CACHE_CHECK( [for broken sys/filsys.h], [ac_cv_broken_sys_filsys_h], [AC_TRY_LINK( [ #include #ifdef HAVE_SYS_FILSYS_H #include #endif ], [{}], ac_cv_broken_sys_filsys_h=no, ac_cv_broken_sys_filsys_h=yes)]) if test $ac_cv_broken_sys_filsys_h = yes; then AC_DEFINE( [BROKEN_SYS_FILSYS_H], 1, [Define if you have a broken sys/filesys.h header file.]) fi dnl Check for system specific directory functions declarations. AC_HEADER_DIRENT dnl Check whether the C compiler do support the 'const' keyword. AC_C_CONST dnl Check for predefined C types. Fix them if necessary... AC_TYPE_SIGNAL AC_TYPE_MODE_T AC_TYPE_OFF_T AC_TYPE_PID_T AC_TYPE_SIZE_T AC_TYPE_UID_T dnl Check how to include time.h and sys/time.h. AC_CHECK_HEADERS(sys/time.h) AC_HEADER_TIME dnl Check whether the system supports long file names. GIT will issue dnl a warning at run time if long file names are not supported. Really!? AC_SYS_LONG_FILE_NAMES dnl Check the sys/stat.h macros. AC_HEADER_STAT dnl Check for a POSIX.1 compatible sys/wait.h. AC_HEADER_SYS_WAIT dnl Check for the existence of various functions. AC_CHECK_FUNCS([\ lstat sigaction strerror strcasecmp strncasecmp\ strstr memmove putenv setenv getcwd rename readlink setlocale]) dnl This configure.in code has been stolen from GNU fileutils-3.12. dnl Its purpose is detecting a method to get file system information. space=no # Here we'll compromise a little (and perform only the link test) # since it seems there are no variants of the statvfs function. if test $space = no; then # SVR4 AC_CHECK_FUNCS(statvfs) if test $ac_cv_func_statvfs = yes; then space=yes AC_DEFINE( [STAT_STATVFS], 1, [Define if you have the statvfs system call.]) fi fi if test $space = no; then # DEC Alpha running OSF/1 AC_CACHE_CHECK( [for 3-argument statfs function (DEC OSF/1)], [fu_cv_sys_stat_statfs3_osf1], [AC_TRY_RUN( [ #ifdef HAVE_SYS_PARAM_H #include #endif #include #ifdef HAVE_SYS_MOUNT_H #include #endif main() { struct statfs fsd; fsd.f_fsize = 0; exit(statfs(".", &fsd, sizeof(struct statfs))); } ], fu_cv_sys_stat_statfs3_osf1=yes, fu_cv_sys_stat_statfs3_osf1=no, fu_cv_sys_stat_statfs3_osf1=no)]) if test $fu_cv_sys_stat_statfs3_osf1 = yes; then space=yes AC_DEFINE( [STAT_STATFS3_OSF1], 1, [Define if you have 3-argument statfs function (DEC OSF/1).]) fi fi if test $space = no; then # AIX AC_CACHE_CHECK( [for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)], [fu_cv_sys_stat_statfs2_bsize], [AC_TRY_RUN( [ #ifdef HAVE_SYS_PARAM_H #include #endif #ifdef HAVE_SYS_MOUNT_H #include #endif #ifdef HAVE_SYS_VFS_H #include #endif main() { struct statfs fsd; fsd.f_bsize = 0; exit(statfs(".", &fsd)); } ], fu_cv_sys_stat_statfs2_bsize=yes, fu_cv_sys_stat_statfs2_bsize=no, fu_cv_sys_stat_statfs2_bsize=no)]) if test $fu_cv_sys_stat_statfs2_bsize = yes; then space=yes AC_DEFINE( [STAT_STATFS2_BSIZE], 1, [Define if you have two-argument statfs with statfs.bsize member (AIX, 4.3BSD).]) fi fi if test $space = no; then # SVR3 AC_CACHE_CHECK( [for four-argument statfs (AIX-3.2.5, SVR3)], [fu_cv_sys_stat_statfs4], [AC_TRY_RUN( [ #include #ifdef HAVE_SYS_STATFS_H #include #endif main() { struct statfs fsd; exit(statfs(".", &fsd, sizeof fsd, 0)); } ], fu_cv_sys_stat_statfs4=yes, fu_cv_sys_stat_statfs4=no, fu_cv_sys_stat_statfs4=no)]) if test $fu_cv_sys_stat_statfs4 = yes; then space=yes AC_DEFINE( [STAT_STATFS4], 1, [Define if you have four-argument statfs (AIX-3.2.5, SVR3).]) fi fi if test $space = no; then # 4.4BSD and NetBSD AC_CACHE_CHECK( [for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)], [fu_cv_sys_stat_statfs2_fsize], [AC_TRY_RUN( [ #include #ifdef HAVE_SYS_PARAM_H #include #endif #ifdef HAVE_SYS_MOUNT_H #include #endif main() { struct statfs fsd; fsd.f_fsize = 0; exit(statfs(".", &fsd)); } ], fu_cv_sys_stat_statfs2_fsize=yes, fu_cv_sys_stat_statfs2_fsize=no, fu_cv_sys_stat_statfs2_fsize=no)]) if test $fu_cv_sys_stat_statfs2_fsize = yes; then space=yes AC_DEFINE( [STAT_STATFS2_FSIZE], 1, [Define if you have two-argument statfs with statfs.fsize member (4.4BSD and NetBSD).]) fi fi if test $space = no; then # Ultrix AC_CACHE_CHECK( [for two-argument statfs with struct fs_data (Ultrix)], [fu_cv_sys_stat_fs_data], [AC_TRY_RUN( [ #include #ifdef HAVE_SYS_PARAM_H #include #endif #ifdef HAVE_SYS_MOUNT_H #include #endif #ifdef HAVE_SYS_FS_TYPES_H #include #endif main() { struct fs_data fsd; /* Ultrix's statfs returns 1 for success, 0 for not mounted, -1 for failure. */ exit(statfs(".", &fsd) != 1); } ], fu_cv_sys_stat_fs_data=yes, fu_cv_sys_stat_fs_data=no, fu_cv_sys_stat_fs_data=no)]) if test $fu_cv_sys_stat_fs_data = yes; then space=yes AC_DEFINE( [STAT_STATFS2_FS_DATA], 1, [Define if you have two-argument statfs with struct fs_data (Ultrix).]) fi fi dnl Check for compilers that do not support constructs combinations dnl of ANSI C like prototypes & K&R definitions. B.O.S. systems. AC_CACHE_CHECK( [for dumb C compiler], [git_cv_dumb_cc], [AC_TRY_LINK( [void tst(char); void tst(i) char i; {}], [{ tst('A'); } ], git_cv_dumb_cc=no, git_cv_dumb_cc=yes)]) if test "$git_cv_dumb_cc" = "yes"; then AC_DEFINE( [HAVE_DUMB_CC], 1, [Define if you have a dumb C compiler (e.g. B.O.S.).]) fi dnl Check if struct utsname is available. AC_CACHE_CHECK( [for struct utsname], [git_cv_struct_utsname], [AC_TRY_LINK( [#include ], [{ char *ptr; struct utsname u; uname(&u); ptr = u.nodename; ptr = u.sysname; ptr = u.machine; }], git_cv_struct_utsname=yes, git_cv_struct_utsname=no)]) if test "$git_cv_struct_utsname" = "yes"; then AC_DEFINE( [HAVE_UTSNAME], 1, [Define if you have the utsname system call.]) fi dnl Check for POSIX compatible terminal interface. AC_CACHE_CHECK( [for POSIX compatible terminal interface], [git_cv_sys_posix_tty], [AC_TRY_LINK( [#include ], [{ struct termios term; tcgetattr(0, &term); }], git_cv_sys_posix_tty=yes, git_cv_sys_posix_tty=no)]) if test "$git_cv_sys_posix_tty" = "yes"; then AC_DEFINE( [HAVE_POSIX_TTY], 1, [Define if you have POSIX compatible terminal interface.]) fi dnl Check for System V compatible terminal interface. AC_CACHE_CHECK( [for System V compatible terminal interface], [git_cv_sys_systemv_tty], [AC_TRY_LINK( [#include ], [{ struct termio term; ioctl(0, TCGETA, &term); }], git_cv_sys_systemv_tty=yes, git_cv_sys_systemv_tty=no)]) if test "$git_cv_sys_systemv_tty" = "yes"; then AC_DEFINE( [HAVE_SYSTEMV_TTY], 1, [Define if you have System V compatible terminal interface.]) fi dnl Check for BSD compatible terminal interface. AC_CACHE_CHECK( [for BSD compatible terminal interface], [git_cv_sys_bsd_tty], [AC_TRY_LINK( [#include ], [{ struct sgttyb arg; struct tchars targ; struct ltchars ltarg; ioctl(0, TIOCGETP,&arg); ioctl(0, TIOCGETC,&targ); ioctl(0, TIOCGLTC,<arg); }], git_cv_sys_bsd_tty=yes, git_cv_sys_bsd_tty=no)] ) if test "$git_cv_sys_bsd_tty" = "yes"; then AC_DEFINE( [HAVE_BSD_TTY], 1, [Define if you have BSD compatible terminal interface.]) fi dnl Check if ioctl(1, TIOCGWINSZ, &winsz) works. AC_CACHE_CHECK( [for struct winsz], [git_cv_struct_winsz], [AC_TRY_LINK( [ #include #include #ifdef HAVE_POSIX_TTY #include #else #ifdef HAVE_SYSTEMV_TTY #include #else #include #endif /* HAVE_SYSTEMV_TTY */ #endif /* HAVE_POSIX_TTY */ #if defined TIOCGSIZE && !defined TIOCGWINSZ #define TIOCGWINSZ TIOCGSIZE #endif ], [{ struct winsize winsz; ioctl(1, TIOCGWINSZ, &winsz); winsz.ws_col = winsz.ws_row; }], git_cv_struct_winsz=yes, git_cv_struct_winsz=no)] ) if test "$git_cv_struct_winsz" = "yes"; then AC_DEFINE( [HAVE_WINSZ], 1, [Define if you have the TIOCGWINSZ ioctl system call.]) fi dnl Check the terminal capabilities library to use. AC_CHECK_LIB( ncursesw, tgetent, AC_DEFINE( [HAVE_LIBTERMINFO], 1, [Define if you have a terminfo library.]) LIBS="$LIBS -lncursesw" TERMLIB_FOUND=yes, AC_CHECK_LIB( ncurses, tgetent, AC_DEFINE( [HAVE_LIBTERMINFO], 1, [Define if you have a terminfo library.]) LIBS="$LIBS -lncurses" TERMLIB_FOUND=yes, AC_CHECK_LIB( termlib, tgetent, AC_DEFINE( [HAVE_LIBTERMINFO], 1, [Define if you have a terminfo library.]) LIBS="$LIBS -ltermlib" TERMLIB_FOUND=yes, AC_CHECK_LIB( curses, tgetent, AC_DEFINE( [HAVE_LIBTERMINFO], 1, [Define if you have a terminfo library.]) LIBS="$LIBS -lcurses" TERMLIB_FOUND=yes, AC_CHECK_LIB( tinfo, tgetent, AC_DEFINE( [HAVE_LIBTERMINFO], 1, [Define if you have a terminfo library.]) LIBS="$LIBS -ltinfo" TERMLIB_FOUND=yes, AC_CHECK_LIB( terminfo, tgetent, AC_DEFINE( [HAVE_LIBTERMINFO], 1, [Define if you have a terminfo library.]) LIBS="$LIBS -lterminfo" TERMLIB_FOUND=yes, AC_CHECK_LIB( termcap, tgetent, AC_DEFINE( [HAVE_LIBTERMCAP], 1, [Define if you have a termcap library.]) LIBS="$LIBS -ltermcap" TERMLIB_FOUND=yes, TERMLIB_FOUND=no ) ) ) ) ) ) ) if test "$TERMLIB_FOUND" = "no"; then AC_MSG_ERROR([no library for handling terminal capabilities]) fi dnl Check for 64bit I/O. AC_CACHE_CHECK( [for 64bit I/O support], [git_cv_64bit_io], [AC_TRY_LINK( [ #define _LARGEFILE64_SOURCE #include #include #include ], [{ off64_t x; fopen64("x", "r"); }], git_cv_64bit_io=yes, git_cv_64bit_io=no)] ) if test "$git_cv_64bit_io" = "yes"; then AC_DEFINE( [HAVE_64BIT_IO], 1, [Define if you have the Unix 64bit I/O API.]) fi dnl Check for the presence of the texi2dvi utility. If we can't find dnl it, we can't build the dvi documentation. AC_PROGRAM_CHECK(TEXI2DVI, texi2dvi, texi2dvi, false) if test "$TEXI2DVI" = "false"; then AC_MSG_WARN(***** texi2dvi utility not found *****) fi dnl Check for the presence of the texi2html utility. If we can't find dnl it, we can't build the html documentation. htmldocs_texi2html=no AC_PROGRAM_CHECK(TEXI2HTML, texi2html, texi2html, false) if test "$TEXI2HTML" = "false"; then AC_MSG_WARN(***** texi2html utility not found *****) else htmldocs_texi2html=yes fi AM_CONDITIONAL(HTMLDOCS_TEXI2HTML, test "$htmldocs_texi2html" = yes) dnl Check for the presence of the makeinfo utility. If we can't find dnl it, we can't build the info documentation. htmldocs_makeinfo=no AC_PROGRAM_CHECK(MAKEINFO, makeinfo, makeinfo, false) if test "$MAKEINFO" = "false"; then AC_MSG_WARN(***** makeinfo utility not found *****) else htmldocs_makeinfo=yes fi AM_CONDITIONAL(HTMLDOCS_MAKEINFO, test "$htmldocs_makeinfo" = yes) dnl According to Joachim Baumann, for Solaris 2.3 & Solaris 2.4 (at least) dnl -lucb should be included after -ltermcap. This hasn't been tested! if test "$HAVE_LIBTERMCAP" = "yes"; then if test "$host_os" = "solaris2.3" || test "$host_os" = "solaris2.4"; then AC_CHECK_LIB(ucb, tgetent, , , $LIBS) fi fi CLEANFILES="core tutu gogu *.out t tt mwatch.log mtrace.log autoscan.log autom4te.cache/*" dnl Make final variable substitutions. AC_SUBST(PRODUCT, "GNU Interactive Tools") AC_SUBST(HOST) AC_SUBST(MAKE) AC_SUBST(INSTALL) AC_SUBST(INSTALL_PROGRAM) AC_SUBST(INSTALL_DATA) AC_SUBST(CFLAGS) AC_SUBST(CPP) AC_SUBST(DEFS) AC_SUBST(LIBS) AC_SUBST(LDFLAGS) AC_SUBST(INCLUDES) AC_SUBST(CLEANFILES) dnl Generate the Makefiles. AC_OUTPUT([ version.h Makefile src/Makefile term/Makefile term/gnuitrc.aixterm term/gnuitrc.ansi term/gnuitrc.generic term/gnuitrc.hft term/gnuitrc.hpterm term/gnuitrc.linux term/gnuitrc.linux-m term/gnuitrc.mach term/gnuitrc.minix term/gnuitrc.thix term/gnuitrc.vt100 term/gnuitrc.vt102 term/gnuitrc.xterm term/gnuitrc.xterm-color doc/Makefile lib/Makefile gnuit.spec LSM]) gnuit-4.9.5/AUTHORS0000644000175000017500000000016511146671375010665 00000000000000Tudor Hulubei Andrei Pitis Ian Beckwith (Current Maintainer)