From 251098a06a52db17846a71454ee5538354a8169a Mon Sep 17 00:00:00 2001 From: kevind Date: Sun, 8 Aug 1999 19:44:35 +0000 Subject: [PATCH] *** empty log message *** --- .cvsignore | 6 + AUTHORS | 16 ++ ChangeLog | 90 +++++++ NEWS | 4 + find/.cvsignore | 2 + lib/.cvsignore | 1 + lib/Makefile.in | 450 +++++++++++++++++++++++---------- lib/listfile.c | 2 +- lib/nextelem.c | 3 + locate/.cvsignore | 4 + locate/Makefile.in | 672 +++++++++++++++++++++++++++++++++----------------- locate/locate.c | 9 +- testsuite/.cvsignore | 1 + testsuite/Makefile.in | 345 +++++++++++++++++--------- xargs/.cvsignore | 2 + xargs/Makefile.in | 516 ++++++++++++++++++++++++++------------ xargs/xargs.c | 2 +- 17 files changed, 1486 insertions(+), 639 deletions(-) create mode 100644 .cvsignore create mode 100644 AUTHORS create mode 100644 find/.cvsignore create mode 100644 lib/.cvsignore rewrite lib/Makefile.in (82%) create mode 100644 locate/.cvsignore rewrite locate/Makefile.in (73%) create mode 100644 testsuite/.cvsignore rewrite testsuite/Makefile.in (64%) create mode 100644 xargs/.cvsignore rewrite xargs/Makefile.in (81%) diff --git a/.cvsignore b/.cvsignore new file mode 100644 index 0000000..2af76e8 --- /dev/null +++ b/.cvsignore @@ -0,0 +1,6 @@ +Makefile +config.cache +config.h +config.log +config.status +stamp-h diff --git a/AUTHORS b/AUTHORS new file mode 100644 index 0000000..603cb73 --- /dev/null +++ b/AUTHORS @@ -0,0 +1,16 @@ +AUTHORS of findutils + +I do not know the name of the original author of the findutils package. + +Here are the names of some authors culled from ChangeLog and +miscellaneous other files. + +The locate program and its helper programs are derived (heavily +modified) from James Woods' public domain fast-find code, which is +also distributed with the 4.3BSD find. + +Eric B. Decker +David J. MacKenzie +Jim Meyering +Tim Wood +Kevin Dalley diff --git a/ChangeLog b/ChangeLog index b0de6e5..e428954 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,91 @@ +1999-08-08 Kevin Dalley > + + * Version 4.1.1 + + * README-alpha: added alpha README file + + * find/defs.h: move lstat declarations into defs.h + + * xargs/Makefile.am, testsuite/Makefile.am, locate/Makefile.am, + lib/Makefile.am, find/Makefile.am, doc/Makefile.am, configure.in, + Makefile.am: update for automake-1.4 + +1999-08-02 Kevin Dalley + + * AUTHORS: added file listing AUTHORS + + * lib/Makefile.am: modified code for EXTRA sources + +1999-01-30 Kevin Dalley + + * added const to declaration of basename, which should satisfy + Linux as well as Hurd (fixes bug #31325). + +1998-12-04 Kevin Dalley + + * lib/nextelem.c: removed declaration of strdup and free, which + meets GNU coding standards and allows compilation on more + platforms. + + * find.texi: corrected explanation of -amin option which described + hours instead of minutes + +1998-09-26 Kevin Dalley + + * lib/getline.c: fix getstr so that it correctly handles long file + paths + +1998-09-20 Kevin Dalley + + * removed more function declarations to meet GNU coding standards + +1998-08-30 Kevin Dalley + + * lib/nextelem.c: removed declaration of strdup and free, which + meets GNU coding standards and allow compilation on sparc + + * corrected explanation of -amin option which described hours + instead of minutes + +1998-02-27 Kevin Dalley + + * locate/locate.c: add --existing option to locate, which only + prints the names of files which still exist + +1998-02-08 Kevin Dalley + + * locate/locate.c: corrected get_short so that it correctly + returns negative numbers. + + * remove declarations of various string functions. Removing the + declarations almost matches the GNU Coding Standards. + +1997-03-03 Kevin Dalley + + * xargs/xargs.c: xargs fixed to prevent occasional core dumping. + +1997-01-11 Kevin Dalley + + * locate/updatedb.sh: add --localuser option to updatedb, which + allows find to be run as nobody, while allowing database file to + be created as root, change suggested by + + +1996-12-28 Kevin Dalley + * added PRUNEFS as variable in updatedb and --prunefs as option to + updatedb + +1996-05-27 Kevin Dalley + + * updatedb.sh: when NETPATHS is used, only su to NETUSER if whoami + is root + +1996-04-27 Kevin Dalley + + * lib/getline.c (getstr): verify that nchars_avail is *really* + greater than 0; set *n to a large enough number, stops some core + dumping + Thu Nov 3 09:23:33 1994 David J. MacKenzie * Version 4.1. @@ -612,6 +700,8 @@ Mon Oct 21 22:30:35 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu) * defs.h, parser.c, pred.c: Rename some types that conflict with reserved POSIX.1 namespace (ended in _t). + + Thu Oct 17 22:39:06 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu) * xargs.c: Don't determine memory.h based on POSIX, which diff --git a/NEWS b/NEWS index c047834..66d9a1e 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,7 @@ +Major changes in release 4.1.1: +* attempt at successful compilation on many platforms after years of neglect +* "--existing" option added to locate "--prunefs" option added to updatedb + Major changes in release 4.1: * Distribution renamed to findutils. diff --git a/find/.cvsignore b/find/.cvsignore new file mode 100644 index 0000000..84cff55 --- /dev/null +++ b/find/.cvsignore @@ -0,0 +1,2 @@ +Makefile +find diff --git a/lib/.cvsignore b/lib/.cvsignore new file mode 100644 index 0000000..f3c7a7c --- /dev/null +++ b/lib/.cvsignore @@ -0,0 +1 @@ +Makefile diff --git a/lib/Makefile.in b/lib/Makefile.in dissimilarity index 82% index 534b294..19c44ca 100644 --- a/lib/Makefile.in +++ b/lib/Makefile.in @@ -1,136 +1,314 @@ -# Makefile.in generated automatically by automake from Makefile.am. -# Copyright (C) 1994 Free Software Foundation, Inc. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -SHELL = /bin/sh - -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ -VPATH = @srcdir@ -prefix = @prefix@ -exec_prefix = @exec_prefix@ - -bindir = $(exec_prefix)/bin -sbindir = $(exec_prefix)/sbin -libexecdir = $(exec_prefix)/libexec -datadir = $(prefix)/share -sysconfdir = $(prefix)/etc -sharedstatedir = $(prefix)/com -localstatedir = $(prefix)/var -libdir = $(exec_prefix)/lib -infodir = $(prefix)/info -mandir = $(prefix)/man -includedir = $(prefix)/include -oldincludedir = /usr/include - -INSTALL = @INSTALL@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_DATA = @INSTALL_DATA@ -transform = @program_transform_name@ - -ALL = ${PROGRAMS} ${LIBPROGRAMS} ${SCRIPTS} ${LIBSCRIPTS} ${LIBFILES} -CC = @CC@ -LEX = @LEX@ -YACC = @YACC@ -ANSI2KNR = ./ansi2knr - -DEFS = @DEFS@ -CPPFLAGS = @CPPFLAGS@ -CFLAGS = @CFLAGS@ -LDFLAGS = @LDFLAGS@ -LIBS = @LIBS@ - -find_OBJECTS = regex.o dirname.o error.o filemode.o getopt.o getopt1.o idcache.o listfile.o modechange.o nextelem.o savedir.o xmalloc.o getline.o xstrdup.o xgetcwd.o fnmatch.o -LIBFILES = libfind.a -AR = ar -RANLIB = @RANLIB@ -ALLOCA = @ALLOCA@ -LIBOBJS = @LIBOBJS@ - -SOURCES = ${find_SOURCES} -DIST_CONF = Makefile.am Makefile.in -DIST_FILES = $(DIST_CONF) $(SOURCES) $(TEXINFOS) $(INFOS) $(MANS) $(DIST_OTHER) - -LIBRARIES = find -find_SOURCES = regex.c dirname.c error.c filemode.c getopt.c getopt1.c \ -idcache.c listfile.c modechange.c nextelem.c savedir.c xmalloc.c getline.c \ -xstrdup.c xgetcwd.c fnmatch.c $(find_OPT_SOURCES) - -find_OPT_SOURCES = fileblocks.c memcmp.c memset.c mktime.c stpcpy.c strdup.c \ -strftime.c strspn.c strstr.c strtol.c alloca.c - -DIST_OTHER = fnmatch.h getopt.h modechange.h modetype.h pathmax.h \ -regex.h wait.h - -CONFIG_HEADER = ../config.h -INCLUDES = -I.. -I$(srcdir) - -all:: ${ALL} - -.c.o: - $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $< - -$(find_OBJECTS): ../config.h -install:: install-libraries - -install-libraries: $(LIBFILES) - -uninstall:: uninstall-libraries - -uninstall-libraries: - -libfind.a: $(find_OBJECTS) @LIBOBJS@ @ALLOCA@ - rm -f libfind.a - $(AR) cru libfind.a $(find_OBJECTS) @LIBOBJS@ @ALLOCA@ - $(RANLIB) libfind.a - -mostlyclean: - rm -f *.o core - -clean: mostlyclean - rm -f $(PROGRAMS) $(LIBPROGRAMS) $(LIBFILES) $(TEXFILES) $(CLEANFILES) - -distclean: clean - rm -f Makefile *.tab.c $(DISTCLEANFILES) - rm -f config.cache config.log config.status ${CONFIG_HEADER} stamp-h - -realclean: distclean - rm -f TAGS $(INFOS) - -dist: $(DIST_FILES) $(DIST_DIRS) - -mkdir ../`cat ../distname`/$(subdir) - @for file in $(DIST_FILES); do \ - echo linking $$file; \ - ln $(srcdir)/$$file ../`cat ../distname`/$(subdir)/$$file || \ - { echo copying $$file instead; cp -p $(srcdir)/$$file ../`cat ../distname`/$(subdir)/$$file;}; \ - done - -check dvi info install uninstall:: - -tags:: TAGS - -TAGS:: - cd $(srcdir); etags $(SOURCES) - -# 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: - -fnmatch.o: fnmatch.h -getopt1.o: getopt.h -listfile.o xgetcwd.o: pathmax.h -modechange.o: modechange.h -regex.o: regex.h +# Makefile.in generated automatically by automake 1.4 from Makefile.am + +# Copyright (C) 1994, 1995-8, 1999 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. + + +SHELL = @SHELL@ + +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +VPATH = @srcdir@ +prefix = @prefix@ +exec_prefix = @exec_prefix@ + +bindir = @bindir@ +sbindir = @sbindir@ +libexecdir = @libexecdir@ +datadir = @datadir@ +sysconfdir = @sysconfdir@ +sharedstatedir = @sharedstatedir@ +localstatedir = @localstatedir@ +libdir = @libdir@ +infodir = @infodir@ +mandir = @mandir@ +includedir = @includedir@ +oldincludedir = /usr/include + +DESTDIR = + +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ + +top_builddir = .. + +ACLOCAL = @ACLOCAL@ +AUTOCONF = @AUTOCONF@ +AUTOMAKE = @AUTOMAKE@ +AUTOHEADER = @AUTOHEADER@ + +INSTALL = @INSTALL@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS) +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +transform = @program_transform_name@ + +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +CC = @CC@ +CPP = @CPP@ +MAKEINFO = @MAKEINFO@ +PACKAGE = @PACKAGE@ +RANLIB = @RANLIB@ +VERSION = @VERSION@ + +noinst_LIBRARIES = libfind.a +libfind_a_SOURCES = regex.c regex.h dirname.c error.c filemode.c getopt.c getopt.h getopt1.c idcache.c listfile.c pathmax.h modechange.c modechange.h nextelem.c savedir.c xmalloc.c getline.c xstrdup.c xgetcwd.c fnmatch.c fnmatch.h + + +libfind_a_LIBADD = @LIBOBJS@ @ALLOCA@ + + +# Are these really needed? +EXTRA_DIST = modetype.h wait.h alloca.c + + +INCLUDES = -I.. -I$(srcdir) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = ../config.h +CONFIG_CLEAN_FILES = +LIBRARIES = $(noinst_LIBRARIES) + + +DEFS = @DEFS@ -I. -I$(srcdir) -I.. +CPPFLAGS = @CPPFLAGS@ +LDFLAGS = @LDFLAGS@ +LIBS = @LIBS@ +libfind_a_DEPENDENCIES = @LIBOBJS@ @ALLOCA@ +libfind_a_OBJECTS = regex.o dirname.o error.o filemode.o getopt.o \ +getopt1.o idcache.o listfile.o modechange.o nextelem.o savedir.o \ +xmalloc.o getline.o xstrdup.o xgetcwd.o fnmatch.o +AR = ar +CFLAGS = @CFLAGS@ +COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ +DIST_COMMON = Makefile.am Makefile.in alloca.c fileblocks.c memcmp.c \ +memset.c mktime.c stpcpy.c strdup.c strftime.c strspn.c strstr.c \ +strtol.c + + +DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) + +TAR = tar +GZIP_ENV = --best +DEP_FILES = .deps/alloca.P .deps/dirname.P .deps/error.P \ +.deps/fileblocks.P .deps/filemode.P .deps/fnmatch.P .deps/getline.P \ +.deps/getopt.P .deps/getopt1.P .deps/idcache.P .deps/listfile.P \ +.deps/memcmp.P .deps/memset.P .deps/mktime.P .deps/modechange.P \ +.deps/nextelem.P .deps/regex.P .deps/savedir.P .deps/stpcpy.P \ +.deps/strdup.P .deps/strftime.P .deps/strspn.P .deps/strstr.P \ +.deps/strtol.P .deps/xgetcwd.P .deps/xmalloc.P .deps/xstrdup.P +SOURCES = $(libfind_a_SOURCES) +OBJECTS = $(libfind_a_OBJECTS) + +all: all-redirect +.SUFFIXES: +.SUFFIXES: .S .c .o .s +$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) + cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/Makefile + +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES) + cd $(top_builddir) \ + && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status + + +mostlyclean-noinstLIBRARIES: + +clean-noinstLIBRARIES: + -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) + +distclean-noinstLIBRARIES: + +maintainer-clean-noinstLIBRARIES: + +.s.o: + $(COMPILE) -c $< + +.S.o: + $(COMPILE) -c $< + +mostlyclean-compile: + -rm -f *.o core *.core + +clean-compile: + +distclean-compile: + -rm -f *.tab.c + +maintainer-clean-compile: + +libfind.a: $(libfind_a_OBJECTS) $(libfind_a_DEPENDENCIES) + -rm -f libfind.a + $(AR) cru libfind.a $(libfind_a_OBJECTS) $(libfind_a_LIBADD) + $(RANLIB) libfind.a + +tags: TAGS + +ID: $(HEADERS) $(SOURCES) $(LISP) + list='$(SOURCES) $(HEADERS)'; \ + unique=`for i in $$list; do echo $$i; done | \ + awk ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + here=`pwd` && cd $(srcdir) \ + && mkid -f$$here/ID $$unique $(LISP) + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS)'; \ + unique=`for i in $$list; do echo $$i; done | \ + awk ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \ + || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS) + +mostlyclean-tags: + +clean-tags: + +distclean-tags: + -rm -f TAGS ID + +maintainer-clean-tags: + +distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) + +subdir = lib + +distdir: $(DISTFILES) + here=`cd $(top_builddir) && pwd`; \ + top_distdir=`cd $(top_distdir) && pwd`; \ + distdir=`cd $(distdir) && pwd`; \ + cd $(top_srcdir) \ + && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu lib/Makefile + @for file in $(DISTFILES); do \ + d=$(srcdir); \ + if test -d $$d/$$file; then \ + cp -pr $$/$$file $(distdir)/$$file; \ + else \ + test -f $(distdir)/$$file \ + || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ + || cp -p $$d/$$file $(distdir)/$$file || :; \ + fi; \ + done + +DEPS_MAGIC := $(shell mkdir .deps > /dev/null 2>&1 || :) + +-include $(DEP_FILES) + +mostlyclean-depend: + +clean-depend: + +distclean-depend: + -rm -rf .deps + +maintainer-clean-depend: + +%.o: %.c + @echo '$(COMPILE) -c $<'; \ + $(COMPILE) -Wp,-MD,.deps/$(*F).pp -c $< + @-cp .deps/$(*F).pp .deps/$(*F).P; \ + tr ' ' '\012' < .deps/$(*F).pp \ + | sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \ + >> .deps/$(*F).P; \ + rm .deps/$(*F).pp + +%.lo: %.c + @echo '$(LTCOMPILE) -c $<'; \ + $(LTCOMPILE) -Wp,-MD,.deps/$(*F).pp -c $< + @-sed -e 's/^\([^:]*\)\.o[ ]*:/\1.lo \1.o :/' \ + < .deps/$(*F).pp > .deps/$(*F).P; \ + tr ' ' '\012' < .deps/$(*F).pp \ + | sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \ + >> .deps/$(*F).P; \ + rm -f .deps/$(*F).pp +info-am: +info: info-am +dvi-am: +dvi: dvi-am +check-am: all-am +check: check-am +installcheck-am: +installcheck: installcheck-am +install-exec-am: +install-exec: install-exec-am + +install-data-am: +install-data: install-data-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am +install: install-am +uninstall-am: +uninstall: uninstall-am +all-am: Makefile $(LIBRARIES) +all-redirect: all-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install +installdirs: + + +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -rm -f Makefile $(CONFIG_CLEAN_FILES) + -rm -f config.cache config.log stamp-h stamp-h[0-9]* + +maintainer-clean-generic: +mostlyclean-am: mostlyclean-noinstLIBRARIES mostlyclean-compile \ + mostlyclean-tags mostlyclean-depend mostlyclean-generic + +mostlyclean: mostlyclean-am + +clean-am: clean-noinstLIBRARIES clean-compile clean-tags clean-depend \ + clean-generic mostlyclean-am + +clean: clean-am + +distclean-am: distclean-noinstLIBRARIES distclean-compile \ + distclean-tags distclean-depend distclean-generic \ + clean-am + +distclean: distclean-am + +maintainer-clean-am: maintainer-clean-noinstLIBRARIES \ + maintainer-clean-compile maintainer-clean-tags \ + maintainer-clean-depend maintainer-clean-generic \ + distclean-am + @echo "This command is intended for maintainers to use;" + @echo "it deletes files that may require special tools to rebuild." + +maintainer-clean: maintainer-clean-am + +.PHONY: mostlyclean-noinstLIBRARIES distclean-noinstLIBRARIES \ +clean-noinstLIBRARIES maintainer-clean-noinstLIBRARIES \ +mostlyclean-compile distclean-compile clean-compile \ +maintainer-clean-compile tags mostlyclean-tags distclean-tags \ +clean-tags maintainer-clean-tags distdir mostlyclean-depend \ +distclean-depend clean-depend maintainer-clean-depend info-am info \ +dvi-am dvi check check-am installcheck-am installcheck install-exec-am \ +install-exec install-data-am install-data install-am install \ +uninstall-am uninstall all-redirect all-am all installdirs \ +mostlyclean-generic distclean-generic clean-generic \ +maintainer-clean-generic clean mostlyclean distclean maintainer-clean + + +# 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: diff --git a/lib/listfile.c b/lib/listfile.c index 08cad9c..9e63e11 100644 --- a/lib/listfile.c +++ b/lib/listfile.c @@ -151,7 +151,7 @@ list_file (name, relname, statp, stream) fprintf (stream, "%6lu ", statp->st_ino); - fprintf (stream, "%4u ", convert_blocks (ST_NBLOCKS (statp), kilobytes)); + fprintf (stream, "%4lu ", convert_blocks (ST_NBLOCKS (statp), kilobytes)); /* The space between the mode and the number of links is the POSIX "optional alternate access method flag". */ diff --git a/lib/nextelem.c b/lib/nextelem.c index 881f902..1689817 100644 --- a/lib/nextelem.c +++ b/lib/nextelem.c @@ -31,6 +31,9 @@ #define strchr index #endif #endif +#if defined(STDC_HEADERS) +#include +#endif /* Return the next element of a colon-separated path. A null entry in the path is equivalent to "." (the current directory). diff --git a/locate/.cvsignore b/locate/.cvsignore new file mode 100644 index 0000000..3dcdf7c --- /dev/null +++ b/locate/.cvsignore @@ -0,0 +1,4 @@ +Makefile +config.h.in +locate +updatedb diff --git a/locate/Makefile.in b/locate/Makefile.in dissimilarity index 73% index 5e1d6d4..0620cf4 100644 --- a/locate/Makefile.in +++ b/locate/Makefile.in @@ -1,222 +1,450 @@ -# Makefile.in generated automatically by automake from Makefile.am. -# Copyright (C) 1994 Free Software Foundation, Inc. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -SHELL = /bin/sh - -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ -VPATH = @srcdir@ -prefix = @prefix@ -exec_prefix = @exec_prefix@ - -bindir = $(exec_prefix)/bin -sbindir = $(exec_prefix)/sbin -libexecdir = $(exec_prefix)/libexec -datadir = $(prefix)/share -sysconfdir = $(prefix)/etc -sharedstatedir = $(prefix)/com -localstatedir = $(prefix)/var -libdir = $(exec_prefix)/lib -infodir = $(prefix)/info -mandir = $(prefix)/man -includedir = $(prefix)/include -oldincludedir = /usr/include - -INSTALL = @INSTALL@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_DATA = @INSTALL_DATA@ -transform = @program_transform_name@ - -ALL = ${PROGRAMS} ${LIBPROGRAMS} ${SCRIPTS} ${LIBSCRIPTS} ${LIBFILES} -CC = @CC@ -LEX = @LEX@ -YACC = @YACC@ -ANSI2KNR = ./ansi2knr - -DEFS = @DEFS@ -CPPFLAGS = @CPPFLAGS@ -CFLAGS = @CFLAGS@ -LDFLAGS = @LDFLAGS@ -LIBS = @LIBS@ - -locate_SOURCES = locate.c -locate_OBJECTS = locate.o -frcode_SOURCES = frcode.c -frcode_OBJECTS = frcode.o -code_SOURCES = code.c -code_OBJECTS = code.o -bigram_SOURCES = bigram.c -bigram_OBJECTS = bigram.o -NROFF = nroff - -SOURCES = locate.c frcode.c code.c bigram.c -DIST_CONF = Makefile.am Makefile.in -DIST_FILES = $(DIST_CONF) $(SOURCES) $(TEXINFOS) $(INFOS) $(MANS) $(DIST_OTHER) - -# The default database to build and search. -LOCATE_DB = $(localstatedir)/locatedb - -PROGRAMS = locate -LIBPROGRAMS = frcode code bigram -SCRIPTS = updatedb -MANS = locate.1 updatedb.1 locatedb.5 -CONFIG_HEADER = ../config.h - -DIST_OTHER = locatedb.h updatedb.sh -CLEANFILES = updatedb - -INCLUDES = -I.. -I$(top_srcdir)/lib -DLOCATE_DB=\"$(LOCATE_DB)\" - -LDADD = ../find/version.o ../lib/libfind.a - -all:: ${ALL} - -.c.o: - $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $< - -$(locate_OBJECTS): ../config.h -$(frcode_OBJECTS): ../config.h -$(code_OBJECTS): ../config.h -$(bigram_OBJECTS): ../config.h -install:: install-programs - -install-programs: $(PROGRAMS) $(SCRIPTS) - $(top_srcdir)/mkinstalldirs $(bindir) - for p in $(PROGRAMS) $(SCRIPTS); do \ - $(INSTALL_PROGRAM) $$p $(bindir)/`echo $$p|sed '$(transform)'`; \ - done - -uninstall:: uninstall-programs - -uninstall-programs: - for p in $(PROGRAMS) $(SCRIPTS); do \ - rm -f $(bindir)/`echo $$p|sed '$(transform)'`; \ - done - -install:: install-libprograms - -install-libprograms: $(LIBPROGRAMS) $(LIBSCRIPTS) - $(top_srcdir)/mkinstalldirs $(libexecdir) - for p in $(LIBPROGRAMS) $(LIBSCRIPTS); do \ - $(INSTALL_PROGRAM) $$p $(libexecdir)/`echo $$p|sed '$(transform)'`; \ - done - -uninstall:: uninstall-libprograms - -uninstall-libprograms: - for p in $(LIBPROGRAMS) $(LIBSCRIPTS); do \ - rm -f $(libexecdir)/`echo $$p|sed '$(transform)'`; \ - done - -locate: $(locate_OBJECTS) - $(CC) -o $@ $(locate_OBJECTS) $(LDADD) $(LDFLAGS) $(LIBS) - -frcode: $(frcode_OBJECTS) - $(CC) -o $@ $(frcode_OBJECTS) $(LDADD) $(LDFLAGS) $(LIBS) - -code: $(code_OBJECTS) - $(CC) -o $@ $(code_OBJECTS) $(LDADD) $(LDFLAGS) $(LIBS) - -bigram: $(bigram_OBJECTS) - $(CC) -o $@ $(bigram_OBJECTS) $(LDADD) $(LDFLAGS) $(LIBS) - -install:: install-man - -install-man: - for man in $(MANS); do \ - sect=`echo $$man|sed 's%.*\.\([0-9][a-z]*\)$$%\1%'`; \ - inst=`basename $$man $$sect|sed '$(transform)'`$$sect; \ - mdir=$(mandir)/man$$sect; \ - $(top_srcdir)/mkinstalldirs $$mdir; \ - echo installing $$man as $$mdir/$$inst; \ - $(INSTALL_DATA) $(srcdir)/$$man $$mdir/$$inst; \ - cdir=$(mandir)/cat$$sect; \ - if test -d $$cdir; then \ - echo formatting $$man as $$cdir/$$inst; \ - $(NROFF) -man $(srcdir)/$$man > $$cdir/$$inst; \ - fi; \ - done - -uninstall:: uninstall-man - -uninstall-man: - for man in $(MANS); do \ - sect=`echo $$man|sed 's%.*\(\.[0-9][a-z]*\)$$%\1%'; \ - inst=`basename $$man $sect|sed '$(transform)'`.$$sect; \ - mdir=$(mandir)/man$$sect; \ - cdir=$(mandir)/cat$$sect; \ - rm -f $$mdir/$$inst $$cdir/$$inst; \ - done - -mostlyclean: - rm -f *.o core - -clean: mostlyclean - rm -f $(PROGRAMS) $(LIBPROGRAMS) $(LIBFILES) $(TEXFILES) $(CLEANFILES) - -distclean: clean - rm -f Makefile *.tab.c $(DISTCLEANFILES) - rm -f config.cache config.log config.status ${CONFIG_HEADER} stamp-h - -realclean: distclean - rm -f TAGS $(INFOS) - -dist: $(DIST_FILES) $(DIST_DIRS) - -mkdir ../`cat ../distname`/$(subdir) - @for file in $(DIST_FILES); do \ - echo linking $$file; \ - ln $(srcdir)/$$file ../`cat ../distname`/$(subdir)/$$file || \ - { echo copying $$file instead; cp -p $(srcdir)/$$file ../`cat ../distname`/$(subdir)/$$file;}; \ - done - -check dvi info install uninstall:: - -tags:: TAGS - -TAGS:: - cd $(srcdir); etags $(SOURCES) - -# 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: - -$(PROGRAMS) $(LIBPROGRAMS): ../find/version.o ../lib/libfind.a - -updatedb: updatedb.sh - rm -f $@ - version=`sed -e '/version_string/!d' -e 's/[^0-9.]*\([0-9.]*\).*/\1/' -e q $(top_srcdir)/find/version.c`; \ - find=`echo find|sed '$(transform)'`; \ - frcode=`echo frcode|sed '$(transform)'`; \ - bigram=`echo bigram|sed '$(transform)'`; \ - code=`echo code|sed '$(transform)'`; \ - sed \ - -e "s,@bindir@,$(bindir)," \ - -e "s,@libexecdir@,$(libexecdir)," \ - -e "s,@LOCATE_DB@,$(LOCATE_DB)," \ - -e "s,@version@,$$version," \ - -e "s,@find@,$$find," \ - -e "s,@frcode@,$$frcode," \ - -e "s,@bigram@,$$bigram," \ - -e "s,@code@,$$code," \ - $(srcdir)/updatedb.sh > $@ - chmod +x $@ - -install:: - $(top_srcdir)/mkinstalldirs $(localstatedir) - -frcode.o code.o locate.o: locatedb.h -locate.o: ../lib/fnmatch.h ../lib/getopt.h +# Makefile.in generated automatically by automake 1.4 from Makefile.am + +# Copyright (C) 1994, 1995-8, 1999 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. + +# The default database to build and search. + + +SHELL = @SHELL@ + +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +VPATH = @srcdir@ +prefix = @prefix@ +exec_prefix = @exec_prefix@ + +bindir = @bindir@ +sbindir = @sbindir@ +libexecdir = @libexecdir@ +datadir = @datadir@ +sysconfdir = @sysconfdir@ +sharedstatedir = @sharedstatedir@ +localstatedir = @localstatedir@ +libdir = @libdir@ +infodir = @infodir@ +mandir = @mandir@ +includedir = @includedir@ +oldincludedir = /usr/include + +DESTDIR = + +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ + +top_builddir = .. + +ACLOCAL = @ACLOCAL@ +AUTOCONF = @AUTOCONF@ +AUTOMAKE = @AUTOMAKE@ +AUTOHEADER = @AUTOHEADER@ + +INSTALL = @INSTALL@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS) +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +transform = @program_transform_name@ + +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +CC = @CC@ +CPP = @CPP@ +MAKEINFO = @MAKEINFO@ +PACKAGE = @PACKAGE@ +RANLIB = @RANLIB@ +VERSION = @VERSION@ + +LOCATE_DB = $(localstatedir)/locatedb + +bin_PROGRAMS = locate +LIBPROGRAMS = frcode code bigram +bin_SCRIPTS = updatedb +man_MANS = locate.1 updatedb.1 locatedb.5 + +EXTRA_DIST = locatedb.h updatedb.sh $(man_MANS) +CLEANFILES = updatedb + +INCLUDES = -I.. -I$(top_srcdir)/lib -DLOCATE_DB=\"$(LOCATE_DB)\" + +LDADD = ../find/version.o ../lib/libfind.a +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = ../config.h +CONFIG_CLEAN_FILES = +PROGRAMS = $(bin_PROGRAMS) + + +DEFS = @DEFS@ -I. -I$(srcdir) -I.. +CPPFLAGS = @CPPFLAGS@ +LDFLAGS = @LDFLAGS@ +LIBS = @LIBS@ +locate_SOURCES = locate.c +locate_OBJECTS = locate.o +locate_LDADD = $(LDADD) +locate_DEPENDENCIES = ../find/version.o ../lib/libfind.a +locate_LDFLAGS = +SCRIPTS = $(bin_SCRIPTS) + +CFLAGS = @CFLAGS@ +COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ +man1dir = $(mandir)/man1 +man5dir = $(mandir)/man5 +MANS = $(man_MANS) + +NROFF = nroff +DIST_COMMON = Makefile.am Makefile.in + + +DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) + +TAR = tar +GZIP_ENV = --best +DEP_FILES = .deps/locate.P +SOURCES = locate.c +OBJECTS = locate.o + +all: all-redirect +.SUFFIXES: +.SUFFIXES: .S .c .o .s +$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) + cd $(top_srcdir) && $(AUTOMAKE) --gnu locate/Makefile + +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES) + cd $(top_builddir) \ + && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status + + +mostlyclean-binPROGRAMS: + +clean-binPROGRAMS: + -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) + +distclean-binPROGRAMS: + +maintainer-clean-binPROGRAMS: + +install-binPROGRAMS: $(bin_PROGRAMS) + @$(NORMAL_INSTALL) + $(mkinstalldirs) $(DESTDIR)$(bindir) + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + if test -f $$p; then \ + echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \ + $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \ + else :; fi; \ + done + +uninstall-binPROGRAMS: + @$(NORMAL_UNINSTALL) + list='$(bin_PROGRAMS)'; for p in $$list; do \ + rm -f $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \ + done + +.s.o: + $(COMPILE) -c $< + +.S.o: + $(COMPILE) -c $< + +mostlyclean-compile: + -rm -f *.o core *.core + +clean-compile: + +distclean-compile: + -rm -f *.tab.c + +maintainer-clean-compile: + +locate: $(locate_OBJECTS) $(locate_DEPENDENCIES) + @rm -f locate + $(LINK) $(locate_LDFLAGS) $(locate_OBJECTS) $(locate_LDADD) $(LIBS) + +install-binSCRIPTS: $(bin_SCRIPTS) + @$(NORMAL_INSTALL) + $(mkinstalldirs) $(DESTDIR)$(bindir) + @list='$(bin_SCRIPTS)'; for p in $$list; do \ + if test -f $$p; then \ + echo " $(INSTALL_SCRIPT) $$p $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`"; \ + $(INSTALL_SCRIPT) $$p $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`; \ + else if test -f $(srcdir)/$$p; then \ + echo " $(INSTALL_SCRIPT) $(srcdir)/$$p $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`"; \ + $(INSTALL_SCRIPT) $(srcdir)/$$p $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`; \ + else :; fi; fi; \ + done + +uninstall-binSCRIPTS: + @$(NORMAL_UNINSTALL) + list='$(bin_SCRIPTS)'; for p in $$list; do \ + rm -f $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`; \ + done + +install-man1: + $(mkinstalldirs) $(DESTDIR)$(man1dir) + @list='$(man1_MANS)'; \ + l2='$(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/^.*\\.//'`; \ + inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ + inst=`echo $$inst | sed '$(transform)'`.$$ext; \ + echo " $(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst"; \ + $(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst; \ + done + +uninstall-man1: + @list='$(man1_MANS)'; \ + l2='$(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/^.*\\.//'`; \ + inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ + inst=`echo $$inst | sed '$(transform)'`.$$ext; \ + echo " rm -f $(DESTDIR)$(man1dir)/$$inst"; \ + rm -f $(DESTDIR)$(man1dir)/$$inst; \ + done + +install-man5: + $(mkinstalldirs) $(DESTDIR)$(man5dir) + @list='$(man5_MANS)'; \ + l2='$(man_MANS)'; for i in $$l2; do \ + case "$$i" in \ + *.5*) list="$$list $$i" ;; \ + esac; \ + done; \ + for i in $$list; do \ + if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \ + else file=$$i; fi; \ + ext=`echo $$i | sed -e 's/^.*\\.//'`; \ + inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ + inst=`echo $$inst | sed '$(transform)'`.$$ext; \ + echo " $(INSTALL_DATA) $$file $(DESTDIR)$(man5dir)/$$inst"; \ + $(INSTALL_DATA) $$file $(DESTDIR)$(man5dir)/$$inst; \ + done + +uninstall-man5: + @list='$(man5_MANS)'; \ + l2='$(man_MANS)'; for i in $$l2; do \ + case "$$i" in \ + *.5*) list="$$list $$i" ;; \ + esac; \ + done; \ + for i in $$list; do \ + ext=`echo $$i | sed -e 's/^.*\\.//'`; \ + inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ + inst=`echo $$inst | sed '$(transform)'`.$$ext; \ + echo " rm -f $(DESTDIR)$(man5dir)/$$inst"; \ + rm -f $(DESTDIR)$(man5dir)/$$inst; \ + done +install-man: $(MANS) + @$(NORMAL_INSTALL) + $(MAKE) $(AM_MAKEFLAGS) install-man1 install-man5 +uninstall-man: + @$(NORMAL_UNINSTALL) + $(MAKE) $(AM_MAKEFLAGS) uninstall-man1 uninstall-man5 + +tags: TAGS + +ID: $(HEADERS) $(SOURCES) $(LISP) + list='$(SOURCES) $(HEADERS)'; \ + unique=`for i in $$list; do echo $$i; done | \ + awk ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + here=`pwd` && cd $(srcdir) \ + && mkid -f$$here/ID $$unique $(LISP) + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS)'; \ + unique=`for i in $$list; do echo $$i; done | \ + awk ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \ + || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS) + +mostlyclean-tags: + +clean-tags: + +distclean-tags: + -rm -f TAGS ID + +maintainer-clean-tags: + +distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) + +subdir = locate + +distdir: $(DISTFILES) + here=`cd $(top_builddir) && pwd`; \ + top_distdir=`cd $(top_distdir) && pwd`; \ + distdir=`cd $(distdir) && pwd`; \ + cd $(top_srcdir) \ + && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu locate/Makefile + @for file in $(DISTFILES); do \ + d=$(srcdir); \ + if test -d $$d/$$file; then \ + cp -pr $$/$$file $(distdir)/$$file; \ + else \ + test -f $(distdir)/$$file \ + || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ + || cp -p $$d/$$file $(distdir)/$$file || :; \ + fi; \ + done + +DEPS_MAGIC := $(shell mkdir .deps > /dev/null 2>&1 || :) + +-include $(DEP_FILES) + +mostlyclean-depend: + +clean-depend: + +distclean-depend: + -rm -rf .deps + +maintainer-clean-depend: + +%.o: %.c + @echo '$(COMPILE) -c $<'; \ + $(COMPILE) -Wp,-MD,.deps/$(*F).pp -c $< + @-cp .deps/$(*F).pp .deps/$(*F).P; \ + tr ' ' '\012' < .deps/$(*F).pp \ + | sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \ + >> .deps/$(*F).P; \ + rm .deps/$(*F).pp + +%.lo: %.c + @echo '$(LTCOMPILE) -c $<'; \ + $(LTCOMPILE) -Wp,-MD,.deps/$(*F).pp -c $< + @-sed -e 's/^\([^:]*\)\.o[ ]*:/\1.lo \1.o :/' \ + < .deps/$(*F).pp > .deps/$(*F).P; \ + tr ' ' '\012' < .deps/$(*F).pp \ + | sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \ + >> .deps/$(*F).P; \ + rm -f .deps/$(*F).pp +info-am: +info: info-am +dvi-am: +dvi: dvi-am +check-am: all-am +check: check-am +installcheck-am: +installcheck: installcheck-am +install-exec-am: install-binPROGRAMS install-binSCRIPTS +install-exec: install-exec-am + +install-data-am: install-man +install-data: install-data-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am +install: install-am +uninstall-am: uninstall-binPROGRAMS uninstall-binSCRIPTS uninstall-man +uninstall: uninstall-am +all-am: Makefile $(PROGRAMS) $(SCRIPTS) $(MANS) +all-redirect: all-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install +installdirs: + $(mkinstalldirs) $(DESTDIR)$(bindir) $(DESTDIR)$(bindir) \ + $(DESTDIR)$(mandir)/man1 $(DESTDIR)$(mandir)/man5 + + +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -rm -f Makefile $(CONFIG_CLEAN_FILES) + -rm -f config.cache config.log stamp-h stamp-h[0-9]* + +maintainer-clean-generic: +mostlyclean-am: mostlyclean-binPROGRAMS mostlyclean-compile \ + mostlyclean-tags mostlyclean-depend mostlyclean-generic + +mostlyclean: mostlyclean-am + +clean-am: clean-binPROGRAMS clean-compile clean-tags clean-depend \ + clean-generic mostlyclean-am + +clean: clean-am + +distclean-am: distclean-binPROGRAMS distclean-compile distclean-tags \ + distclean-depend distclean-generic clean-am + +distclean: distclean-am + +maintainer-clean-am: maintainer-clean-binPROGRAMS \ + maintainer-clean-compile maintainer-clean-tags \ + maintainer-clean-depend maintainer-clean-generic \ + distclean-am + @echo "This command is intended for maintainers to use;" + @echo "it deletes files that may require special tools to rebuild." + +maintainer-clean: maintainer-clean-am + +.PHONY: mostlyclean-binPROGRAMS distclean-binPROGRAMS clean-binPROGRAMS \ +maintainer-clean-binPROGRAMS uninstall-binPROGRAMS install-binPROGRAMS \ +mostlyclean-compile distclean-compile clean-compile \ +maintainer-clean-compile uninstall-binSCRIPTS install-binSCRIPTS \ +install-man1 uninstall-man1 install-man5 uninstall-man5 install-man \ +uninstall-man tags mostlyclean-tags distclean-tags clean-tags \ +maintainer-clean-tags distdir mostlyclean-depend distclean-depend \ +clean-depend maintainer-clean-depend info-am info dvi-am dvi check \ +check-am installcheck-am installcheck install-exec-am install-exec \ +install-data-am install-data install-am install uninstall-am uninstall \ +all-redirect all-am all installdirs mostlyclean-generic \ +distclean-generic clean-generic maintainer-clean-generic clean \ +mostlyclean distclean maintainer-clean + + +$(PROGRAMS) $(LIBPROGRAMS): ../find/version.o ../lib/libfind.a + +updatedb: updatedb.sh + rm -f $@ + version=`sed -e '/version_string/!d' -e 's/[^0-9.]*\([0-9.]*\).*/\1/' -e q $(top_srcdir)/find/version.c`; \ + find=`echo find|sed '$(transform)'`; \ + frcode=`echo frcode|sed '$(transform)'`; \ + bigram=`echo bigram|sed '$(transform)'`; \ + code=`echo code|sed '$(transform)'`; \ + sed \ + -e "s,@bindir@,$(bindir)," \ + -e "s,@libexecdir@,$(libexecdir)," \ + -e "s,@LOCATE_DB@,$(LOCATE_DB)," \ + -e "s,@version@,$$version," \ + -e "s,@find@,$$find," \ + -e "s,@frcode@,$$frcode," \ + -e "s,@bigram@,$$bigram," \ + -e "s,@code@,$$code," \ + $(srcdir)/updatedb.sh > $@ + chmod +x $@ + +install: + $(top_srcdir)/mkinstalldirs $(localstatedir) + +# 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: diff --git a/locate/locate.c b/locate/locate.c index ec2de90..9e45087 100644 --- a/locate/locate.c +++ b/locate/locate.c @@ -69,9 +69,8 @@ #include #endif -#ifdef STDC_HEADERS +#ifdef HAVE_ERRNO_H #include -#include #else extern int errno; #endif @@ -348,8 +347,8 @@ usage (stream, status) int status; { fprintf (stream, "\ -Usage: %s [-d path | --database=path] [--version] [--help]\n" - " [-e | --existing] pattern...\n", +Usage: %s [-d path | --database=path] [--version] [--help]\n\ + [-e | --existing] pattern...\n", program_name); exit (status); } @@ -363,7 +362,7 @@ static struct option const longopts[] = {NULL, no_argument, NULL, 0} }; -void +int main (argc, argv) int argc; char **argv; diff --git a/testsuite/.cvsignore b/testsuite/.cvsignore new file mode 100644 index 0000000..f3c7a7c --- /dev/null +++ b/testsuite/.cvsignore @@ -0,0 +1 @@ +Makefile diff --git a/testsuite/Makefile.in b/testsuite/Makefile.in dissimilarity index 64% index 902beef..6f2320c 100644 --- a/testsuite/Makefile.in +++ b/testsuite/Makefile.in @@ -1,118 +1,227 @@ -# Makefile.in generated automatically by automake from Makefile.am. -# Copyright (C) 1994 Free Software Foundation, Inc. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -SHELL = /bin/sh - -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ -VPATH = @srcdir@ -prefix = @prefix@ -exec_prefix = @exec_prefix@ - -bindir = $(exec_prefix)/bin -sbindir = $(exec_prefix)/sbin -libexecdir = $(exec_prefix)/libexec -datadir = $(prefix)/share -sysconfdir = $(prefix)/etc -sharedstatedir = $(prefix)/com -localstatedir = $(prefix)/var -libdir = $(exec_prefix)/lib -infodir = $(prefix)/info -mandir = $(prefix)/man -includedir = $(prefix)/include -oldincludedir = /usr/include - -INSTALL = @INSTALL@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_DATA = @INSTALL_DATA@ -transform = @program_transform_name@ - -ALL = ${PROGRAMS} ${LIBPROGRAMS} ${SCRIPTS} ${LIBSCRIPTS} ${LIBFILES} -SOURCES = -DIST_CONF = Makefile.am Makefile.in -DIST_FILES = $(DIST_CONF) $(SOURCES) $(TEXINFOS) $(INFOS) $(MANS) $(DIST_OTHER) - -XARGS = ../xargs/xargs -XARGSFLAGS = - -RUNTEST= runtest -RUNTESTFLAGS= - -DIST_OTHER = config/*.exp inputs/*.xi xargs.*/*.exp xargs.*/*.xo -DIST_DIRS = config inputs xargs.gnu xargs.posix xargs.sysv - -CLEANFILES = *.log *.sum site.exp site.bak - -all:: ${ALL} - -mostlyclean: - rm -f *.o core - -clean: mostlyclean - rm -f $(PROGRAMS) $(LIBPROGRAMS) $(LIBFILES) $(TEXFILES) $(CLEANFILES) - -distclean: clean - rm -f Makefile *.tab.c $(DISTCLEANFILES) - rm -f config.cache config.log config.status ${CONFIG_HEADER} stamp-h - -realclean: distclean - rm -f TAGS $(INFOS) - -dist: $(DIST_FILES) $(DIST_DIRS) - -mkdir ../`cat ../distname`/$(subdir) - @for file in $(DIST_FILES); do \ - echo linking $$file; \ - ln $(srcdir)/$$file ../`cat ../distname`/$(subdir)/$$file || \ - { echo copying $$file instead; cp -p $(srcdir)/$$file ../`cat ../distname`/$(subdir)/$$file;}; \ - done - -check dvi info install uninstall:: - -tags:: TAGS - -TAGS:: - cd $(srcdir); etags $(SOURCES) - -# 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: - -check:: site.exp - @echo This only works if you have the DejaGNU runtest program installed... - $(RUNTEST) $(RUNTESTFLAGS) --tool xargs XARGS=${XARGS} \ - XARGSFLAGS="${XARGSFLAGS}" --srcdir $(srcdir) - -site.exp: - @echo "Making a new site.exp file..." - -@rm -f site.bak - -@mv site.exp site.bak - @echo "## these variables are automatically generated by make ##" > site.exp - @echo "# Do not edit here. If you wish to override these values" >> site.exp - @echo "# add them to the last section" >> site.exp - @echo "set tool xargs" >> site.exp - @echo "set srcdir ${srcdir}" >> site.exp - @echo "set objdir `pwd`" >> site.exp - @echo "## All variables above are generated by configure. Do Not Edit ##" >> site.exp - -@sed '1,/^## All variables above are.*##/ d' site.bak >> site.exp - -$(DIST_DIRS): FORCE - -mkdir ../`cat ../distname`/$(subdir) - -for d in $(DIST_DIRS); do \ - echo mkdir ../`cat ../distname`/$(subdir)/$$d; \ - mkdir ../`cat ../distname`/$(subdir)/$$d; done - -FORCE: +# Makefile.in generated automatically by automake 1.4 from Makefile.am + +# Copyright (C) 1994, 1995-8, 1999 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. + + +SHELL = @SHELL@ + +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +VPATH = @srcdir@ +prefix = @prefix@ +exec_prefix = @exec_prefix@ + +bindir = @bindir@ +sbindir = @sbindir@ +libexecdir = @libexecdir@ +datadir = @datadir@ +sysconfdir = @sysconfdir@ +sharedstatedir = @sharedstatedir@ +localstatedir = @localstatedir@ +libdir = @libdir@ +infodir = @infodir@ +mandir = @mandir@ +includedir = @includedir@ +oldincludedir = /usr/include + +DESTDIR = + +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ + +top_builddir = .. + +ACLOCAL = @ACLOCAL@ +AUTOCONF = @AUTOCONF@ +AUTOMAKE = @AUTOMAKE@ +AUTOHEADER = @AUTOHEADER@ + +INSTALL = @INSTALL@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS) +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +transform = @program_transform_name@ + +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +CC = @CC@ +CPP = @CPP@ +INCLUDES = @INCLUDES@ +MAKEINFO = @MAKEINFO@ +PACKAGE = @PACKAGE@ +RANLIB = @RANLIB@ +VERSION = @VERSION@ + +AUTOMAKE_OPTIONS = dejagnu +XARGS = ../xargs/xargs +XARGSFLAGS = + +RUNTEST = runtest +RUNTESTFLAGS = + +#EXTRA_DIST = config/*.exp inputs/*.xi xargs.*/*.exp xargs.*/*.xo +EXTRA_DIST = config/unix.exp inputs/eof.xi inputs/eofstr.xi inputs/files.xi inputs/files0.xi inputs/quotes.xi xargs.gnu/0n3.exp xargs.gnu/0n3.xo xargs.gnu/nothing.exp xargs.gnu/nothing.xo xargs.gnu/r.exp xargs.posix/hithere.exp xargs.posix/hithere.xo xargs.posix/n3.exp xargs.posix/n3.xo xargs.posix/quotes.exp xargs.posix/quotes.xo xargs.posix/s47.exp xargs.posix/s47.xo xargs.posix/s470.exp xargs.posix/s470.xo xargs.posix/s48.exp xargs.posix/s48.xo xargs.posix/s6.exp xargs.sysv/eEOF.exp xargs.sysv/eEOF.xo xargs.sysv/eof.exp xargs.sysv/eof.xo xargs.sysv/iARG.exp xargs.sysv/iARG.xo xargs.sysv/iquotes.exp xargs.sysv/iquotes.xo xargs.sysv/l1n4.exp xargs.sysv/l1n4.xo xargs.sysv/l2.exp xargs.sysv/l2.xo + + +DIST_SUBDIRS = config inputs xargs.gnu xargs.posix xargs.sysv + +CLEANFILES = *.log *.sum site.exp site.bak +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = ../config.h +CONFIG_CLEAN_FILES = +DIST_COMMON = Makefile.am Makefile.in + + +DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) + +TAR = tar +GZIP_ENV = --best +EXPECT = expect +all: all-redirect +.SUFFIXES: +$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) + cd $(top_srcdir) && $(AUTOMAKE) --gnu testsuite/Makefile + +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES) + cd $(top_builddir) \ + && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status + +tags: TAGS +TAGS: + + +distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) + +subdir = testsuite + +distdir: $(DISTFILES) + here=`cd $(top_builddir) && pwd`; \ + top_distdir=`cd $(top_distdir) && pwd`; \ + distdir=`cd $(distdir) && pwd`; \ + cd $(top_srcdir) \ + && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu testsuite/Makefile + $(mkinstalldirs) $(distdir)/config $(distdir)/inputs \ + $(distdir)/xargs.gnu $(distdir)/xargs.posix \ + $(distdir)/xargs.sysv + @for file in $(DISTFILES); do \ + d=$(srcdir); \ + if test -d $$d/$$file; then \ + cp -pr $$/$$file $(distdir)/$$file; \ + else \ + test -f $(distdir)/$$file \ + || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ + || cp -p $$d/$$file $(distdir)/$$file || :; \ + fi; \ + done + +DEJATOOL = $(PACKAGE) + +RUNTESTDEFAULTFLAGS = --tool $(DEJATOOL) --srcdir $$srcdir + +check-DEJAGNU: site.exp + srcdir=`cd $(srcdir) && pwd`; export srcdir; \ + EXPECT=$(EXPECT); export EXPECT; \ + runtest=$(RUNTEST); \ + if $(SHELL) -c "$$runtest --version" > /dev/null 2>&1; then \ + $$runtest $(RUNTESTDEFAULTFLAGS) $(RUNTESTFLAGS); \ + else echo "WARNING: could not find \`runtest'" 1>&2; :;\ + fi +info-am: +info: info-am +dvi-am: +dvi: dvi-am +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) check-DEJAGNU +check: check-am +installcheck-am: +installcheck: installcheck-am +install-exec-am: +install-exec: install-exec-am + +install-data-am: +install-data: install-data-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am +install: install-am +uninstall-am: +uninstall: uninstall-am +all-am: Makefile +all-redirect: all-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install +installdirs: + + +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -rm -f Makefile $(CONFIG_CLEAN_FILES) + -rm -f config.cache config.log stamp-h stamp-h[0-9]* + +maintainer-clean-generic: +mostlyclean-am: mostlyclean-generic + +mostlyclean: mostlyclean-am + +clean-am: clean-generic mostlyclean-am + +clean: clean-am + +distclean-am: distclean-generic clean-am + +distclean: distclean-am + +maintainer-clean-am: maintainer-clean-generic distclean-am + @echo "This command is intended for maintainers to use;" + @echo "it deletes files that may require special tools to rebuild." + +maintainer-clean: maintainer-clean-am + +.PHONY: tags distdir check-DEJAGNU info-am info dvi-am dvi check \ +check-am installcheck-am installcheck install-exec-am install-exec \ +install-data-am install-data install-am install uninstall-am uninstall \ +all-redirect all-am all installdirs mostlyclean-generic \ +distclean-generic clean-generic maintainer-clean-generic clean \ +mostlyclean distclean maintainer-clean + + +check: site.exp + @echo This only works if you have the DejaGNU runtest program installed... + $(RUNTEST) $(RUNTESTFLAGS) --tool xargs XARGS=${XARGS} \ + XARGSFLAGS="${XARGSFLAGS}" --srcdir $(srcdir) + +site.exp: + @echo "Making a new site.exp file..." + -@rm -f site.bak + -@mv site.exp site.bak + @echo "## these variables are automatically generated by make ##" > site.exp + @echo "# Do not edit here. If you wish to override these values" >> site.exp + @echo "# add them to the last section" >> site.exp + @echo "set tool xargs" >> site.exp + @echo "set srcdir ${srcdir}" >> site.exp + @echo "set objdir `pwd`" >> site.exp + @echo "## All variables above are generated by configure. Do Not Edit ##" >> site.exp + -@sed '1,/^## All variables above are.*##/ d' site.bak >> site.exp + +FORCE: + +# 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: diff --git a/xargs/.cvsignore b/xargs/.cvsignore new file mode 100644 index 0000000..711b3e6 --- /dev/null +++ b/xargs/.cvsignore @@ -0,0 +1,2 @@ +Makefile +xargs diff --git a/xargs/Makefile.in b/xargs/Makefile.in dissimilarity index 81% index 4d57ef6..efe05ad 100644 --- a/xargs/Makefile.in +++ b/xargs/Makefile.in @@ -1,156 +1,360 @@ -# Makefile.in generated automatically by automake from Makefile.am. -# Copyright (C) 1994 Free Software Foundation, Inc. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -SHELL = /bin/sh - -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ -VPATH = @srcdir@ -prefix = @prefix@ -exec_prefix = @exec_prefix@ - -bindir = $(exec_prefix)/bin -sbindir = $(exec_prefix)/sbin -libexecdir = $(exec_prefix)/libexec -datadir = $(prefix)/share -sysconfdir = $(prefix)/etc -sharedstatedir = $(prefix)/com -localstatedir = $(prefix)/var -libdir = $(exec_prefix)/lib -infodir = $(prefix)/info -mandir = $(prefix)/man -includedir = $(prefix)/include -oldincludedir = /usr/include - -INSTALL = @INSTALL@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_DATA = @INSTALL_DATA@ -transform = @program_transform_name@ - -ALL = ${PROGRAMS} ${LIBPROGRAMS} ${SCRIPTS} ${LIBSCRIPTS} ${LIBFILES} -CC = @CC@ -LEX = @LEX@ -YACC = @YACC@ -ANSI2KNR = ./ansi2knr - -DEFS = @DEFS@ -CPPFLAGS = @CPPFLAGS@ -CFLAGS = @CFLAGS@ -LDFLAGS = @LDFLAGS@ -LIBS = @LIBS@ - -xargs_SOURCES = xargs.c -xargs_OBJECTS = xargs.o -NROFF = nroff - -SOURCES = xargs.c -DIST_CONF = Makefile.am Makefile.in -DIST_FILES = $(DIST_CONF) $(SOURCES) $(TEXINFOS) $(INFOS) $(MANS) $(DIST_OTHER) - -PROGRAMS = xargs -MANS = xargs.1 -INCLUDES = -I.. -I$(top_srcdir)/lib -LDADD = ../find/version.o ../lib/libfind.a -CONFIG_HEADER = ../config.h - -all:: ${ALL} - -.c.o: - $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $< - -$(xargs_OBJECTS): ../config.h -install:: install-programs - -install-programs: $(PROGRAMS) $(SCRIPTS) - $(top_srcdir)/mkinstalldirs $(bindir) - for p in $(PROGRAMS) $(SCRIPTS); do \ - $(INSTALL_PROGRAM) $$p $(bindir)/`echo $$p|sed '$(transform)'`; \ - done - -uninstall:: uninstall-programs - -uninstall-programs: - for p in $(PROGRAMS) $(SCRIPTS); do \ - rm -f $(bindir)/`echo $$p|sed '$(transform)'`; \ - done - -xargs: $(xargs_OBJECTS) - $(CC) -o $@ $(xargs_OBJECTS) $(LDADD) $(LDFLAGS) $(LIBS) - -install:: install-man - -install-man: - for man in $(MANS); do \ - sect=`echo $$man|sed 's%.*\.\([0-9][a-z]*\)$$%\1%'`; \ - inst=`basename $$man $$sect|sed '$(transform)'`$$sect; \ - mdir=$(mandir)/man$$sect; \ - $(top_srcdir)/mkinstalldirs $$mdir; \ - echo installing $$man as $$mdir/$$inst; \ - $(INSTALL_DATA) $(srcdir)/$$man $$mdir/$$inst; \ - cdir=$(mandir)/cat$$sect; \ - if test -d $$cdir; then \ - echo formatting $$man as $$cdir/$$inst; \ - $(NROFF) -man $(srcdir)/$$man > $$cdir/$$inst; \ - fi; \ - done - -uninstall:: uninstall-man - -uninstall-man: - for man in $(MANS); do \ - sect=`echo $$man|sed 's%.*\(\.[0-9][a-z]*\)$$%\1%'; \ - inst=`basename $$man $sect|sed '$(transform)'`.$$sect; \ - mdir=$(mandir)/man$$sect; \ - cdir=$(mandir)/cat$$sect; \ - rm -f $$mdir/$$inst $$cdir/$$inst; \ - done - -mostlyclean: - rm -f *.o core - -clean: mostlyclean - rm -f $(PROGRAMS) $(LIBPROGRAMS) $(LIBFILES) $(TEXFILES) $(CLEANFILES) - -distclean: clean - rm -f Makefile *.tab.c $(DISTCLEANFILES) - rm -f config.cache config.log config.status ${CONFIG_HEADER} stamp-h - -realclean: distclean - rm -f TAGS $(INFOS) - -dist: $(DIST_FILES) $(DIST_DIRS) - -mkdir ../`cat ../distname`/$(subdir) - @for file in $(DIST_FILES); do \ - echo linking $$file; \ - ln $(srcdir)/$$file ../`cat ../distname`/$(subdir)/$$file || \ - { echo copying $$file instead; cp -p $(srcdir)/$$file ../`cat ../distname`/$(subdir)/$$file;}; \ - done - -check dvi info install uninstall:: - -tags:: TAGS - -TAGS:: - cd $(srcdir); etags $(SOURCES) - -# 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: - -$(PROGRAMS): ../find/version.o ../lib/libfind.a - -xargs.o: ../lib/wait.h +# Makefile.in generated automatically by automake 1.4 from Makefile.am + +# Copyright (C) 1994, 1995-8, 1999 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. + + +SHELL = @SHELL@ + +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +VPATH = @srcdir@ +prefix = @prefix@ +exec_prefix = @exec_prefix@ + +bindir = @bindir@ +sbindir = @sbindir@ +libexecdir = @libexecdir@ +datadir = @datadir@ +sysconfdir = @sysconfdir@ +sharedstatedir = @sharedstatedir@ +localstatedir = @localstatedir@ +libdir = @libdir@ +infodir = @infodir@ +mandir = @mandir@ +includedir = @includedir@ +oldincludedir = /usr/include + +DESTDIR = + +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ + +top_builddir = .. + +ACLOCAL = @ACLOCAL@ +AUTOCONF = @AUTOCONF@ +AUTOMAKE = @AUTOMAKE@ +AUTOHEADER = @AUTOHEADER@ + +INSTALL = @INSTALL@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS) +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +transform = @program_transform_name@ + +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +CC = @CC@ +CPP = @CPP@ +MAKEINFO = @MAKEINFO@ +PACKAGE = @PACKAGE@ +RANLIB = @RANLIB@ +VERSION = @VERSION@ + +bin_PROGRAMS = xargs +man_MANS = xargs.1 +INCLUDES = -I.. -I$(top_srcdir)/lib +LDADD = ../find/version.o ../lib/libfind.a +EXTRA_DIST = $(man_MANS) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = ../config.h +CONFIG_CLEAN_FILES = +PROGRAMS = $(bin_PROGRAMS) + + +DEFS = @DEFS@ -I. -I$(srcdir) -I.. +CPPFLAGS = @CPPFLAGS@ +LDFLAGS = @LDFLAGS@ +LIBS = @LIBS@ +xargs_SOURCES = xargs.c +xargs_OBJECTS = xargs.o +xargs_LDADD = $(LDADD) +xargs_DEPENDENCIES = ../find/version.o ../lib/libfind.a +xargs_LDFLAGS = +CFLAGS = @CFLAGS@ +COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ +man1dir = $(mandir)/man1 +MANS = $(man_MANS) + +NROFF = nroff +DIST_COMMON = Makefile.am Makefile.in + + +DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) + +TAR = tar +GZIP_ENV = --best +DEP_FILES = .deps/xargs.P +SOURCES = xargs.c +OBJECTS = xargs.o + +all: all-redirect +.SUFFIXES: +.SUFFIXES: .S .c .o .s +$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) + cd $(top_srcdir) && $(AUTOMAKE) --gnu xargs/Makefile + +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES) + cd $(top_builddir) \ + && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status + + +mostlyclean-binPROGRAMS: + +clean-binPROGRAMS: + -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) + +distclean-binPROGRAMS: + +maintainer-clean-binPROGRAMS: + +install-binPROGRAMS: $(bin_PROGRAMS) + @$(NORMAL_INSTALL) + $(mkinstalldirs) $(DESTDIR)$(bindir) + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + if test -f $$p; then \ + echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \ + $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \ + else :; fi; \ + done + +uninstall-binPROGRAMS: + @$(NORMAL_UNINSTALL) + list='$(bin_PROGRAMS)'; for p in $$list; do \ + rm -f $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \ + done + +.s.o: + $(COMPILE) -c $< + +.S.o: + $(COMPILE) -c $< + +mostlyclean-compile: + -rm -f *.o core *.core + +clean-compile: + +distclean-compile: + -rm -f *.tab.c + +maintainer-clean-compile: + +xargs: $(xargs_OBJECTS) $(xargs_DEPENDENCIES) + @rm -f xargs + $(LINK) $(xargs_LDFLAGS) $(xargs_OBJECTS) $(xargs_LDADD) $(LIBS) + +install-man1: + $(mkinstalldirs) $(DESTDIR)$(man1dir) + @list='$(man1_MANS)'; \ + l2='$(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/^.*\\.//'`; \ + inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ + inst=`echo $$inst | sed '$(transform)'`.$$ext; \ + echo " $(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst"; \ + $(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst; \ + done + +uninstall-man1: + @list='$(man1_MANS)'; \ + l2='$(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/^.*\\.//'`; \ + inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ + inst=`echo $$inst | sed '$(transform)'`.$$ext; \ + echo " rm -f $(DESTDIR)$(man1dir)/$$inst"; \ + rm -f $(DESTDIR)$(man1dir)/$$inst; \ + done +install-man: $(MANS) + @$(NORMAL_INSTALL) + $(MAKE) $(AM_MAKEFLAGS) install-man1 +uninstall-man: + @$(NORMAL_UNINSTALL) + $(MAKE) $(AM_MAKEFLAGS) uninstall-man1 + +tags: TAGS + +ID: $(HEADERS) $(SOURCES) $(LISP) + list='$(SOURCES) $(HEADERS)'; \ + unique=`for i in $$list; do echo $$i; done | \ + awk ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + here=`pwd` && cd $(srcdir) \ + && mkid -f$$here/ID $$unique $(LISP) + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS)'; \ + unique=`for i in $$list; do echo $$i; done | \ + awk ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \ + || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS) + +mostlyclean-tags: + +clean-tags: + +distclean-tags: + -rm -f TAGS ID + +maintainer-clean-tags: + +distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) + +subdir = xargs + +distdir: $(DISTFILES) + here=`cd $(top_builddir) && pwd`; \ + top_distdir=`cd $(top_distdir) && pwd`; \ + distdir=`cd $(distdir) && pwd`; \ + cd $(top_srcdir) \ + && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu xargs/Makefile + @for file in $(DISTFILES); do \ + d=$(srcdir); \ + if test -d $$d/$$file; then \ + cp -pr $$/$$file $(distdir)/$$file; \ + else \ + test -f $(distdir)/$$file \ + || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ + || cp -p $$d/$$file $(distdir)/$$file || :; \ + fi; \ + done + +DEPS_MAGIC := $(shell mkdir .deps > /dev/null 2>&1 || :) + +-include $(DEP_FILES) + +mostlyclean-depend: + +clean-depend: + +distclean-depend: + -rm -rf .deps + +maintainer-clean-depend: + +%.o: %.c + @echo '$(COMPILE) -c $<'; \ + $(COMPILE) -Wp,-MD,.deps/$(*F).pp -c $< + @-cp .deps/$(*F).pp .deps/$(*F).P; \ + tr ' ' '\012' < .deps/$(*F).pp \ + | sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \ + >> .deps/$(*F).P; \ + rm .deps/$(*F).pp + +%.lo: %.c + @echo '$(LTCOMPILE) -c $<'; \ + $(LTCOMPILE) -Wp,-MD,.deps/$(*F).pp -c $< + @-sed -e 's/^\([^:]*\)\.o[ ]*:/\1.lo \1.o :/' \ + < .deps/$(*F).pp > .deps/$(*F).P; \ + tr ' ' '\012' < .deps/$(*F).pp \ + | sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \ + >> .deps/$(*F).P; \ + rm -f .deps/$(*F).pp +info-am: +info: info-am +dvi-am: +dvi: dvi-am +check-am: all-am +check: check-am +installcheck-am: +installcheck: installcheck-am +install-exec-am: install-binPROGRAMS +install-exec: install-exec-am + +install-data-am: install-man +install-data: install-data-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am +install: install-am +uninstall-am: uninstall-binPROGRAMS uninstall-man +uninstall: uninstall-am +all-am: Makefile $(PROGRAMS) $(MANS) +all-redirect: all-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install +installdirs: + $(mkinstalldirs) $(DESTDIR)$(bindir) $(DESTDIR)$(mandir)/man1 + + +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -rm -f Makefile $(CONFIG_CLEAN_FILES) + -rm -f config.cache config.log stamp-h stamp-h[0-9]* + +maintainer-clean-generic: +mostlyclean-am: mostlyclean-binPROGRAMS mostlyclean-compile \ + mostlyclean-tags mostlyclean-depend mostlyclean-generic + +mostlyclean: mostlyclean-am + +clean-am: clean-binPROGRAMS clean-compile clean-tags clean-depend \ + clean-generic mostlyclean-am + +clean: clean-am + +distclean-am: distclean-binPROGRAMS distclean-compile distclean-tags \ + distclean-depend distclean-generic clean-am + +distclean: distclean-am + +maintainer-clean-am: maintainer-clean-binPROGRAMS \ + maintainer-clean-compile maintainer-clean-tags \ + maintainer-clean-depend maintainer-clean-generic \ + distclean-am + @echo "This command is intended for maintainers to use;" + @echo "it deletes files that may require special tools to rebuild." + +maintainer-clean: maintainer-clean-am + +.PHONY: mostlyclean-binPROGRAMS distclean-binPROGRAMS clean-binPROGRAMS \ +maintainer-clean-binPROGRAMS uninstall-binPROGRAMS install-binPROGRAMS \ +mostlyclean-compile distclean-compile clean-compile \ +maintainer-clean-compile install-man1 uninstall-man1 install-man \ +uninstall-man tags mostlyclean-tags distclean-tags clean-tags \ +maintainer-clean-tags distdir mostlyclean-depend distclean-depend \ +clean-depend maintainer-clean-depend info-am info dvi-am dvi check \ +check-am installcheck-am installcheck install-exec-am install-exec \ +install-data-am install-data install-am install uninstall-am uninstall \ +all-redirect all-am all installdirs mostlyclean-generic \ +distclean-generic clean-generic maintainer-clean-generic clean \ +mostlyclean distclean maintainer-clean + + +$(PROGRAMS): ../find/version.o ../lib/libfind.a + +# 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: diff --git a/xargs/xargs.c b/xargs/xargs.c index 82bfb5b..7b854db 100644 --- a/xargs/xargs.c +++ b/xargs/xargs.c @@ -240,7 +240,7 @@ static long parse_num P_ ((char *str, int option, long min, long max)); static long env_size P_ ((char **envp)); static void usage P_ ((FILE * stream, int status)); -void +int main (argc, argv) int argc; char **argv; -- 2.11.4.GIT